← Back to Pull requests

[bugfix] providers: run Z-Image-Turbo text-to-image at 9 steps, no CFG #231

Closed
unknown closed this pull request without merging on Nov 10, 2026 13:58 UTC
View on GitHub
unknown unknown commented on Nov 09, 2026 01:58 UTC
Author

Summary

Z-Image-Turbo text-to-image requests sent no num_inference_steps or guidance_scale, so vLLM-Omni ran 50 steps with CFG at 1.0 instead of the 9 steps without CFG that its recipe uses: about ten times the work per image.

  • application/creation_generation.py: for the vllm-omni-image profile, _parameters fixes num_inference_steps: 9 and guidance_scale: 0.0 in the job's adapterParameters when the job is accepted, and _execution records them.

  • domain/creation/generation.py: ImageExecution gains numInferenceSteps and guidanceScale, left out when unset, so existing records and other profiles keep their shape. src/contracts/ is regenerated.

  • integrations/vllm_omni_image.py: holds the values and sends only what the job's parameters contain, on execution and on recovery. A job accepted before this change has neither and keeps the service defaults. A comment notes that sending them on every job is safe only while this profile takes no reference images.

  • Edits keep sending neither field. Steps stay at the service default because vLLM-Omni starts image-to-image at step int(steps * (1 - strength)), so 9 steps would push each tool's strength toward more noise: with two fixed seeds, an edit at strength 0.78 (what smart edit uses) came back as an unrelated picture at 9 steps and kept the main subject's place and pose at 50. Guidance also stays at the default on edits for now. Turning CFG off there kept the layout in the same check and halved the time, but I have not checked how well edits follow their instruction without CFG, so that is left for a separate change.

  • docs/guides/openai-images.md: notes the two fields, where they are recorded, and why edits do not send them.
  • Linked issue

  • Fixes #230
  • Labels

  • type:bug and area:provider are applied.
  • Test plan

  • Local, on this branch rebased onto main e1f2246a:

  • - tests/test_creation_parameters.py: the image parameter test now checks that a Z-Image-Turbo job records both values and sends them, and that the generic OpenAI-compatible, Qwen-Image-2.1 and Volcengine cases record and send neither.
    - tests/test_vllm_omni_image.py: the canvas test expects both fields on the wire and in the job record. test_queued_job_recovery_sends_the_sampling_fixed_at_acceptance accepts a job, changes the defaults, then recovers it from a new CreationGeneration and checks that the request carries the accepted values, or neither field for a job accepted without them. test_sends_the_sampling_the_job_was_accepted_with checks the same on generate() directly.
    - tests/test_tool_tasks.py (outpaint) checks that the edit form carries neither field.
    - The new checks fail on main and pass with the change, except two that pass on both: the outpaint check and the generate() case without sampling. The other-profile cases fail on main only because its ImageExecution has no such fields.
    - pytest tests: 1583 passed, 98 skipped.
    - lint-imports: 4 contracts kept. python scripts/generate_contracts.py --check: verified. Against main, the contracts only add the two ImageExecution fields.
    - npm run build, npm test (755 passed) and npm run check:i18n: pass, on Node 26.
  • Left to CI: Release checks, including the browser checks I did not run.
  • Evidence that it works

  • Media attached.
  • Tongyi-MAI/Z-Image-Turbo on vLLM-Omni 01bd037 with vLLM 0.33.0, RTX 6000 Ada 48 GB, through OpenDirector's adapter. Same prompt ("A small red fishing boat leaving a quiet harbor at sunrise, lighthouse in the background, cinematic"), seed 7, 1344×768:

    | main: 50 steps, CFG 1.0, 53.4 s | This PR: 9 steps, no CFG, 5.3 s |
    | --- | --- |
    | !main | !this PR |

    An edit at strength 0.6 sends the same fields as before, returns the same image, and takes the same time (33.1 s / 33.8 s).

    Provider verification

  • The run above used a real vLLM-Omni server. It ran on the first revision of this PR, where the adapter added the values when sending; a new job sends the same request now, which the tests above check. I did not rerun it on the GPU after that change or this rebase.
  • Bilingual UI

  • No user-facing copy changed. docs/guides/openai-images.md exists only in Chinese.
  • Diff: 564 lines (+423 / -141) across 7 files Reviewer: twu3202 Review duration: 2160m
    All Vouch review confidence checks passed
    Residual risk 0.24 = Change Risk (0.55) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.55 · 564 lines diff across 7 files
    0.55
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.379
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #231"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 54.7% (MEDIUM) · Higher = larger blast radius
    54.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 23.7% · Safe to merge
    23.7%