Skip to content

(#2606) pixart two-stage pipeline inference support (v0.7 MoE variant) - #2822

Merged
bghira merged 2 commits into
mainfrom
feature/pixart-two-stage-inference
Jul 16, 2026
Merged

(#2606) pixart two-stage pipeline inference support (v0.7 MoE variant)#2822
bghira merged 2 commits into
mainfrom
feature/pixart-two-stage-inference

Conversation

@bghira

@bghira bghira commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Closes #2606

This pull request adds support for multistage validation to the PixArt model, allowing validation to run in either "trained stage only" or "full pipeline" modes. It introduces new configuration options, updates the model registry and configuration helpers, and provides comprehensive tests for the new validation logic.

PixArt multistage validation support:

  • Added new configuration options (--pixart_validation_pipeline_mode, --pixart_validation_stage1_model, --pixart_validation_stage2_model) to select validation mode and specify fixed models for each stage. [1] [2]
  • Implemented multistage validation logic in PixartSigma, including methods for determining the validation mode, selecting the appropriate pipeline for each stage, handling schedule boundaries, and running chained validation across stages. [1] [2]
  • Registered the new PixArt validation fields in the field registry for UI and config integration.

Testing and documentation:

  • Added a comprehensive test suite in tests/test_pixart_multistage_validation.py to cover all major code paths and edge cases for PixArt multistage validation.
  • Updated documentation to describe the new options and their usage.

Other improvements:

  • Ensured the new configuration options are discovered by the model field registry tests.
  • Minor import cleanup in pixart/model.py.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds multistage (two-stage) validation support for PixArt v0.7 split pipelines, allowing validation to run either only the trained stage or the full stage1→stage2 chain. It also wires the new options into config/UI integration and introduces unit tests covering the new PixArt validation behavior.

Changes:

  • Added PixArt multistage validation plumbing in PixartSigma (mode selection, stage pipeline selection, and chained validation execution).
  • Registered new PixArt validation config fields for CLI/UI discovery and env var mapping.
  • Added PixArt multistage validation unit tests and documented the new CLI options.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
simpletuner/helpers/models/pixart/model.py Implements PixArt multistage validation mode parsing and the stage1→stage2 validation call chain.
simpletuner/helpers/models/field_registry/pixart.py Registers the PixArt validation options with the field registry for UI/config integration.
simpletuner/helpers/configuration/env_file.py Adds env var → CLI arg mappings for the new PixArt validation options.
tests/test_pixart_multistage_validation.py Introduces unit tests that exercise the PixArt multistage validation code paths.
tests/test_model_field_registry.py Ensures the PixArt field registry module is discovered by the registry tests.
documentation/OPTIONS.md Documents the new PixArt validation CLI options.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread simpletuner/helpers/models/pixart/model.py
Comment thread simpletuner/helpers/models/pixart/model.py
Comment thread tests/test_pixart_multistage_validation.py
Comment thread tests/test_pixart_multistage_validation.py
Comment thread documentation/OPTIONS.md
@bghira
bghira merged commit d10c20b into main Jul 16, 2026
3 checks passed
@bghira
bghira deleted the feature/pixart-two-stage-inference branch July 16, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PixArt: refactor two-stage validation pipeline

2 participants