Skip to content

[Doc] Add Z-Image Base support and fix Z-Image Turbo parameters#1229

Open
dougbtv wants to merge 1 commit intovllm-project:mainfrom
dougbtv:z-image-base
Open

[Doc] Add Z-Image Base support and fix Z-Image Turbo parameters#1229
dougbtv wants to merge 1 commit intovllm-project:mainfrom
dougbtv:z-image-base

Conversation

@dougbtv
Copy link
Contributor

@dougbtv dougbtv commented Feb 5, 2026

tl;dr: I tried loading up and generating images with z-image base (released last week), but wound up looking at the docs to see if it matched.

Added some docs (assist by claude code)

Let me know if there's anything we want or don't want from it.

Thanks!


Added documentation for Z-Image Base model (Tongyi-MAI/Z-Image) alongside the existing Z-Image Turbo variant. The existing ZImagePipeline already supports both models - this change updates docs to reflect that.

Key changes:

  • Updated supported models list to include both Base and Turbo variants
  • Added comparison table showing differences between Base and Turbo
  • Fixed incorrect Z-Image Turbo example parameters:
    • num_inference_steps: 50 → 8 (Turbo is optimized for 8 steps)
    • cfg_scale (Qwen-specific) → guidance_scale 0.0 (Z-Image Turbo doesn't support CFG)
  • Added z_image_examples.py demonstrating both models with correct parameters
  • Updated quickstart examples to show both model options

Z-Image Base vs Turbo:

  • Base: 28-50 steps, CFG support (guidance_scale 3.0-5.0), negative prompts, fine-tunable
  • Turbo: 8 steps, no CFG (guidance_scale must be 0.0), distilled for speed

Tested Z-Image Base generation: 1280x720, 50 steps, CFG=4.0, negative prompts working.

PLEASE FILL IN THE PR DESCRIPTION HERE ENSURING ALL CHECKLIST ITEMS (AT THE BOTTOM) HAVE BEEN CONSIDERED.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 631ac72d14

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines 36 to 44
OmniDiffusionSamplingParams(
height=1280,
width=720,
num_inference_steps=50,
guidance_scale=4.0,
negative_prompt="blurry, low quality, distorted, oversaturated",
seed=42,

Choose a reason for hiding this comment

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

P2 Badge Pass negative_prompt via prompt dict, not sampling params

This example passes negative_prompt into OmniDiffusionSamplingParams, but that dataclass does not define a negative_prompt field, so constructing it will raise TypeError: __init__() got an unexpected keyword argument 'negative_prompt' at runtime. The rest of the repo (e.g., text_to_image.py) passes negative_prompt in the prompt dict instead, which is what the pipelines read. As written, the base example in this script won’t run unless negative_prompt is moved into the prompt input.

Useful? React with 👍 / 👎.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

great, refactored it to correctly match being packed in a prompt dict.

@dougbtv dougbtv force-pushed the z-image-base branch 2 times, most recently from 255db64 to ceb6da0 Compare February 5, 2026 18:55
Add documentation and examples for Z-Image Base model alongside existing
Z-Image Turbo support.

Changes:
- Add z_image_examples.py with Base vs Turbo comparison examples
- Update quickstart.md with comments distinguishing Base and Turbo
- Update supported_models.md to list both Z-Image variants
- Update text_to_image README with usage examples and comparison table
- Fix negative_prompt to be passed in prompt dict (not sampling params)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: dougbtv <dosmith@redhat.com>
@hsliuustc0106
Copy link
Collaborator

add test result for speed&acc compared with diffusers

Copy link
Contributor

@congw729 congw729 left a comment

Choose a reason for hiding this comment

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

Hi, if you edit a markdown document under ./examples/*, please also run mkdocs serve to sync those editions to ./docs/ before merging this PR.


if __name__ == "__main__":
# Use Z-Image-Turbo for fast inference (8 steps)
# or Z-Image (Base) for higher quality (28-50 steps with CFG support)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we need to modify this file.

--output outputs/coffee_turbo.png
```

### Z-Image Base (High Quality with CFG)
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we add examples for every model, then it will blow up

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.

4 participants