From a2a23a14994f2d53e1d244c6ab60f9fa339e5f6e Mon Sep 17 00:00:00 2001 From: SYLAR <125541396+lishunyang12@users.noreply.github.com> Date: Sun, 22 Mar 2026 12:10:55 +0800 Subject: [PATCH] [Bugfix] Fix HunyuanVideo-1.5 CI failures (#2066) Signed-off-by: lishunyang --- .../online_serving/test_hunyuan_video_15_expansion.py | 8 ++++---- .../models/hunyuan_video/pipeline_hunyuan_video_1_5.py | 9 +++++++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/tests/e2e/online_serving/test_hunyuan_video_15_expansion.py b/tests/e2e/online_serving/test_hunyuan_video_15_expansion.py index 71c7e5a50..62109fbbc 100644 --- a/tests/e2e/online_serving/test_hunyuan_video_15_expansion.py +++ b/tests/e2e/online_serving/test_hunyuan_video_15_expansion.py @@ -5,7 +5,7 @@ Tests of common diffusion feature combinations in online serving mode for HunyuanVideo-1.5-T2V (480p). Coverage (H100, since model cannot fit L4): -- TeaCache + Layerwise CPU offloading (1 GPU) +- CacheDiT + Layerwise CPU offloading (1 GPU) - CacheDiT + TP=2 + VAE patch parallel=2 (2 GPUs) """ @@ -34,17 +34,17 @@ def _get_diffusion_feature_cases(model: str): Designed for 2x H100 environment per issue #1832. """ return [ - # (1 GPU) TeaCache + Layerwise CPU offloading + # (1 GPU) CacheDiT + Layerwise CPU offloading pytest.param( OmniServerParams( model=model, server_args=[ "--cache-backend", - "tea_cache", + "cache_dit", "--enable-layerwise-offload", ], ), - id="single_card_teacache_layerwise", + id="single_card_cachedit_layerwise", marks=SINGLE_CARD_MARKS, ), # (2 GPUs) CacheDiT + TP=2 + VAE patch parallel=2 diff --git a/vllm_omni/diffusion/models/hunyuan_video/pipeline_hunyuan_video_1_5.py b/vllm_omni/diffusion/models/hunyuan_video/pipeline_hunyuan_video_1_5.py index 643d471ff..0b68676e8 100644 --- a/vllm_omni/diffusion/models/hunyuan_video/pipeline_hunyuan_video_1_5.py +++ b/vllm_omni/diffusion/models/hunyuan_video/pipeline_hunyuan_video_1_5.py @@ -68,10 +68,15 @@ def extract_glyph_texts(prompt: str) -> str | None: def get_hunyuan_video_15_post_process_func(od_config: OmniDiffusionConfig): video_processor = VideoProcessor(vae_scale_factor=16) - def post_process_func(video: torch.Tensor, output_type: str = "np"): + def post_process_func(video: torch.Tensor, output_type: str = "pil"): if output_type == "latent": return video - return video_processor.postprocess_video(video, output_type=output_type) + result = video_processor.postprocess_video(video, output_type=output_type) + # postprocess_video returns List[List[PIL.Image]] (batch x frames). + # Flatten to a flat list of PIL Images for the serving endpoint. + if isinstance(result, list) and result and isinstance(result[0], list): + result = result[0] + return result return post_process_func