[Refactor][Diffusion] Complete generic backend plan consumption (#7313)
Signed-off-by: specture724 <specture724@gmail.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5385dda4fe
commit
85da943391
7 files changed
+228
-56
No files matched your search
@@ -1,3 +1,6 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
|
||||
|
||||
import pytest
|
||||
import torch
|
||||
from pytest_mock import MockerFixture
|
||||
@@ -265,7 +268,7 @@ class TestFlux2TransformerLayerwiseOffload:
|
||||
]
|
||||
|
||||
def test_get_blocks_from_dit(self):
|
||||
from vllm_omni.diffusion.offloader.layerwise_backend import LayerWiseOffloadBackend
|
||||
from vllm_omni.diffusion.offloader.block_discovery import get_blocks_from_dit
|
||||
|
||||
# Block discovery only needs the ModuleList structure, not production dims.
|
||||
model = Flux2Transformer2DModel(
|
||||
@@ -275,6 +278,6 @@ class TestFlux2TransformerLayerwiseOffload:
|
||||
attention_head_dim=4,
|
||||
joint_attention_dim=16,
|
||||
)
|
||||
attr_names, blocks = LayerWiseOffloadBackend.get_blocks_from_dit(model)
|
||||
attr_names, blocks = get_blocks_from_dit(model)
|
||||
assert attr_names == ["transformer_blocks", "single_transformer_blocks"]
|
||||
assert len(blocks) == 4
|
||||
Reference in new issue
Block a user