From a9ee92ddec41dac82d8c79806f7981b724107a37 Mon Sep 17 00:00:00 2001 From: "Chendi.Xue" Date: Sat, 13 Jun 2026 10:32:39 -0500 Subject: [PATCH] [XPU] update Dreamzero to support any HW (#4399) Signed-off-by: Chendi Xue --- docs/models/supported_models.md | 2 +- vllm_omni/diffusion/models/dreamzero/causal_wan_model.py | 2 ++ vllm_omni/diffusion/models/dreamzero/pipeline_dreamzero.py | 7 +++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/models/supported_models.md b/docs/models/supported_models.md index 54b03afc8..023ad1932 100644 --- a/docs/models/supported_models.md +++ b/docs/models/supported_models.md @@ -42,7 +42,7 @@ th { | `LTX2ImageToVideoTwoStagesPipeline` | LTX-2-I2V | `rootonchair/LTX-2-19b-distilled` | ✅︎ | ✅︎ | | | | `LTX23Pipeline` | LTX-2.3-T2V | `dg845/LTX-2.3-Diffusers` | ✅︎ | ✅︎ | | | | `LTX23ImageToVideoPipeline` | LTX-2.3-I2V | `dg845/LTX-2.3-Diffusers` | ✅︎ | ✅︎ | | | -| `DreamZeroPipeline` | DreamZero-DROID | `GEAR-Dreams/DreamZero-DROID` | ✅︎ | | | | +| `DreamZeroPipeline` | DreamZero-DROID | `GEAR-Dreams/DreamZero-DROID` | ✅︎ | ✅︎ | ✅︎ | ✅︎ | | `HeliosPipeline`, `HeliosPyramidPipeline` | Helios | `BestWishYsh/Helios-Base`, `BestWishYsh/Helios-Mid`, `BestWishYsh/Helios-Distilled` | ✅︎ | ✅︎ | ✅︎ | | | `MagiHumanPipeline` | MagiHuman | `SII-GAIR/daVinci-MagiHuman-Base-1080p` | ✅︎ | ✅︎ | | | | `OvisImagePipeline` | Ovis-Image | `OvisAI/Ovis-Image` | ✅︎ | ✅︎ | | ✅︎ | diff --git a/vllm_omni/diffusion/models/dreamzero/causal_wan_model.py b/vllm_omni/diffusion/models/dreamzero/causal_wan_model.py index 37598ae0c..e187054e2 100644 --- a/vllm_omni/diffusion/models/dreamzero/causal_wan_model.py +++ b/vllm_omni/diffusion/models/dreamzero/causal_wan_model.py @@ -617,6 +617,8 @@ class CausalWanModel(nn.Module): Architecture (14B): 40 layers, dim=5120, heads=40, ffn=13824 """ + _layerwise_offload_blocks_attrs = ["blocks"] + def __init__( self, model_type: str = "t2v", diff --git a/vllm_omni/diffusion/models/dreamzero/pipeline_dreamzero.py b/vllm_omni/diffusion/models/dreamzero/pipeline_dreamzero.py index 6bb97aab6..30ea2a4ce 100644 --- a/vllm_omni/diffusion/models/dreamzero/pipeline_dreamzero.py +++ b/vllm_omni/diffusion/models/dreamzero/pipeline_dreamzero.py @@ -49,6 +49,7 @@ from vllm_omni.diffusion.models.dreamzero.utils import ( ) from vllm_omni.diffusion.models.schedulers.scheduling_flow_unipc_multistep import FlowUniPCMultistepScheduler from vllm_omni.diffusion.request import OmniDiffusionRequest +from vllm_omni.platforms import current_omni_platform logger = logging.getLogger(__name__) MAX_DREAMZERO_SESSIONS = 64 @@ -363,12 +364,10 @@ class DreamZeroPipeline(nn.Module, CFGParallelMixin): latents: tuple[torch.Tensor, torch.Tensor], do_true_cfg: bool, ) -> tuple[torch.Tensor, torch.Tensor]: - """Post-step sync: .contiguous() + cuda.synchronize()""" + """Post-step sync: .contiguous() + platform synchronize.""" latents = tuple(t.contiguous() for t in latents) if do_true_cfg and get_classifier_free_guidance_world_size() > 1: - device = next((t.device for t in latents if t.is_cuda), None) - if device is not None: - torch.cuda.current_stream(device).synchronize() + current_omni_platform.synchronize() return latents # -----------------------------------------------------------------------