Skip to content

Configure fixed sampling sigmas on QwenImage21Pipeline - #4

Open
naykun wants to merge 1 commit into
mainfrom
qwen-image-2.1-pipeline-sigmas
Open

naykun wants to merge 1 commit into
mainfrom
qwen-image-2.1-pipeline-sigmas

Conversation

@naykun

@naykun naykun commented Oct 3, 2026

Copy link
Copy Markdown
Owner

What does this PR do?

Follow up on the review in #3 by storing sample_sigmas in the QwenImage21 pipeline config (model_index.json) instead of extending FlowMatchEulerDiscreteScheduler. The scheduler implementation is unchanged.

The pipeline passes the selected grid through the scheduler's existing sigmas argument. For a fixed distilled grid, the checkpoint scheduler config disables dynamic shifting, terminal stretching and sigma conversions, with shift=1.0. The docs include the checkpoint configuration and save/load workflow.

Explicit call-time sigmas override the saved pipeline grid. Otherwise the configured grid determines the step count; num_inference_steps is used only when neither grid is supplied. Loading with from_pretrained(..., sample_sigmas=...) can also override the saved default. Explicit grids still go through the scheduler's configured processing.

Validation

  • Four CPU regression cases passed: configured-grid step counts, explicit overrides, and pipeline save/load including a load-time override.
  • Real accelerated checkpoint: 2048 脳 2048, 8 steps, bf16, one fixed text prompt and seed on a single 80 GiB GPU. The new pipeline-config path and the previous scheduler-config implementation produced exactly equal sigmas, timesteps, every denoising latent, and final RGBA pixels (maximum difference 0). Both paths shared the same model components to isolate the scheduling change.
  • make style and make fix-copies completed. The final three changed files match the snapshot used in the real-checkpoint test.

This verifies parity for that fixed grid and input. Quality with other grids or four-step sampling has not been evaluated; passing num_inference_steps=4 alone still uses the configured eight-point grid.

Self-review

READY. No blocking issues or unused added code found. The new config is exercised through construction, serialization, loading and inference; regression tests call the real scheduler and pipeline. Parameter precedence and scheduler preprocessing are documented. No unresolved review findings; the validation scope is stated above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pipelines tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant