Skip to content

docs(t2i): add Qwen-Image example to text-to-image best practice - #1768

Merged
Yunnglin merged 2 commits into
modelscope:mainfrom
Bruce-Yii:docs/qwen-image-t2i-example
Sep 29, 2026
Merged

Yunnglin merged 2 commits into
modelscope:mainfrom
Bruce-Yii:docs/qwen-image-t2i-example

Conversation

@Bruce-Yii

Copy link
Copy Markdown
Contributor

Summary

The text-to-image best practice (t2i_eval.md) only covers FLUX.1-dev and HiDream-I1-Dev. Qwen-Image is the major domestic open-source text-to-image model, but users have no in-repo example for evaluating it with EvalScope.

This PR adds a Qwen-Image example (zh + en) to the best practice doc, following the existing FLUX.1-dev pattern.

Changes

  • docs/zh/best_practice/t2i_eval.md: Qwen-Image example (Qwen/Qwen-Image, QwenImagePipeline, bfloat16, EvalMuse)
  • docs/en/best_practice/t2i_eval.md: same example in English

Notes on the example parameters:

  • num_inference_steps=50 follows the diffusers QwenImagePipeline default.
  • QwenImagePipeline ignores guidance_scale; classifier-free guidance uses true_cfg_scale + negative_prompt, which are forwarded to the pipeline through generation_config (GenerateConfig allows extra keys, Text2ImageAPI passes model_extra through).

Verification

  • Markdown fences balanced in both files; all Python blocks parse (ast.parse).
  • Docs-only change; no code, no benchmark metadata, no auto-generated files touched.

Fixes #980

@Yunnglin Yunnglin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM — thanks for the clean, well-scoped docs addition (closes #980).

Verified against the diffusers QwenImagePipeline docs and our source:

  • num_inference_steps=50 and true_cfg_scale=4.0 match the pipeline defaults;
  • guidance_scale is indeed a no-op for this pipeline; CFG correctly uses true_cfg_scale + negative_prompt;
  • the true_cfg_scale / negative_prompt passthrough works via generation_config (GenerateConfig extra=allow -> model_extra -> Text2ImageAPI.generate). Because a non-empty generation_config is provided, our default guidance_scale=9.0 is not injected, so the example is safe as written.

Pushed one small follow-up commit (ba5952e) adding the Qwen-Image Technical Report as reference [6] in both zh/en, plus the matching inline [6] marker in the zh intro, so Qwen-Image is cited consistently with FLUX/HiDream. CI is green — merging.

@Yunnglin
Yunnglin merged commit be7df11 into modelscope:main Sep 29, 2026
3 checks passed
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.

文生图的最佳实践文档中增加qwen-image示例

2 participants