[Refactor][Diffusion] Read the resolved offload policy outside the config layer (#7327)
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:
22 files changed
+265
-111
No files matched your search
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
|
||||
"""LancePipeline — Lance (ByteDance) packaged for the vLLM-Omni diffusion engine.
|
||||
|
||||
Lance is BAGEL-lineage (Qwen2-MoT unified AR+diffusion), so the transformer
|
||||
@@ -59,6 +59,10 @@ from vllm_omni.diffusion.models.bagel.pipeline_bagel import (
|
||||
BagelPipeline,
|
||||
add_special_tokens,
|
||||
)
|
||||
from vllm_omni.diffusion.offloader.config import (
|
||||
OffloadStrategy,
|
||||
resolve_offload_strategy,
|
||||
)
|
||||
from vllm_omni.model_executor.model_loader.weight_utils import (
|
||||
download_weights_from_hf_specific,
|
||||
)
|
||||
@@ -401,7 +405,9 @@ class LancePipeline(BagelPipeline):
|
||||
)
|
||||
)
|
||||
|
||||
if quant_config is None and not (od_config.enable_layerwise_offload or od_config.parallel_config.use_hsdp):
|
||||
if quant_config is None and not (
|
||||
resolve_offload_strategy(od_config) is OffloadStrategy.LAYER_WISE or od_config.parallel_config.use_hsdp
|
||||
):
|
||||
self.to(self.device)
|
||||
self.setup_diffusion_pipeline_profiler(
|
||||
enable_diffusion_pipeline_profiler=self.od_config.enable_diffusion_pipeline_profiler
|
||||
|
||||
Reference in new issue
Block a user