Repository navigation
[Example] Migrate HunyuanImage-3.0 to model_extras + shared task examples - #5559
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
823be9b to
67a95c5
Compare
hsliuustc0106
left a comment
There was a problem hiding this comment.
Inline findings from review of c5ad2e00. Separately, this PR is currently dirty/non-rebaseable against main. Main now contains the shared Hunyuan x_to_text.py path and its own model_extras/hunyuan_image3.py; please preserve build_x_to_text_prompt while resolving the add/add conflict and route comprehension through the shared x-to-text entrypoint rather than retaining the now-duplicated dedicated script.
@hsliuustc0106 Thank you for the detailed review. I verified the findings. Current progress: The P1 issues have been addressed. trust_remote_code now correctly follows the user-provided CLI flag, and I added both CPU integration coverage and GPU E2E coverage for the previously untested get_ar_input_builder → build_ar_stage_inputs → _apply_ar_stage_inputs path. I am rebasing onto the latest main, which includes PR #5384’s shared x_to_text.py path and introduces an add/add conflict in model_extras/hunyuan_image3.py. I will preserve build_x_to_text_prompt and migrate the HunyuanImage3 I2T/T2T flows to the shared entrypoint instead of retaining the duplicated model-specific script. After resolving the rebase and conflicts, I will rerun all affected tests in the GPU environment and update the PR with the results. Thanks again. |
6e88e96 to
f3be876
Compare
## Summary - route vLLM-Omni Direct reviews from the PR title/body to the nearest owner quick entry before closing scope from changed files - add exact HunyuanImage3 `model_extras` and shared-example source anchors - keep PR prose as navigation only; findings still require pinned-diff and live producer-to-consumer evidence This addresses the intent-to-code-map latency improvement proposed in #24 without adding a second routing system. ## Validation - `python knowledge/tools/check_knowledge_tree.py` - `python knowledge/tools/check_wiki_lint.py` - `PYTHONPATH=src python -m pytest test/test_knowledge_source.py test/test_thin_mcp_server.py -q` (`15 passed`) - verified all seven source anchors against `vllm-project/vllm-omni#5559` head `b65d836e`
b65d836 to
a506120
Compare
|
@hsliuustc0106 Following up on my earlier reply — rebase is done and the GPU re-run is complete. Rebased onto latest
KV cache transfer (AR→DiT, Mooncake connector) succeeded on both TP ranks for t2i/it2i, and the AR-only i2t/t2t path (TP=4) initialized and generated without incident. Full details, environment notes, and the remaining known limitations (all pre-existing, unrelated to this PR's code) are in the "Verification" section of the PR description. One honest caveat: the CPU tests from the review-response round are syntax-checked and manually traced but not executed via |
|
Please resolve conflicts first.😊 |
…ples Sub-task of RFC vllm-project#4539. Moves HunyuanImage-3.0-Instruct off its bespoke examples/offline_inference/hunyuan_image3/end2end.py onto declarative model_extras registration + the shared task examples, following PR vllm-project#4225. - Add vllm_omni/model_extras/hunyuan_image3.py: declares EXTRA_BODY_PARAMS (bot_task / use_system_prompt / system_prompt / negative_prompt), the text/image prompt builders, and an ar_input_builder hook; register HunyuanImage3Pipeline in the model_extras registry (+ get_ar_input_builder). - Add prompt_utils.build_ar_prompt_inputs(): one seam wrapping build_prompt_tokens + resolve_stop_token_ids (byte-for-byte HF parity, with a string fallback when no tokenizer is available), reused by the examples. - Wire the shared text_to_image.py / image_edit.py to invoke a model's declared ar_input_builder generically (guarded; models without one are untouched), so HunyuanImage-3.0 t2i / image-editing run through the standard scripts via --extra-body / --extra-args recipes. - Add a --trust-remote-code flag to the shared text_to_image.py / image_edit.py (opt-in, off by default) so custom-code models like HunyuanImage-3.0 load through them; wired into the reproduce script and README recipes. - Keep AR-only comprehension (i2t / t2t) as a slim run_hunyuan_image3_understanding.py (no shared home), mirroring the mammothmoda2 precedent; remove the bespoke end2end.py. - Update example README + example docs page, add reproduce.sh, and add CPU unit tests for the declarations, builders, and the AR seam. - Fix pre-existing broken deploy path in tests/e2e test_hunyuanimage3 (hunyuan_image3.yaml -> hunyuan_image_3_moe.yaml). Signed-off-by: suyanli220 <suyanli220@gmail.com> Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: suyan.li <suyan.li@bytedance.com>
… test GPU verification of the HunyuanImage-3.0 model_extras migration (vllm-project#4544) surfaced two issues, only one of which needs fixing here: - output_formatter.format_diffusion_outputs()'s is_text_output check misclassified any diffusion response as text-only whenever metadata carried a "text" key, even when primary_key was "image" -- HunyuanImage-3.0 (and Bagel, SenseNova-U1) attach supplementary CoT/"think" text to metadata alongside a real image payload, so every think-mode t2i/it2i request silently returned zero images. Confirmed this is already fixed on upstream main (is_text_output keyed off primary_key alone) via a separate commit, so no fix is carried in this PR -- verification below was run with that upstream fix applied locally to unblock testing. - The deep-scan _recover_images_from_outputs/_tensor_to_pil fallback added to text_to_image.py/image_edit.py during earlier debugging (before the above root cause was found) never had a live code path once that bug is fixed: HunyuanImage-3.0's DiT output populates OmniRequestOutput.images through the same default output_formatter path every other diffusers-style model uses. Removed to avoid carrying ~150 lines of unverified heuristics. Also adds a cpu unit test asserting the HunyuanImage3ForCausalMM / HunyuanImage3Pipeline registry aliases stay in sync, covering the model_class_name fix from the prior commit. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: suyanli220 <suyanli220@gmail.com>
…-token contract
Responds to review feedback on this PR:
- P1: _apply_ar_stage_inputs() in text_to_image.py/image_edit.py hardcoded
AutoTokenizer.from_pretrained(model, trust_remote_code=True) regardless
of the user's --trust-remote-code flag. Thread the resolved flag through
instead, so an unset flag behaves like HF's own default (no silent
remote-code execution for whatever --model was passed).
- P1: added CPU integration coverage (test_shared_script_ar_integration.py)
that calls the shared scripts' real _apply_ar_stage_inputs against the
real model_extras registry (not an isolated mock) -- this is exactly the
path where the registry-key bug this PR fixes would have gone undetected.
Added a GPU e2e test (test_shared_script_ar_path_reaches_generation) that
drives get_model_class_name -> get_ar_input_builder ->
_apply_ar_stage_inputs -> Omni.generate() through the real registry,
reusing the en_recaption reference embedding so it also checks output
parity with the hand-constructed path the existing tests use.
- P2: stop_token_ids was broadcast to every non-diffusion-typed stage by
inference ("not a diffusion params instance"). ARStageInputs now declares
stage_indices explicitly (HunyuanImage3's AR stage is always index 0;
the shared scripts apply stop_token_ids by that index, not by type-based
inference that would misfire on a future multi-AR-stage topology.
- P2: added a registry-declared ar_tokenizer_validator hook
(get_ar_tokenizer_validator) that checks a loaded real tokenizer's special
ids against the hardcoded HUNYUAN_IMAGE3_SPECIAL_TOKEN_IDS table and
raises on drift, instead of the request silently completing with the
wrong stop tokens if a model/tokenizer revision ever shifts those ids.
Not wired into build_prompt_tokens/build_ar_stage_inputs themselves,
since those are also called directly with intentionally-mismatched fake
tokenizers in unit tests. Documented (not implemented) two related but
riskier changes we're deferring without live re-verification: failing
fast on any tokenizer-load exception (today: warn + string-prompt
fallback), and pinning a model revision in reproduce.sh (Omni() has no
revision passthrough today).
- Documented the RFC-vs-PR gap on i2t/t2t not having a shared task-level
example yet (examples/offline_inference/hunyuan_image3/ still exists for
run_hunyuan_image3_understanding.py); flagged explicitly in the PR
description rather than silently diverging from RFC vllm-project#4539.
- DCO: fixed (previous commit's --amend dropped the Signed-off-by trailer).
Written and syntax-checked without a live GPU (the rented environment used
for the initial verification pass was released); needs a live run before
merge to confirm the new/modified tests actually pass.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
EOF
)
Signed-off-by: suyanli220 <suyanli220@gmail.com>
princepride
left a comment
There was a problem hiding this comment.
A little recommend, ptal.
Resolves conflicts against upstream main:
- model_extras/registry.py: keep both sides' new entries (main's
Sana{Video,ImageToVideo}Pipeline and this branch's
HunyuanImage3ForCausalMM); drop the MammothModa2 aliases that main
removed, keep the HunyuanImage3Pipeline alias.
- examples/.../image_edit.py: main dropped DiffusionParallelConfig in
favour of passing the parallel args straight to Omni, so the import is
narrowed to `logger` (still used by the AR-tokenizer fallback path).
- tests/model_extras/test_model_extras.py: drop the MammothModa2 tests
that main removed, keep the HunyuanImage3 ones; the "model without the
hook" negative cases now use WanVACEPipeline instead of the
now-unregistered MammothModa2DiTPipeline.
- examples/offline_inference/hunyuan_image3/README.md: keep this
branch's deletion of the model-specific example directory (per RFC
vllm-project#4539); main's edits to it were deploy-YAML renames already reflected
in recipes/Tencent/HunyuanImage-3.0-Instruct.md.
Head branch was pushed to by a user without write access
Omni ReviewBot triage noteAutomated triage of commit
These are automated triage suggestions only — the final decision belongs to the maintainers. |
Resolves conflicts against upstream main: - vllm_omni/model_extras/registry.py: keep both sides' new alias entries (this branch's HunyuanImage3Pipeline -> HunyuanImage3ForCausalMM alias, main's MammothModa2ForConditionalGeneration/Mammothmoda2Model -> MammothModa2DiTPipeline aliases). - tests/model_extras/test_model_extras.py: keep both sides' tests (this branch's HunyuanImage3 registry/AR-seam/x_to_text tests, main's MammothModa2 registry/prompt-builder tests), restoring the @pytest.mark.core_model / @pytest.mark.cpu decorators that the conflict boundary split away from the second test in each pair. - examples/offline_inference/hunyuan_image3/ and examples/offline_inference/image_to_image/image_edit.py: already resolved by fast-forwarding this branch to its actual current remote tip before re-merging (local clone was stale by 91 commits). Signed-off-by: suyanli220 <suyanli220@gmail.com> Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ViQ6w45mJNu4yiQVCck8o
Per review: HunyuanImage3's build_image_to_image_prompt only added modalities=["image"] on top of registry.py's default_image_to_image_prompt, and image_edit.py's _apply_ar_stage_inputs overwrites prompt_dict["modalities"] from the AR builder immediately afterwards anyway. The shared script is also the builder's only production caller, and it always runs _apply_ar_stage_inputs for this model since the same registry spec declares ar_input_builder -- so falling back to the default builder is behaviour-preserving. Matches the cosmos3/LingBot precedent and this PR's earlier removal of the now-redundant text_to_image_prompt_builder. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xp6uzMMFy11qUTMZ5rQi4B Signed-off-by: suyanli220 <suyanli220@gmail.com>
Head branch was pushed to by a user without write access
CI (buildkite/vllm-omni #14959, "Simple · Other Test") failed both
parametrizations of test_apply_ar_stage_inputs_routes_through_real_registry
with:
AttributeError: 'OmniDiffusionSamplingParams' object has no attribute
'stop_token_ids'
The assertion read `diffusion_params.stop_token_ids is None`, but
OmniDiffusionSamplingParams is a plain dataclass with no such field, so
reading the attribute raises instead of returning None.
The implementation is correct and this makes the test say so:
_apply_ar_stage_inputs skips the diffusion stage via
`not isinstance(stage_params, OmniDiffusionSamplingParams) and
hasattr(stage_params, "stop_token_ids")`, so the attribute is never
created. Assert absence with hasattr -- had the helper wrongly set it,
the old form would have passed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: suyanli220 <suyanli220@gmail.com>
CI (buildkite/vllm-omni #14959, "Simple · Engine&Entrypoints Test")
failed test_image_edits_omitted_bot_task_stop_tokens_match_prompt_default
with stop_token_ids == [] instead of [</think>, </recaption>].
The test exercised POST /v1/images/edits, but that route lives in
api_server.py, which never calls resolve_stop_token_ids at all -- the
file contains no stop_token_ids reference -- so the AR stage keeps
SamplingParams' default empty list. `[]` is "never set", not "set
wrongly": the omitted-bot_task fix landed in serving_chat.py, the only
production caller of resolve_stop_token_ids.
Add the regression test against _build_multistage_generation_inputs,
which is the code the fix changed. It asserts an omitted bot_task
resolves the same stop tokens as passing the default explicitly:
resolve_stop_token_ids(task="it2i", image_size="512x512")
-> [128024, 128019] # </think>, </recaption>
resolve_stop_token_ids(task="it2i", bot_task="think", ...)
-> [128024, 128019] # same
resolve_stop_token_ids(task="it2i", bot_task=None, ...)
-> 37 <img_ratio_*> ids # what the bug produced
use_system_prompt carries the request into the AR block, whose gate is
`bot_task is not None or use_system_prompt is not None or
custom_system_prompt is not None` -- the images/edits test passed
neither, so it could not have entered that path on any route.
Mark the images/edits test xfail(strict=True) rather than delete it: the
gap it documents is real and pre-existing, but closing it needs a
tokenizer in that scope plus a decision on whether HunyuanImage3 it2i
should resolve AR stop tokens unconditionally. Tracked separately.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: suyanli220 <suyanli220@gmail.com>
67eda8e to
8929dd4
Compare
* [Bugfix][Examples] Use --profiler-config flag in offline TTS examples (vllm-project#6763) Signed-off-by: Asthenia <asthenia0412@gmail.com> Co-authored-by: Asthenia <asthenia0412@gmail.com> * [Bugfix] Skip HWR store-size scans when no limit is configured (vllm-project#7131) Signed-off-by: Hongsheng Liu <liuhongsheng4@huawei.com> * [CI][ROCm] Route LTX2 Ulysses parity to two-GPU lane (vllm-project#7234) Signed-off-by: andyluo7 <andy.luo@amd.com> * [Bugfix][Model] GR00T-N1.7: honor the per-request seed for flow-matching noise (vllm-project#7253) Signed-off-by: liangmengh <liangmengh@nvidia.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> * Add vLLM-Omni library info to Hugging Face Hub requests (vllm-project#5381) Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> * [Bugfix][NPU] Limit MiniMax H3 modulation grid size (vllm-project#6794) Signed-off-by: KrystalRay <keeleiray@gmail.com> Co-authored-by: KrystalRay <keeleiray@gmail.com> * [Bugfix] Build the forced-aligner prompt without a chat template (word timestamps one bin late) (vllm-project#7240) Signed-off-by: Tianyao Wu <rayroy31@gmail.com> * [Refactor][Diffusion] Resolve offload topology through one plan resolver (vllm-project#7209) Signed-off-by: specture724 <specture724@gmail.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> * [Doc] Add AI usage policy for contributions (vllm-project#7305) Signed-off-by: hsliuustc0106 <liuhongsheng4@huawei.com> * [Bugfix][MiMo-Audio] Align code2wav decode with tokenizer device (vllm-project#6539) Signed-off-by: chaosansui <zzc15560846421@163.com> Signed-off-by: Zhichao Zhang <60429419+smartDream-chao@users.noreply.github.com> * [Bugfix][MiniCPM-o] Fix the audio_embeds input path (vllm-project#5730) Signed-off-by: eval-dev <0xe5bca0@gmail.com> Signed-off-by: eval <74645252+eval-dev@users.noreply.github.com> * [Feat][OmniVoice]Support Varlen Attn, Request-Batch and Step-Execution (vllm-project#6408) Signed-off-by: boatman <109857087+sphinxkkkbc@users.noreply.github.com> * [Model] Add Audio8 TTS Preview 0.6B (DualAR, 44.1 kHz codec) (vllm-project#6157) Signed-off-by: NancyFyong <NancyFyong@users.noreply.github.com> Co-authored-by: NancyFyong <NancyFyong@users.noreply.github.com> * [Bugfix][Frontend] Accept the msgpack-numpy package's numpy markers on the OpenPI endpoint (vllm-project#6051) Signed-off-by: zjli2013 <leezhengjiang@126.com> Co-authored-by: Cursor <cursoragent@cursor.com> * [Frontend] Opt-in WebSocket TTS split_granularity and session seed (vllm-project#7046) Signed-off-by: rk9595 <rakesh.kariya@somaiya.edu> Signed-off-by: Rakesh Kariya <rakesh.kariya@somaiya.edu> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> * [Bugfix][Frontend] Clear the P0 multimodal cache through the renderer (vllm-project#7003) Signed-off-by: ZenAlexa <zimingwang945@gmail.com> * [Bugfix][Frontend] Enforce image pixel limits for video input references (vllm-project#6963) Signed-off-by: BANANASJIM <bananasjim1@gmail.com> * [Bugfix][TTS] Isolate shared Higgs v3 reference encode from request cancellation (vllm-project#7076) Signed-off-by: Allen Wu <allenwu2795@gmail.com> Co-authored-by: TRAE CLI <traecli@bytedance.com> * [Bugfix][CosyVoice3] Resolve hash snapshot pipeline (vllm-project#6896) Signed-off-by: xutianle <xutianle@fudan.edu.cn> * [CI] Skip Qwen3-Omni Server VAD multi-turn realtime test (vllm-project#7279) (vllm-project#7314) Signed-off-by: wangyu <410167048@qq.com> * [Bugfix][Magi2] Allow import without an active Triton driver (vllm-project#7239) Signed-off-by: andyluo7 <andy.luo@amd.com> * [Core] Split Omni connector model runner mixin (vllm-project#6903) Signed-off-by: natureofnature <wzliu@connect.hku.hk> * [Bugfix] Make LTX vocoder decoding deterministic (vllm-project#7231) Signed-off-by: mglyn <1203789601@qq.com> * [Doc] [Recipe] Add FLUX.1-schnell recipe for RTX 5090 32GB (vllm-project#7299) Signed-off-by: Sparks-M <41097544+Sparks-M@users.noreply.github.com> * [Doc] Qwen3-TTS: add 0.6B on 1x A100 40GB (vllm-project#7289) Signed-off-by: chi030303 <106855944+chi030303@users.noreply.github.com> * [Perf][Model] Add optimized LTX-2.5 DiffVAE operators (vllm-project#7308) Signed-off-by: mglyn <1203789601@qq.com> * [2/N] Add a minimal temporal chunk callback for MiniMax-H3 (vllm-project#7017) Signed-off-by: specture724 <specture724@gmail.com> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> * [Feature][Diffusion] Expose detailed pipeline timings (vllm-project#6822) Signed-off-by: Bo Li <22713281+bobboli@users.noreply.github.com> * [Bugfix] Resolve vllm-project#6931 hub FA3 on torch 2.13 via kernels 0.16.1 (vllm-project#7185) Signed-off-by: NumberWan <wantszkin2003@gmail.com> * [Bugfix][Ascend] fix npu 310/a5 bugs (vllm-project#6685) Signed-off-by: zouyizhou <zouyizhou@huawei.com> * [Bugfix][Engine] Group overlapping device stages into one sequential init component (vllm-project#7328) Signed-off-by: ZhengWG <zwg0606@gmail.com> Co-authored-by: amy-why-3459 <wuhaiyan17@huawei.com> * fix: reserve Qwen3-Omni NVFP4 backend fix (vllm-project#7200) Signed-off-by: kunkunblueberry <1833921874@qq.com> * [BugFix] Add field validators for /v1/audio/generate request (vllm-project#4741) Signed-off-by: Shaun Walsh <shaunwalsh24@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Nick Cao <ncao@redhat.com> * [CI][ROCm] Match CUDA/NPU L2/L3 label routing (vllm-project#6966) Signed-off-by: andyluo7 <andy.luo@amd.com> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com> * [CI/Build] Avoid duplicate stage CLI deploy config (vllm-project#7007) Signed-off-by: mershi <mershi@tencent.com> Co-authored-by: mershi <mershi@tencent.com> * [CI/Build][ROCm] Normalize SenseNova paged-decode hardware markers (vllm-project#6935) Signed-off-by: andyluo7 <andy.luo@amd.com> * [Model] Skip unused frame packing in Wan2.2 S2V (vllm-project#7155) Signed-off-by: hyw <yuweih205@gmail.com> * [Doc] Add dual DGX Spark MiniMax-H3 results (vllm-project#7343) Signed-off-by: bojiang-li <327132355+bojiang-li@users.noreply.github.com> * [Model] Optimize MOSS-TTS Local batched execution and streaming codec (vllm-project#7202) Signed-off-by: Sy03 <1370724210@qq.com> * [Bugfix][XPU] Restore N-D output shape for W8A16 FP8 linear (vllm-project#7301) Signed-off-by: Joshna Medisetty <joshna.medisetty@intel.com> Signed-off-by: Joshna-Medisetty <joshna.medisetty@intel.com> * [Doc] Document num_outputs_per_prompt for /v1/videos (vllm-project#7341) Signed-off-by: Guangjian <hiro20833@gmail.com> * [Skills] Add perf-evidence isolation, stage-attribution, and realtime-contract requirements (vllm-project#6820) Signed-off-by: hsliu_ustc <hsliu_ustc@noreply.gitcode.com> Co-authored-by: hsliu_ustc <hsliu_ustc@noreply.gitcode.com> * [Bugfix] Allow LLM replicas on different GPUs to initialize concurrently (vllm-project#7292) Signed-off-by: Gao Han <hgaoaf@connect.ust.hk> Co-authored-by: amy-why-3459 <wuhaiyan17@huawei.com> * [CI/Build] Stabilize LTX2 vocoder autocast test on ROCm (vllm-project#7336) Signed-off-by: andyluo7 <andy.luo@amd.com> * [NPU][CI] Add A5 and 310P CI support (vllm-project#6875) Signed-off-by: Weiming Liao <liaowm5@gmail.com> Co-authored-by: wangyu <53896905+yenuo26@users.noreply.github.com> * [Kernel] Enable LTX DiffVAE fusions on SM100 and SM103 (vllm-project#7350) Signed-off-by: mglyn <1203789601@qq.com> * [Bugfix][MiniCPM-o] Align structured chat content with native omni rendering (vllm-project#7344) Signed-off-by: Sy03 <1370724210@qq.com> * [Rebase] Rebase to vLLM 0.29.0 (vllm-project#7230) Signed-off-by: tzhouam <tzhouam@connect.ust.hk> Signed-off-by: Zhou Taichang <tzhouam@connect.ust.hk> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> * [Refactor] P0.2: Migrate API server helpers out of api_server (vllm-project#5453) Signed-off-by: herotai214 <herotai214@gmail.com> * [CI] Stabilize Qwen3-Omni Server VAD E2E (vllm-project#7356) Signed-off-by: LHXuuu <xulianhao.xlh@antgroup.com> Co-authored-by: amy-why-3459 <wuhaiyan17@huawei.com> * [CI/Build] Diff-aware source_file_dependencies for CUDA/NPU pipelines (vllm-project#6597) Signed-off-by: wangyu <410167048@qq.com> Co-authored-by: Cursor <cursoragent@cursor.com> * [Core][Diffusion] Add a typed pre-D2H video media contract (vllm-project#6615) Signed-off-by: NancyFyong <NancyFyong@users.noreply.github.com> Signed-off-by: Samit <285365963@qq.com> Co-authored-by: NancyFyong <NancyFyong@users.noreply.github.com> Co-authored-by: Samit <285365963@qq.com> * [Bugfix] Bound HWR domain initialization lock waits (vllm-project#7128) Signed-off-by: Hongsheng Liu <liuhongsheng4@huawei.com> * [Bugfix] Escalate diffusion worker shutdown and retain survivors (vllm-project#7126) Signed-off-by: Hongsheng Liu <liuhongsheng4@huawei.com> * [Misc] Add standalone safetensors retention diagnostic (vllm-project#7145) Signed-off-by: Hongsheng Liu <liuhongsheng4@huawei.com> * [CI] Isolate layerwise offload memory measurements (vllm-project#6938) Signed-off-by: andyluo7 <andy.luo@amd.com> * [Model] Add Cosmos3 mixed W8A8/W8A16 and W4A4/W4A16 denoising (vllm-project#6560) Signed-off-by: Rahul Steiger <rsteiger@aws-cmh-slurm-1-vscode-04.cm.cluster> Signed-off-by: Wojciech Kutak <wkutak@nvidia.com> Co-authored-by: Rahul Steiger <rsteiger@nvidia.com> * [Test] Use public render_jinja_template in MiniCPM-o native template test (vllm-project#7362) Signed-off-by: tly <2200895168@qq.com> * [Bugfix] Fix video prewarm cache retention and cancel-restart delay (vllm-project#7363) Signed-off-by: psv666 <2693925048@qq.com> * Cosmos3 action policy improvements (vllm-project#6460) Signed-off-by: Maciej Bala <mbala@nvidia.com> Signed-off-by: MaciejBalaNV <mbala@nvidia.com> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com> * [BugFix][CI] Restore diff-aware source filtering for post-merge L3 (vllm-project#7371) Signed-off-by: wangyu <410167048@qq.com> * [Bugfix] Fail when a diffusion LoRA adapter binds no layer (vllm-project#7349) Signed-off-by: Guangjian <hiro20833@gmail.com> * [Bugfix] Fix host-memory leak on aborted /v1/images/generations (vllm-project#6462) (vllm-project#6561) Signed-off-by: summer <128961079+zhang-keliang@users.noreply.github.com> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com> * [Refactor] Declare model-local KV held outside the paged manager (vllm-project#6171) Signed-off-by: Yueqian Lin <linyueqian@outlook.com> * [Realtime] Emit current (non-beta) OpenAI audio/transcript event names (vllm-project#7339) Signed-off-by: Nick Cao <ncao@redhat.com> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> * [Bugfix][Core] Clean up failed HWR atomic metadata writes (vllm-project#6956) Signed-off-by: BANANASJIM <bananasjim1@gmail.com> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com> * [Bugfix] Keep MiniMax-H3 reference audio budgets separate (vllm-project#7281) Signed-off-by: david6666666 <530634352@qq.com> * [Bugfix] Fix Helios USP: per-component split for correct sequence parallelism (vllm-project#6930) Signed-off-by: yancaocn <yancaochn@163.com> Co-authored-by: yancaocn <yancaochn@163.com> * [Perf][Diffusion] Optimize HSDP startup via Rank-0 shared weight loading and accelerated LoRA delta computation (vllm-project#7005) Signed-off-by: samithuang <285365963@qq.com> * [Example] Migrate HunyuanImage-3.0 to model_extras + shared task examples (vllm-project#5559) Signed-off-by: suyanli220 <suyanli220@gmail.com> Signed-off-by: suyan.li <suyan.li@bytedance.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: suyan.li <suyan.li@bytedance.com> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com> * [Model] Avoid scalar synchronizations in GLM-Image preparation (vllm-project#7172) Signed-off-by: hyw <yuweih205@gmail.com> * [Model][ERNIE-Image] Delay AdaLN modulation broadcast (vllm-project#7171) Signed-off-by: hyw <yuweih205@gmail.com> * [Kernel][MiniMax-H3] Run Q/K RMSNorm-RoPE in one launch (vllm-project#7167) Signed-off-by: hyw <yuweih205@gmail.com> * [CI][ROCm] Align AMD image with vLLM 0.29 (vllm-project#7395) Signed-off-by: andyluo7 <andy.luo@amd.com> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com> * [Bugfix] Add embed_multimodal to MiniCPM-o 4.5 omni LLM class (vllm-project#7384) Signed-off-by: Guangjian <hiro20833@gmail.com> * [Model] Add LingBot World Ulysses sequence parallelism (vllm-project#6841) Signed-off-by: wtz2333 <2955110911@qq.com> Co-authored-by: Zhou Taichang <tzhouam@connect.ust.hk> * [Feature][TTS] Add Speech API streaming metrics (vllm-project#6853) Signed-off-by: XIN GAO <1037396230@qq.com> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com> * [Bugfix][Model] Fix FLUX.2 Klein multi-image edit metadata (vllm-project#7430) Signed-off-by: QI JIA <qi.jia@shengshu.ai> Co-authored-by: QI JIA <qi.jia@shengshu.ai> Co-authored-by: Cursor <cursoragent@cursor.com> * [BugFix] Fix leftovers of the legacy OpenAI realtime API event names (vllm-project#7426) Signed-off-by: Nick Cao <ncao@redhat.com> Co-authored-by: Codex <noreply@openai.com> * [Model] Add Tencent AuK speech generation and editing (encoder + diffusion pipeline) (vllm-project#7385) Signed-off-by: Yueqian Lin <linyueqian@outlook.com> Co-authored-by: Sy03 <1370724210@qq.com> * [XPU][Docker] Align XPU image and CI with vLLM v0.29.0 (vllm-project#7441) Signed-off-by: Joshna-Medisetty <joshna.medisetty@intel.com> * [Bugfix] Add explicit error when using CFGP with distilled Cosmos3 models (vllm-project#7427) Signed-off-by: Maciej Bala <mbala@nvidia.com> * [Perf][Diffusion] Run MammothModa2 DiT attention through the shared attention layer (vllm-project#7094) Signed-off-by: MrlixiangWE <mrdanaer@gmail.com> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com> * [Bugfix] Give model CLI flags typed owners in the Omni config (vllm-project#7390) Signed-off-by: Guangjian <hiro20833@gmail.com> Co-authored-by: amy-why-3459 <wuhaiyan17@huawei.com> * [Bugfix] Require a model for `vllm serve --omni` (fixes vllm-project#4158) (vllm-project#4167) Signed-off-by: abinggo <107740309+abinggo@users.noreply.github.com> * [Bugfix] Send a downstream terminal chunk when a parked stage ends (vllm-project#6889) Signed-off-by: psv666 <2693925048@qq.com> * [NPU] upgrade to v0.29.0 (vllm-project#7433) Signed-off-by: Weiming Liao <liaowm5@gmail.com> * [Bugfix][Model][Lance] Support decoded video frames in video editing (vllm-project#5128) Signed-off-by: 吴俊鹏 <248679769+junpengw67-max@users.noreply.github.com> Co-authored-by: 吴俊鹏 <248679769+junpengw67-max@users.noreply.github.com> * [Refactor][Diffusion] Remove model-specific names from LoRA and ModelOpt loader defaults (vllm-project#5907) Signed-off-by: Alicia <115451386+congw729@users.noreply.github.com> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com> * Optimize CosyVoice3 Stage1 flow batching (vllm-project#4876) Signed-off-by: gerayking <399geray@gmail.com> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com> * [3/N] Encode streamed video on the worker with bounded batching (vllm-project#7018) Signed-off-by: specture724 <specture724@gmail.com> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com> * [Kernel][Boogu-Image] Fuse Q/K RMSNorm + interleaved RoPE via fused_qk_norm_rope (vllm-project#6982) Signed-off-by: Qihan Kang <rollykanggg@gmail.com> * [Bugfix][Frontend] Honor output_compression on the image generations route (vllm-project#7447) Signed-off-by: hsliu_ustc <hsliu_ustc@noreply.gitcode.com> Signed-off-by: amy-why-3459 <wuhaiyan17@huawei.com> Co-authored-by: amy-why-3459 <wuhaiyan17@huawei.com> --------- Signed-off-by: Asthenia <asthenia0412@gmail.com> Signed-off-by: Hongsheng Liu <liuhongsheng4@huawei.com> Signed-off-by: andyluo7 <andy.luo@amd.com> Signed-off-by: liangmengh <liangmengh@nvidia.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Signed-off-by: KrystalRay <keeleiray@gmail.com> Signed-off-by: Tianyao Wu <rayroy31@gmail.com> Signed-off-by: specture724 <specture724@gmail.com> Signed-off-by: hsliuustc0106 <liuhongsheng4@huawei.com> Signed-off-by: chaosansui <zzc15560846421@163.com> Signed-off-by: Zhichao Zhang <60429419+smartDream-chao@users.noreply.github.com> Signed-off-by: eval-dev <0xe5bca0@gmail.com> Signed-off-by: eval <74645252+eval-dev@users.noreply.github.com> Signed-off-by: boatman <109857087+sphinxkkkbc@users.noreply.github.com> Signed-off-by: NancyFyong <NancyFyong@users.noreply.github.com> Signed-off-by: zjli2013 <leezhengjiang@126.com> Signed-off-by: rk9595 <rakesh.kariya@somaiya.edu> Signed-off-by: Rakesh Kariya <rakesh.kariya@somaiya.edu> Signed-off-by: ZenAlexa <zimingwang945@gmail.com> Signed-off-by: BANANASJIM <bananasjim1@gmail.com> Signed-off-by: Allen Wu <allenwu2795@gmail.com> Signed-off-by: xutianle <xutianle@fudan.edu.cn> Signed-off-by: wangyu <410167048@qq.com> Signed-off-by: natureofnature <wzliu@connect.hku.hk> Signed-off-by: mglyn <1203789601@qq.com> Signed-off-by: Sparks-M <41097544+Sparks-M@users.noreply.github.com> Signed-off-by: chi030303 <106855944+chi030303@users.noreply.github.com> Signed-off-by: Bo Li <22713281+bobboli@users.noreply.github.com> Signed-off-by: NumberWan <wantszkin2003@gmail.com> Signed-off-by: zouyizhou <zouyizhou@huawei.com> Signed-off-by: ZhengWG <zwg0606@gmail.com> Signed-off-by: kunkunblueberry <1833921874@qq.com> Signed-off-by: Shaun Walsh <shaunwalsh24@gmail.com> Signed-off-by: mershi <mershi@tencent.com> Signed-off-by: hyw <yuweih205@gmail.com> Signed-off-by: bojiang-li <327132355+bojiang-li@users.noreply.github.com> Signed-off-by: Sy03 <1370724210@qq.com> Signed-off-by: Joshna Medisetty <joshna.medisetty@intel.com> Signed-off-by: Joshna-Medisetty <joshna.medisetty@intel.com> Signed-off-by: Guangjian <hiro20833@gmail.com> Signed-off-by: hsliu_ustc <hsliu_ustc@noreply.gitcode.com> Signed-off-by: Gao Han <hgaoaf@connect.ust.hk> Signed-off-by: Weiming Liao <liaowm5@gmail.com> Signed-off-by: tzhouam <tzhouam@connect.ust.hk> Signed-off-by: Zhou Taichang <tzhouam@connect.ust.hk> Signed-off-by: herotai214 <herotai214@gmail.com> Signed-off-by: LHXuuu <xulianhao.xlh@antgroup.com> Signed-off-by: Samit <285365963@qq.com> Signed-off-by: Rahul Steiger <rsteiger@aws-cmh-slurm-1-vscode-04.cm.cluster> Signed-off-by: Wojciech Kutak <wkutak@nvidia.com> Signed-off-by: tly <2200895168@qq.com> Signed-off-by: psv666 <2693925048@qq.com> Signed-off-by: Maciej Bala <mbala@nvidia.com> Signed-off-by: MaciejBalaNV <mbala@nvidia.com> Signed-off-by: summer <128961079+zhang-keliang@users.noreply.github.com> Signed-off-by: Yueqian Lin <linyueqian@outlook.com> Signed-off-by: Nick Cao <ncao@redhat.com> Signed-off-by: david6666666 <530634352@qq.com> Signed-off-by: yancaocn <yancaochn@163.com> Signed-off-by: samithuang <285365963@qq.com> Signed-off-by: suyanli220 <suyanli220@gmail.com> Signed-off-by: suyan.li <suyan.li@bytedance.com> Signed-off-by: wtz2333 <2955110911@qq.com> Signed-off-by: XIN GAO <1037396230@qq.com> Signed-off-by: QI JIA <qi.jia@shengshu.ai> Signed-off-by: MrlixiangWE <mrdanaer@gmail.com> Signed-off-by: abinggo <107740309+abinggo@users.noreply.github.com> Signed-off-by: 吴俊鹏 <248679769+junpengw67-max@users.noreply.github.com> Signed-off-by: Alicia <115451386+congw729@users.noreply.github.com> Signed-off-by: gerayking <399geray@gmail.com> Signed-off-by: Qihan Kang <rollykanggg@gmail.com> Signed-off-by: amy-why-3459 <wuhaiyan17@huawei.com> Signed-off-by: José Carlos <jose@valendra.tech> Co-authored-by: Yancy <138764723+Asthenia0412@users.noreply.github.com> Co-authored-by: Asthenia <asthenia0412@gmail.com> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com> Co-authored-by: andyluo7 <43718156+andyluo7@users.noreply.github.com> Co-authored-by: liangmenghuang <liangmengh@nvidia.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Lei Ke <1141466880@qq.com> Co-authored-by: KrystalRay <keeleiray@gmail.com> Co-authored-by: Tianyao Wu <54675599+twu3202@users.noreply.github.com> Co-authored-by: Anjie Hou <149605198+specture724@users.noreply.github.com> Co-authored-by: Zhichao Zhang <60429419+smartDream-chao@users.noreply.github.com> Co-authored-by: eval <74645252+eval-dev@users.noreply.github.com> Co-authored-by: boatman <1930807094@qq.com> Co-authored-by: NancyFyong <88076188+NancyFyong@users.noreply.github.com> Co-authored-by: NancyFyong <NancyFyong@users.noreply.github.com> Co-authored-by: zhengjia <ZJLi2013@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Rakesh Kariya <83279947+rk9595@users.noreply.github.com> Co-authored-by: Ziming Wang <125807850+ZenAlexa@users.noreply.github.com> Co-authored-by: Jim Ban <77719403+BANANASJIM@users.noreply.github.com> Co-authored-by: Allen Wu <85376543+EchoHayate@users.noreply.github.com> Co-authored-by: TRAE CLI <traecli@bytedance.com> Co-authored-by: xutianle <24210290017@m.fudan.edu.cn> Co-authored-by: wangyu <53896905+yenuo26@users.noreply.github.com> Co-authored-by: NATURE <wzliu@connect.hku.hk> Co-authored-by: Mu GuanLin <1203789601@qq.com> Co-authored-by: Sparks <41097544+Sparks-M@users.noreply.github.com> Co-authored-by: chi030303 <106855944+chi030303@users.noreply.github.com> Co-authored-by: Bo Li <22713281+bobboli@users.noreply.github.com> Co-authored-by: NumberWan <wantszkin2003@gmail.com> Co-authored-by: zyz111222 <zouyizhou@huawei.com> Co-authored-by: Zheng Wengang <zwg0606@gmail.com> Co-authored-by: amy-why-3459 <wuhaiyan17@huawei.com> Co-authored-by: kunkun <72174834+kunkunblueberry@users.noreply.github.com> Co-authored-by: Shaun Walsh <153730091+Shaun-Walsh@users.noreply.github.com> Co-authored-by: Nick Cao <ncao@redhat.com> Co-authored-by: shiyichuan <93317314+CarrotSwordsman@users.noreply.github.com> Co-authored-by: mershi <mershi@tencent.com> Co-authored-by: hyw <109567717+yuweih205@users.noreply.github.com> Co-authored-by: bojiang-li <327132355+bojiang-li@users.noreply.github.com> Co-authored-by: Sy03 <1370724210@qq.com> Co-authored-by: Joshna-Medisetty <joshna.medisetty@intel.com> Co-authored-by: Guangjian Dong <163994576+Hiro208@users.noreply.github.com> Co-authored-by: hsliu_ustc <hsliu_ustc@noreply.gitcode.com> Co-authored-by: Gao Han <hgaoaf@connect.ust.hk> Co-authored-by: Weiming Liao <liaowm5@gmail.com> Co-authored-by: Zhou Taichang <tzhouam@connect.ust.hk> Co-authored-by: herotai214 <68222888+herotai214@users.noreply.github.com> Co-authored-by: LHXuuu <xulianhao.xlh@antgroup.com> Co-authored-by: Samit <285365963@qq.com> Co-authored-by: wkutak <wkutak@nvidia.com> Co-authored-by: Rahul Steiger <rsteiger@nvidia.com> Co-authored-by: tlysanhuo <166924864+tlysanhuo@users.noreply.github.com> Co-authored-by: psv666 <150513104+psv666@users.noreply.github.com> Co-authored-by: MaciejBalaNV <mbala@nvidia.com> Co-authored-by: summer <128961079+zhang-keliang@users.noreply.github.com> Co-authored-by: Yueqian Lin <70319226+linyueqian@users.noreply.github.com> Co-authored-by: WeiQing Chen <40507679+david6666666@users.noreply.github.com> Co-authored-by: Yan Cao <31481315+yancaocn@users.noreply.github.com> Co-authored-by: yancaocn <yancaochn@163.com> Co-authored-by: SuyanLi <126558907+suyanli220@users.noreply.github.com> Co-authored-by: suyan.li <suyan.li@bytedance.com> Co-authored-by: wtz2333 <2955110911@qq.com> Co-authored-by: GXIN <37653830+gxxx-hum@users.noreply.github.com> Co-authored-by: Qi Jia <kuafou@gmail.com> Co-authored-by: QI JIA <qi.jia@shengshu.ai> Co-authored-by: Codex <noreply@openai.com> Co-authored-by: DanaerLee <mrdanaer@gmail.com> Co-authored-by: longguo <107740309+abinggo@users.noreply.github.com> Co-authored-by: junpengw67-max <junpengw67@gmail.com> Co-authored-by: 吴俊鹏 <248679769+junpengw67-max@users.noreply.github.com> Co-authored-by: Alicia <115451386+congw729@users.noreply.github.com> Co-authored-by: geray <48796550+gerayking@users.noreply.github.com> Co-authored-by: KANG Qihan <3149604185@qq.com>
…ples (vllm-project#5559) Signed-off-by: suyanli220 <suyanli220@gmail.com> Signed-off-by: suyan.li <suyan.li@bytedance.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: suyan.li <suyan.li@bytedance.com> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
[Example] Migrate HunyuanImage-3.0 to model_extras + shared task examples
Closes #4544 (sub-task of RFC #4539).
Summary
Moves HunyuanImage-3.0-Instruct's standard four-modality path off bespoke
per-model scripts onto declarative
model_extrasregistration + the sharedtask examples (
text_to_image.py/image_edit.py/x_to_text.py),following the MammothModa2 precedent from #4225.
vllm_omni/model_extras/hunyuan_image3.py: declaresEXTRA_BODY_PARAMS(bot_task/use_system_prompt/system_prompt/negative_prompt), the text/image prompt builders, and anar_input_builderhook.prompt_utils.build_ar_prompt_inputs(): one seam wrappingbuild_prompt_tokens+resolve_stop_token_ids(byte-for-byte HF parity,with a string fallback when no tokenizer is available), reused by the
examples and the OpenAI server.
text_to_image.py/image_edit.pyto invoke a model'sdeclared
ar_input_buildergenerically (guarded; models without one areuntouched).
--trust-remote-codeto the shared scripts (opt-in, off by default).examples/offline_inference/x_to_text/x_to_text.pyentrypoint (see"Rebase onto upstream/main" below).
examples/offline_inference/hunyuan_image3/entirely (end2end.py,reproduce.sh, README, and its auto-generated docs page); consolidates allusage documentation into
recipes/Tencent/HunyuanImage-3.0-Instruct.md.RFC #4539 asks for model-specific example directories to collapse into
task-level examples. All four modalities now do: t2i/it2i via
text_to_image.py/image_edit.py, i2t/t2t via the sharedx_to_text.py,and
examples/offline_inference/hunyuan_image3/no longer has any dedicatedscript or docs page.
end2end.py's streaming chain-of-thought display anddiffusion KV-cache dtype / skip-steps controls have no equivalent in the
shared examples yet -- accepted as a known gap rather than a reason to keep
the directory, matching every other already-migrated model in the RFC (see
"Second rebase" below for how this played out across review).
recipes/Tencent/HunyuanImage-3.0-Instruct.mdis the single documentationhome for run commands, deploy-config selection, and hardware notes.
A real bug found and fixed during GPU verification
Found by actually running the migrated path end-to-end on 4×H200 — not
visible from reading the diff alone.
registry.pyoriginally registered HunyuanImage3'sextra_body_params/ar_input_builderunder"HunyuanImage3Pipeline"— the diffusers pipelineclass name. But
od_config.model_class_nameat runtime is"HunyuanImage3ForCausalMM"(the diffusion-registry arch key set byvllm_omni/model_executor/models/hunyuan_image3/pipeline.pyand consumed viavllm_omni/config/stage_config.py'sengine_args.setdefault("model_class_name", ps.model_arch)).The old key never matched at runtime, so
extra_bodyrouting(
bot_task/use_system_prompt/negative_prompt) and thear_input_builderlookup were silent no-ops — the entire declarativerouting this migration adds would never have fired.
Fixed by re-keying the spec to
"HunyuanImage3ForCausalMM", keeping"HunyuanImage3Pipeline"as a compatibility alias for any path thatsurfaces the pipeline class name instead. Covered by a new regression test:
test_hunyuan_image3_extra_registry_matches_runtime_model_class_name.Also found (already fixed on main — no change carried here)
GPU verification also hit
ValueError: No images found in request_outputon every think-mode t2i/it2i request, traced to
output_formatter.format_diffusion_outputs():is_text_output = postprocess_output.primary_key == "text" or "text" in postprocess_output.metadata.HunyuanImage-3.0's DiT
post_decode()attaches the AR's chain-of-thoughttext to
metadata["text"]alongside the real image payload (same patternas Bagel / SenseNova-U1 "think" mode), so the
or "text" in metadataclausemisclassified the response as text-only and discarded the image.
Checked current
mainand this is already fixed there in #5238(
is_text_outputkeyed offprimary_keyalone), so no fix is carried inthis PR. Verification below was run with that fix applied locally to
unblock testing.
Also removed a speculative
_recover_images_from_outputs/_tensor_to_pildeep-scan fallback that had been added totext_to_image.py/image_edit.pywhile chasing the bug above before itsroot cause was found — once fixed, HunyuanImage-3.0's DiT output populates
OmniRequestOutput.imagesthrough the exact same defaultoutput_formatter.pypath every other diffusers-style model uses, so thefallback never had a live code path and only added ~150 lines of unverified
heuristics.
Response to review
--trust-remote-codeopt-in was bypassed:_apply_ar_stage_inputs()hardcoded
AutoTokenizer.from_pretrained(model, trust_remote_code=True)regardless of the CLI flag. Fixed: threaded the resolved flag through in
both
text_to_image.pyandimage_edit.py.tests/model_extras/test_shared_script_ar_integration.py(CPU, calls theshared scripts' real
_apply_ar_stage_inputsagainst the realmodel_extrasregistry — the path where the registry-key bug above wouldhave gone undetected) and
test_shared_script_ar_path_reaches_generationin the GPU e2e file (drives
get_model_class_name→get_ar_input_builder→
_apply_ar_stage_inputs→Omni.generate()through the real registry,reusing the
en_recaptionreference embedding to also check output paritywith the hand-constructed path the existing tests use).
stop_token_idsbroadcast too broadly: was applied to everynon-diffusion-typed stage by inference.
ARStageInputsnow declaresstage_indicesexplicitly; the shared scripts applystop_token_idsbythat index instead of type-based inference.
registry-declared
ar_tokenizer_validatorhook(
get_ar_tokenizer_validator) that checks a loaded real tokenizer'sspecial-token ids against
HUNYUAN_IMAGE3_SPECIAL_TOKEN_IDSand raises ondrift.
_apply_ar_stage_inputsnow re-raises by default instead of degrading to the string-prompt form
(which can complete "successfully" with subtly wrong stop tokens). Added
an explicit
--allow-tokenizer-fallbackopt-in on both scripts for adeliberate offline-compat run.
rather than silently diverging.
Deferred to a follow-up PR (re-assessed each individually rather than
batching them; these three specifically need either a live GPU re-run to
verify or a larger, separate design):
_apply_ar_stage_inputsinstead of a second independent
AutoTokenizer.from_pretrainedcall.Concretely:
AsyncOmniEngine._bootstrap_orchestratorcreates its eventloop as a local variable, never stored on
self, so nothing outside theorchestrator's background thread can currently reach it; exposing
get_tokenizer()to the syncOmniwrapper needs that loop stored (e.g.self._loop) and arun_coroutine_threadsafe-based sync wrapper. Thattouches core engine bootstrap/threading code every model goes through,
not just HunyuanImage3, so it needs a live run to confirm it doesn't
introduce a deadlock or shutdown-ordering issue -- unlike the fixes above,
which are scoped to one function with exactly one current caller.
blocked on
Omni()not having arevisionpassthrough today; that'd needto land first. (Previously tracked against
reproduce.sh, since removedalong with the rest of the directory -- see "Second rebase" below.)
Rebase onto
upstream/mainRebased to pick up 143 commits, including upstream's own independent
x_to_text.pyshared example +build_x_to_text_prompt/get_x_to_text_model_familyseam (#5384) — landed after this PR's originali2t/t2t design, so it made the "generic shared understanding example"
follow-up item above moot and left our dedicated
run_hunyuan_image3_understanding.pyfully duplicated. Resolved by:run_hunyuan_image3_understanding.py; i2t/t2t now go throughthe shared
x_to_text.py, matching t2i/it2i's use of the sharedtext_to_image.py/image_edit.py.build_x_to_text_prompt(upstream's function, in the samemodel_extras/hunyuan_image3.pyfile this PR already owns) to delegate tobuild_ar_stage_inputsinstead of re-deriving the AR prefill / stop-tokenlogic inline — so all four modalities share one seam down to
prompt_utils.build_ar_prompt_inputs. Verified this is behavior-preserving:for
t2t/i2t,bot_taskresolves toNonewhether passed explicitly(the old code's behavior) or omitted from
extra_body(the new code'sbehavior;
_normalize_task_and_bot_task's legacy-preset table maps bothtasks' omitted-
bot_tasksentinel toNone).the CPU test that pins "no duplicated tokenization logic"
(
test_example_routes_through_shared_seam) to check the seam functionitself rather than the now-deleted script.
Second rebase — directory removal, doc consolidation
Rebased again onto a further-diverged
upstream/main. This raised threereview points from @princepride: (1) fully deleting
examples/offline_inference/hunyuan_image3/, (2) folding--trust-remote-code/--allow-tokenizer-fallbackinto a generic--extra-argsmechanism instead of dedicated flags, (3) a tokenizerdocstring's clarity.
While resolving the rebase conflict on
end2end.py(this PR's earliercommit had deleted it;
upstream/mainhad kept it), I found upstream hadindependently kept extending that exact file with real, unique
functionality (streaming chain-of-thought display, diffusion KV-cache
dtype / skip-steps control) that has no equivalent in the shared task
examples yet, and initially restored it from
upstream/mainrather thanre-deleting it to avoid silently regressing that functionality. @princepride
weighed that tradeoff explicitly and confirmed the RFC's directory-removal
goal still applies regardless -- that gap is accepted as known, not a reason
to special-case this model. Resolved by fully removing
examples/offline_inference/hunyuan_image3/(end2end.py,reproduce.sh,README, and its auto-generated docs page) and consolidating all usage
documentation into
recipes/Tencent/HunyuanImage-3.0-Instruct.md, matchingevery other already-migrated model in the RFC. Also, upstream's own
"canonical image task prompts" refactor (#6049) made per-model
text_to_image_prompt_builderhooks optional; HunyuanImage3's builder didnothing beyond reproducing the shared script's own canonical envelope, so
it (plus its registry entry and tests) is deleted, matching the
cosmos3/LingBot precedent from that same upstream commit.
The two other review points (
--extra-argsfolding, tokenizer docstring)were addressed via threaded replies rather than code changes — the CLI
flags are opt-in safety switches with a small closed set of values, not
open-ended model tuning knobs, so keeping them as dedicated flags (with
clear
--helptext) reads better than moving them behind an opaque JSONblob; and the docstring reply pointed at
validate_ar_tokenizer's existingwording, which already explains why it exists (catching an AR/tokenizer
revision drift that would otherwise silently produce wrong stop-token ids)
rather than just what it does.
A separate, earlier reviewer (@hsliuustc0106) had left four inline comments
that were still open with no replies: two turned out to already be fixed in
code from the review-response round above (a test-argv bug, and the
tokenizer validator's base-vs-Instruct false positive), and two were
genuinely unaddressed until this round —
serving_chat.pycallingresolve_stop_token_idswith a different effectivebot_taskthanbuild_prompt_tokens/build_promptused for the same request (fixed, witha regression test), and
test_system_prompt_scoresonly printing its CLIPscore instead of asserting a threshold (fixed, reusing the same
MIN_SEMANTIC_SIMILARITYfloortest_shared_script_ar_path_reaches_generationalready used).
Verification
Round 1 — 4×H200,
tencent/HunyuanImage-3.0-Instruct(pre-rebase)Ran
examples/offline_inference/hunyuan_image3/reproduce.shend-to-end(
CUDA_VISIBLE_DEVICES=0,1,2,3, AR on devices 0-1 / DiT on devices 2-3, pervllm_omni/deploy/hunyuan_image_3_moe.yaml):t2i ("A brown and white dog is running on the grass"):

it2i ("Make the dog neon pink", edited from the t2i output above):

Recolor applied correctly, but the output has visible noise/oversaturation
(see "Known limitations" below — pre-existing, not from this PR's changes).
Unit tests: 51 passed on this pass (
tests/model_extras/test_model_extras.py,tests/diffusion/test_diffusion_output_formatter.py).Round 2 — 4×H200, post-rebase, all four modalities re-run
After the review-response round and the rebase onto
upstream/main(seebelow), re-ran
reproduce.shend-to-end with all four modalities,including i2t/t2t for the first time since they were re-routed onto the
shared
x_to_text.py:t2i ("A brown and white dog is running on the grass"):
it2i ("Make the flowers neon pink", edited from a different source image):

KV cache transfer (AR→DiT, Mooncake connector, TP=2 both stages) succeeded
cleanly on both TP ranks for both t2i and it2i, and the AR-only i2t/t2t path
(TP=4,
hunyuan_image3_ar.yaml) initialized and generated without incident.Environment notes specific to this round (all environment/infra, none in
this PR's code):
DIFFUSION_ATTENTION_BACKEND=TORCH_SDPArequirement as round 1 (see"Known limitations").
Omni()'s defaultinit_timeout/stage_init_timeout(600s/300s) was tootight for a cold start on a fresh container (no kernel cache) — confirmed
via logs that the AR worker was still making genuine progress toward
becoming ready when the timeout fired and tore it down. Not a hang; a
cold-start budget issue. Not changed in this PR's shipped code — worth a
follow-up if others hit it on fresh hardware.
vllm_omni/distributed/omni_connectors/) Mooncake KV-transfer connector:its ZMQ port allocation didn't reliably differentiate between a stage's
TP ranks on a cold multiprocessing spawn, causing an
EADDRINUSEbindrace. Out of scope for this PR (core connector infra, not
model_extras/HunyuanImage3 code) — filing a separate issue upstream withthe repro.
Unit tests: the 51 from round 1 still pass. The review-response round's CPU
tests (
tests/model_extras/test_shared_script_ar_integration.py, plusadditions to
test_model_extras.py/test_prompt_utils.py) aresyntax-checked and manually traced against real behavior but still not
executed via
pytestin this environment (no working Python env withnetwork access to install
pytestlocally). The GPU e2e pytest additions(
test_shared_script_ar_path_reaches_generation) require 8 GPUs(pre-existing
skipifgate in this test file, unrelated to this PR) andwere not run either round — however, round 2 exercised the exact same
production code path that test targets
(
get_model_class_name→get_ar_input_builder→_apply_ar_stage_inputs→
Omni.generate()) via the realreproduce.shCLI invocation, which isthe load-bearing evidence for that code path now.
Known limitations (pre-existing, not introduced by this PR)
it2i image quality: edited images show visible noise/oversaturation.
Isolated to not be caused by the environment's
TORCH_SDPAattentionfallback (see below) — t2i, running through the identical DiT model and
backend, is clean. Root cause likely sits in the pre-existing DiT
image-conditioning / VAE path, not in code this PR touches. Round 2
reproduced the identical artifact on a different source image and edit
prompt, reinforcing that it's model/pipeline-inherent rather than tied to
one specific input.
t2t hallucination: the model answers a plain-text question by
describing an imagined image containing that text, instead of answering
directly. Round 2 reproduced this verbatim in kind (again describing an
imagined image containing the literal question text) on a live rerun,
reinforcing the code-level argument below with a second live data point.
Confirmed not a regression: the pre-migration
end2end.py(
_MODALITY_TASK_MAP["text2text"] = ("t2t", None)) resolves to the exactsame
task="t2t", bot_task=None→en_unifiedsystem-prompt path as themigrated code (
build_ar_stage_inputs/build_x_to_text_promptwithtask="t2t",bot_taskresolving toNone). Both call the samebuild_ar_prompt_inputs()seam with identical inputs, so this is apre-existing model/prompt-template behavior, not something this PR
introduced. (A live pre-migration GPU rerun was attempted for a visual
side-by-side but hit unrelated environment issues — legacy
transformerstrust_remote_code prompt handling on the deleted script, vllm/driver
version skew — that aren't worth resolving for a script this PR removes;
the code-level comparison above is the load-bearing evidence.)
This environment's CUDA driver (575.57.08, max CUDA 12.9) required
installing a
+cu129wheel variant instead of the PyPI default(round 1: vllm 0.25.0; round 2: vllm 0.26.0, matching this repo's
docker/Dockerfile.cudabase image as of the round-2 rebase); the driveralso predates a flash-attn build exposing the non-varlen
flash_attn_funcHunyuanImage3's piecewise-attention path calls (
fa3-fwdonly providesflash_attn_varlen_func), so both rounds ran withDIFFUSION_ATTENTION_BACKEND=TORCH_SDPA. Unrelated to this PR's code.Repro
examples/offline_inference/hunyuan_image3/reproduce.shis removed alongwith the rest of the directory (see "Second rebase" above); the four
modalities now run directly through the shared task examples --
copy-pasteable commands for all four are in
recipes/Tencent/HunyuanImage-3.0-Instruct.md. Summarized: