[Test] Pass explicit diffusion overrides in text encoder TP regression
Signed-off-by: Sy03 <1370724210@qq.com>
This commit is contained in:
1 parent
b3129048e6
commit
04e496be3e
1 file changed
+5
-6
@@ -563,19 +563,18 @@ def test_from_cli_args_preserves_text_encoder_tp_size():
|
||||
def test_text_encoder_tp_size_reaches_default_diffusion_parallel_config():
|
||||
"""The preserved CLI value must land in DiffusionParallelConfig.
|
||||
|
||||
Mirrors the library flow: from_cli_args -> kwargs -> the generic
|
||||
diffusion fallback, which resolves the field through
|
||||
``DiffusionParallelConfig.from_stage_overrides``.
|
||||
Forward the explicitly supplied override after from_cli_args, without
|
||||
injecting unrelated LLM defaults from the full EngineArgs dataclass into
|
||||
the strict diffusion ingress. The generic diffusion fallback resolves
|
||||
the field through ``DiffusionParallelConfig.from_stage_overrides``.
|
||||
"""
|
||||
from dataclasses import asdict
|
||||
|
||||
from vllm_omni.config.config_factory import StageConfigFactory
|
||||
|
||||
engine_args = OmniEngineArgs.from_cli_args(
|
||||
SimpleNamespace(text_encoder_tp_size=2),
|
||||
)
|
||||
stage_cfg = StageConfigFactory.create_default_diffusion(
|
||||
{k: v for k, v in asdict(engine_args).items() if v is not None},
|
||||
{"text_encoder_tp_size": engine_args.text_encoder_tp_size},
|
||||
)[0]
|
||||
|
||||
parallel_config = stage_cfg["engine_args"]["parallel_config"]
|
||||
|
||||
Reference in new issue
Block a user