Skip to content

feat: add Qwen Image 2.1 Turbo sigma preset - #2130

Merged
leejet merged 1 commit into
masterfrom
feat/qwen-image-2-1-turbo-sigmas
Oct 12, 2026
Merged

leejet merged 1 commit into
masterfrom
feat/qwen-image-2-1-turbo-sigmas

Conversation

@leejet

@leejet leejet commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Accept qwen-image-2.1-turbo in --sigmas and --hires-sigmas, expanding it to the fixed 8-step sigma list.

Related Issue / Discussion

Resolve #2125.

Additional Information

N/A

Checklist

Summary by CodeRabbit

  • New Features
    • Added the qwen-image-2.1-turbo sigma preset for standard and high-resolution generation. It uses nine fixed sigma values, with the number of sampling steps determined by the preset.
    • Added guidance for using Turbo weights, including an example with 8 steps, CFG scale 1.0, and Euler sampling.
    • Documented that CFG scale and sampler can be configured independently.

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e89a92a9-4a90-495d-a6c1-fe3881f28ccd

📥 Commits

Reviewing files that changed from the base of the PR and between 792bcd3 and aba24b4.


📒 Files selected for processing (3)
  • docs/qwen_image_2.1.md
  • examples/common/common.cpp
  • src/pipeline/diffusion_engine.cpp

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.



📝 Walkthrough

Walkthrough

The CLI now accepts qwen-image-2.1-turbo as a sigma preset and expands it to nine predefined values. Help text and Qwen Image 2.1 documentation describe the preset. A separate alignment change in batched output assignment does not change behavior.

Changes

Turbo Sigma Preset

Layer / File(s) Summary
Preset parsing and usage guidance
examples/common/common.cpp, docs/qwen_image_2.1.md, src/pipeline/diffusion_engine.cpp
The sigma parser expands the exact Turbo preset name into nine values. CLI help and documentation describe the preset, including its availability for the high-resolution pass. The batched output assignment change only adjusts whitespace.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Suggested reviewers: stduhpf


Merge Risk: ⚪ Minimal · up to aba24

The Turbo preset and its documented sigma list agree for standard and high-resolution sampling; no actionable merge risk remains.

Architecture Summary

Architecture risk: 🔵 Low · up to aba24

The change affects 3 systems.

Changed systems: examples, src, docs

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — examples (service) was modified; 1 changed file maps to changed impact.
  • observed — src (service) was modified; 1 changed file maps to changed impact.
  • observed — docs (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in docs/qwen_image_2.1.md: Added Turbo usage guidance with an 8-step example and the qwen-image-2.1-turbo sigma preset. Documents the preset’s equivalent sigma list, clarifies that CFG scale and sampler remain independently configurable and the sigma count determines sampling steps, and notes that the preset is also accepted for the high-resolution second pass.
  • observed — Modified behavior in examples/common/common.cpp: The sigma parser now replaces the exact preset name qwen-image-2.1-turbo with nine predefined sigma values before applying its existing list parsing and error handling.
  • observed — Modified behavior in examples/common/common.cpp: The --sigmas and --hires-sigmas help text now documents qwen-image-2.1-turbo as an accepted preset alongside comma-separated values.
  • observed — Modified behavior in src/pipeline/diffusion_engine.cpp: Only alignment whitespace changed when assigning the two chunks of batched output to conditional and unconditional outputs; the chunking and assignment behavior is unchanged.

Pre-merge checks | Passed 2 | Failed 3

❌ Failed checks (3 warnings)

Check name Status Explanation Resolution
Linked Issues check Warning Issue #2125 requests automatic use of the Qwen-Image-2.1-Turbo schedule for the Turbo variant. The PR adds the fixed sigma list only when the user supplies --sigmas qwen-image-2.1-turbo or `--hires-… Implement the #2125 automatic Turbo behavior for the supported Qwen-Image-2.1-Turbo variant. Do not require users to provide the sigma preset and related required defaults manually. Add automated coverage for the automatic behavior and for …
Out of Scope Changes check Warning The changes to docs/qwen_image_2.1.md and examples/common/common.cpp support the linked feature. The three-line whitespace-only change in src/pipeline/diffusion_engine.cpp has no connection to t… Remove the unrelated whitespace-only change in src/pipeline/diffusion_engine.cpp, or provide a direct feature-related reason for retaining it.
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check Passed The description includes all required template sections. It clearly states the change, links the related issue, provides additional information, and confirms the contribution checklist.
Title check Passed The title clearly and concisely identifies the main change: adding the Qwen Image 2.1 Turbo sigma preset.

Full details: Linked Issues check

Explanation

Issue #2125 requests automatic use of the Qwen-Image-2.1-Turbo schedule for the Turbo variant. The PR adds the fixed sigma list only when the user supplies --sigmas qwen-image-2.1-turbo or --hires-sigmas qwen-image-2.1-turbo. The new documentation still requires the user to provide --steps 8, --cfg-scale 1.0, and --sampling-method euler. The reviewed diff shows no model-variant detection or automatic application of these settings.

Resolution

Implement the #2125 automatic Turbo behavior for the supported Qwen-Image-2.1-Turbo variant. Do not require users to provide the sigma preset and related required defaults manually. Add automated coverage for the automatic behavior and for the explicit preset options if the project test structure supports them.


Full details: Out of Scope Changes check

Explanation

The changes to docs/qwen_image_2.1.md and examples/common/common.cpp support the linked feature. The three-line whitespace-only change in src/pipeline/diffusion_engine.cpp has no connection to the Qwen sigma preset and changes no behavior.


Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (1 skipped: 1 unsupported.)


  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR

🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

🔧 Cppcheck (2.22.0)
src/pipeline/diffusion_engine.cpp

Cppcheck timed out; analysis of this file is incomplete



Comment @coderabbitai help to get the list of available commands.

@leejet
leejet merged commit d637cfb into master Oct 12, 2026
11 checks passed
@leejet
leejet deleted the feat/qwen-image-2-1-turbo-sigmas branch October 12, 2026 15:10
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.

[Feature] Support the sigmas/steps for Qwen-Image-2.1-turbo

1 participant