Add Qwen-Image 2.1 Turbo as a downloadable model by alexandergreil · Pull Request #1 · ph1lb4/imagegen-mac · GitHub
Skip to content

Add Qwen-Image 2.1 Turbo as a downloadable model - #1

Merged
ph1lb4 merged 5 commits into
ph1lb4:mainfrom
alexandergreil:main
Oct 23, 2026
Merged

ph1lb4 merged 5 commits into
ph1lb4:mainfrom
alexandergreil:main

Conversation

@alexandergreil

Copy link
Copy Markdown
Contributor

ImageGen currently offers only Qwen-Image 2.1. This adds Qwen-Image 2.1 Turbo to the existing model picker, download flow and MCP model list, with a separate model directory.

Turbo uses the checkpoint's saved eight-step sampling schedule. The engine rejects incompatible custom step counts, and the app shows the fixed schedule instead of the custom-step controls. Progress and saved metadata use eight steps. The base model retains its default of 40 and its custom-step support.

The Diffusers pin is updated to da1d3829cf08d4f329b526d89e17cc035c049d8d, the merge commit for upstream PR #14950, which adds support for pipeline-configured sampling sigmas. The previous pin lacks this support. The lockfile is regenerated; package versions other than the Diffusers revision remain unchanged.

Validation:

  • Swift app builds successfully.
  • Five Python unit tests pass, covering model directory/install isolation, Turbo defaults across resolutions, custom-step validation, base-model behavior, and mocked generation/editing with progress and metadata checks.
  • Dependency lockfile check and git diff whitespace check pass.
  • Real model download, loading and inference on Apple Silicon have not been tested. The generation test uses a simulated pipeline and does not establish image quality or speed.

References:

@ph1lb4 ph1lb4 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Review: OK with notes

The change is small, well scoped and correct. Before merging, someone should do one real download and generation run on an Apple Silicon Mac, since the PR says that hasn't been done.

Verified

  • The Diffusers pin da1d3829cf08d4f329b526d89e17cc035c049d8d is the merge commit of huggingface/diffusers#14950 ("Configure fixed sampling sigmas on QwenImage21Pipeline", merged 2026-10-05). That PR reads sample_sigmas from model_index.json, and the grid determines the step count.
  • Qwen/Qwen-Image-2.1-Turbo on HF: public, not gated, QwenImage21Pipeline, license qwen-research (non-commercial, same as base). Its model_index.json ships exactly 8 sample_sigmas, so default_steps=8, total_steps and the step callback line up. The model is ~32.5 GB with assets/ skipped, matching size_gb.
  • local_dir is derived from repo, so base and Turbo install separately (also covered by the test).
  • Engine: Turbo rejects any explicit steps other than None or 8. The base model's None→40 and clamp behavior are unchanged. The app never sends custom steps for a fixedSteps model, even if useCustomSteps was left on from the base model, and the UI swaps the toggle for an explanatory caption. fixedSteps: Bool? decodes safely against an older backend.
  • MCP list_models now exposes default_steps and fixed_steps, and the docstrings are updated.
  • uv.lock: only the diffusers rev changes, plus nvidia marker re-normalisation from a newer uv (Linux and Windows only, so no effect on macOS).
  • Mergeable: clean. There's no CI on this repo, so the Python tests and Swift build are only as reported in the PR.

Notes (non-blocking)

  1. Smoke test before merge: download Turbo, run one text-to-image and one edit at standard, and check that the progress bar reaches 8/8 and the result looks right. The unit test mocks the pipeline, so it can't catch an incompatible scheduler or sigma handling at the pinned rev.
  2. Turbo is a distilled checkpoint. A non-empty negative prompt still sets true_cfg_scale = cfgScale, which doubles the compute per step and may hurt quality. Consider hiding the negative prompt and CFG for fixedSteps models, or forcing cfg_scale = 1.0 in the engine.
  3. The downloader follows the HF main revision. If Qwen ever changes the length of sample_sigmas, the hard-coded default_steps=8 (and the "fixed 8-step" validation) will disagree with the real step count. Reading len(sample_sigmas) from the downloaded model_index.json would be more robust. That's optional.
  4. The PR comes from the contributor's fork main branch. That's fine to merge, but follow-ups are easier from a topic branch.

@ph1lb4
ph1lb4 merged commit 9438592 into ph1lb4:main Oct 23, 2026
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.

2 participants