[Diffusion] DreamZero world model integration with CFG parallel + OpenPI serving (#2162)

Signed-off-by: Meng <meng_chen99@163.com>
Signed-off-by: Yangshen Deng <yangshen.d@outlook.com>
Signed-off-by: Suli Wang <50828270+wsl2000@users.noreply.github.com>
Co-authored-by: Meng <meng_chen99@163.com>
Co-authored-by: Suli Wang <50828270+wsl2000@users.noreply.github.com>
Co-authored-by: amy-why-3459 <wuhaiyan17@huawei.com>
This commit is contained in:
authored and GitHub committed 2026-06-02 19:50:20 +00:00
1 parent e35cd213d7
commit bdfc77147d
42 files changed
+6610 -19

No files matched your search

+30 -3
View File
@@ -1,4 +1,5 @@
import os
from collections.abc import Mapping
from functools import lru_cache
from vllm.logger import init_logger
@@ -27,6 +28,31 @@ def _looks_like_bagel(model_name: str) -> bool:
return False
def _looks_like_dreamzero(model_name: str) -> bool:
"""Best-effort detection for DreamZero-style VLA diffusion checkpoints."""
try:
cfg = get_hf_file_to_dict("config.json", model_name)
if cfg.get("model_type") != "vla":
return False
action_head_cfg = cfg.get("action_head_cfg") or {}
if not isinstance(action_head_cfg, Mapping):
return False
action_head_config = action_head_cfg.get("config") or {}
if not isinstance(action_head_config, Mapping):
return False
diffusion_model_cfg = action_head_config.get("diffusion_model_cfg") or {}
if not isinstance(diffusion_model_cfg, Mapping):
return False
return (
action_head_cfg.get("_target_")
== "groot.vla.model.dreamzero.action_head.wan_flow_matching_action_tf.WANPolicyHead"
and diffusion_model_cfg.get("_target_")
== ("groot.vla.model.dreamzero.modules.wan_video_dit_action_casual_chunk.CausalWanModel")
)
except Exception:
return False
@lru_cache
def is_diffusion_model(model_name: str) -> bool:
"""Check if a model is a diffusion model.
@@ -72,6 +98,7 @@ def is_diffusion_model(model_name: str) -> bool:
except Exception as e:
logger.debug("Failed to load diffusers config via DiffusionPipeline: %s", e)
# Bagel is not a diffusers pipeline (no model_index.json), but is still a
# diffusion-style model in vllm-omni. Detect it via config.json.
return _looks_like_bagel(model_name)
# Bagel and DreamZero are not diffusers pipelines (no model_index.json),
# but are still diffusion-style models in vllm-omni. Detect them via
# config.json.
return _looks_like_bagel(model_name) or _looks_like_dreamzero(model_name)