[Bugfix][Diffusion] Canonicalize cache_backend=None to "none" (#7041)
Signed-off-by: summer <128961079+zhang-keliang@users.noreply.github.com> Co-authored-by: Alicia <115451386+congw729@users.noreply.github.com>
This commit is contained in:
1 parent
b78c31eda6
commit
4b81f692d1
4 files changed
+23
-3
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
|
||||
"""Tests that parallel_config survives the create_default_diffusion roundtrip.
|
||||
|
||||
Regression tests for https://github.com/vllm-project/vllm-omni/issues/1862
|
||||
@@ -137,6 +137,15 @@ class TestCreateDefaultDiffusion:
|
||||
stages = StageConfigFactory.create_default_diffusion({"model": "x"})
|
||||
assert stages[0]["engine_args"]["cache_backend"] == "none"
|
||||
|
||||
def test_explicit_none_cache_backend_canonicalizes_to_none(self):
|
||||
"""Regression for #7032: ``cache_backend=None`` (e.g. an example CLI default)
|
||||
must reach the pipeline as the canonical ``"none"`` string."""
|
||||
od = _roundtrip_diffusion_config(model="x", cache_backend=None)
|
||||
assert od.cache_backend == "none"
|
||||
|
||||
od = OmniDiffusionConfig.from_kwargs(model="x", cache_backend=None)
|
||||
assert od.cache_backend == "none"
|
||||
|
||||
def test_single_gpu_default_devices(self):
|
||||
stages = StageConfigFactory.create_default_diffusion({"model": "x"})
|
||||
assert stages[0]["runtime"]["devices"] == "0"
|
||||
|
||||
Reference in new issue
Block a user