[Refactor]Base class for dit pipelines with unified parameter declaration[1/N] (#4225)

Signed-off-by: princepride <wangzhipeng628@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
authored and GitHub committed 2026-06-18 17:14:18 +08:00
1 parent dff8cda844
commit f75c437a60
26 files changed
+1026 -1586

No files matched your search

+16
View File
@@ -220,6 +220,8 @@ class AsyncOmniEngine:
self.model = model
self.tokenizer = tokenizer
self.diffusion_batch_size = diffusion_batch_size
# Cached by get_diffusion_od_config().
self._diffusion_od_config_view: Any = None
startup_timeout = int(init_timeout)
# Forwarded into Orchestrator so its _forward_to_next_stage path can
# emit per-edge transfer_tx_s / transfer_size_bytes histograms.
@@ -323,6 +325,20 @@ class AsyncOmniEngine:
logger.info(f"[AsyncOmniEngine] Orchestrator ready with {self.num_stages} stages")
def get_diffusion_od_config(self) -> Any:
"""Expose the diffusion ``model_class_name`` to client-side model-extras.
The worker holds the full config; here we just resolve the pipeline class
name from the model config (cached). ``model_class_name`` may be ``None``.
"""
if self._diffusion_od_config_view is None:
from types import SimpleNamespace
from vllm_omni.diffusion.data import resolve_model_class_name
self._diffusion_od_config_view = SimpleNamespace(model_class_name=resolve_model_class_name(self.model))
return self._diffusion_od_config_view
def _initialize_stages(self, stage_init_timeout: int) -> None:
"""Initialize stage clients/processors via StageRuntime and assign to self."""
self._runtime = create_stage_runtime(