From 51b4b1131e2811942d16fe984eaa1890a6112e44 Mon Sep 17 00:00:00 2001 From: "Y. Fisher" Date: Thu, 14 May 2026 11:17:15 +0800 Subject: [PATCH] [Bugfix]: Fix online serving failure when using deploy config (#3537) Signed-off-by: KexiongYu Signed-off-by: Y. Fisher --- vllm_omni/config/pipeline_registry.py | 2 +- vllm_omni/deploy/hunyuan_image3.yaml | 11 ++++++----- .../models/hunyuan_image3/hunyuan_image3.py | 1 + .../model_executor/models/hunyuan_image3/pipeline.py | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/vllm_omni/config/pipeline_registry.py b/vllm_omni/config/pipeline_registry.py index 1067316a2..555f35e17 100644 --- a/vllm_omni/config/pipeline_registry.py +++ b/vllm_omni/config/pipeline_registry.py @@ -69,7 +69,7 @@ _OMNI_PIPELINES: dict[str, tuple[str, str]] = { "vllm_omni.model_executor.models.glm_image.pipeline", "GLM_IMAGE_PIPELINE", ), - "hunyuan_image3": ( + "hunyuan_image_3_moe": ( "vllm_omni.model_executor.models.hunyuan_image3.pipeline", "HUNYUAN_IMAGE3_PIPELINE", ), diff --git a/vllm_omni/deploy/hunyuan_image3.yaml b/vllm_omni/deploy/hunyuan_image3.yaml index 634165cd3..c52f28674 100644 --- a/vllm_omni/deploy/hunyuan_image3.yaml +++ b/vllm_omni/deploy/hunyuan_image3.yaml @@ -1,7 +1,7 @@ # HunyuanImage-3.0-Instruct deploy: AR (stage 0) + DiT (stage 1) # with AR-to-DiT KV reuse. The base CUDA layout uses 2 GPUs for AR # and 2 GPUs for DiT. -pipeline: hunyuan_image3 +pipeline: hunyuan_image_3_moe async_chunk: false trust_remote_code: true @@ -22,7 +22,6 @@ connectors: stages: - stage_id: 0 - is_comprehension: false final_output: true final_output_type: text max_num_seqs: 1 @@ -38,7 +37,7 @@ stages: omni_kv_config: need_send_cache: true output_connectors: - to_stage_1: shared_memory_connector + to_stage_1: rdma_connector default_sampling_params: temperature: 0.0 top_p: 1 @@ -58,7 +57,7 @@ stages: tensor_parallel_size: 2 enable_expert_parallel: true input_connectors: - from_stage_0: shared_memory_connector + from_stage_0: rdma_connector default_sampling_params: num_inference_steps: 50 guidance_scale: 0 @@ -83,7 +82,9 @@ platforms: max_num_batched_tokens: 8192 parallel_config: tensor_parallel_size: 4 - enable_expert_parallel: true + enable_expert_parallel: false + sequence_parallel_size: 1 + ulysses_degree: 1 xpu: stages: diff --git a/vllm_omni/model_executor/models/hunyuan_image3/hunyuan_image3.py b/vllm_omni/model_executor/models/hunyuan_image3/hunyuan_image3.py index 1e057a71e..0f8002621 100644 --- a/vllm_omni/model_executor/models/hunyuan_image3/hunyuan_image3.py +++ b/vllm_omni/model_executor/models/hunyuan_image3/hunyuan_image3.py @@ -1128,6 +1128,7 @@ def _hunyuan_image3_unpack_packed_topk( gating_output: torch.Tensor, topk: int, renormalize: bool, + num_experts: int, ) -> tuple[torch.Tensor, torch.Tensor]: """Unpack pre-computed ``(topk_weights, topk_indices)`` packed by :class:`HunyuanImage3SparseMoeBlock` into ``gating_output``. diff --git a/vllm_omni/model_executor/models/hunyuan_image3/pipeline.py b/vllm_omni/model_executor/models/hunyuan_image3/pipeline.py index 3ff53af62..94b4cd837 100644 --- a/vllm_omni/model_executor/models/hunyuan_image3/pipeline.py +++ b/vllm_omni/model_executor/models/hunyuan_image3/pipeline.py @@ -17,7 +17,7 @@ _HUNYUAN_IMAGE3_INPUT_PROCESSOR = "vllm_omni.model_executor.stage_input_processo HUNYUAN_IMAGE3_PIPELINE = PipelineConfig( - model_type="hunyuan_image3", + model_type="hunyuan_image_3_moe", model_arch=_HUNYUAN_IMAGE3_MODEL_ARCH, hf_architectures=_HUNYUAN_IMAGE3_HF_ARCHS, stages=(