[Refactor][Diffusion] Resolve distributed layerwise topology in the plan (#7326)

Signed-off-by: specture724 <specture724@gmail.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
authored and GitHub committed 2026-09-19 19:05:18 +08:00
1 parent 232dbc82f8
commit ea84055507
5 files changed
+361 -129

No files matched your search

@@ -36,6 +36,7 @@ from vllm_omni.diffusion.offloader.distributed_layerwise_backend import (
DistributedLayerwiseOffloadBackend,
DistributedLayerwiseOffloadHook,
)
from vllm_omni.diffusion.offloader.plan_resolver import ResolvedComponent
@dataclass(frozen=True)
@@ -46,12 +47,6 @@ class _WeightSourceStub:
prefix: str
@dataclass(frozen=True)
class _PipelineModulesStub:
dits: list[nn.Module]
dit_names: list[str]
_WORLD_SIZE = 4
pytestmark = [pytest.mark.diffusion, pytest.mark.cpu, pytest.mark.core_model]
@@ -189,7 +184,7 @@ def _load_mmap_transform_and_reconstruct(
backend._mmap_transforms_by_tensor_id = {}
backend._load_weights_via_mmap(
pipeline,
_PipelineModulesStub(dits=[target], dit_names=["transformer"]),
(ResolvedComponent(path="transformer", module=target, selected=True),),
plan_result.plan,
)