From 580a0efe40d749e2803f96af1f5f3b8897d08c2d Mon Sep 17 00:00:00 2001 From: Yuanheng Zhao <54058983+yuanheng-zhao@users.noreply.github.com> Date: Fri, 26 Jun 2026 12:11:49 +0800 Subject: [PATCH] [Bugfix] Add back resolving from deploy config written pipeline in StageConfigFactory (#4729) Signed-off-by: Yuanheng Zhao --- tests/test_config_factory.py | 10 ++++++++++ vllm_omni/config/config_factory.py | 18 ++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/tests/test_config_factory.py b/tests/test_config_factory.py index 865315ad4..b285a99cc 100644 --- a/tests/test_config_factory.py +++ b/tests/test_config_factory.py @@ -655,6 +655,16 @@ class TestPipelineRegistration: assert isinstance(pipeline_cfg, PipelineConfig) assert pipeline_cfg.model_type == resolved_type + def test_resolve_when_autodetect_resolves_none(self): + """Regression test for: https://github.com/vllm-project/vllm-omni/issues/4726""" + deploy_path = get_deploy_config_path("ming_tts.yaml") + resolved_config = StageConfigFactory.create_from_model( + model="inclusionAI/Ming-omni-tts-0.5B", + deploy_config_path=deploy_path, + ) + assert resolved_config is not None + assert len(resolved_config) > 0 + class TestResolveScheduler: def test_all_execution_types_handled(self): diff --git a/vllm_omni/config/config_factory.py b/vllm_omni/config/config_factory.py index c34d21c49..28828b6af 100644 --- a/vllm_omni/config/config_factory.py +++ b/vllm_omni/config/config_factory.py @@ -123,6 +123,24 @@ class StageConfigFactory: cli_overrides, deploy_config_path, ) + + # --- Explicit deploy-config pipeline --- + # When auto-detection above resolves nothing (generic/missing HF model_type + # and no matching architecture), honor an explicit pipeline key in the deploy config + if deploy_config_path is not None: + deploy_path = Path(deploy_config_path) + if deploy_path.exists(): + deploy_cfg = load_deploy_config(deploy_path) + if deploy_cfg.pipeline: + pipeline_cfg = cls.resolve_pipeline_config(deploy_cfg.pipeline, hf_config) + if pipeline_cfg is not None: + return cls._create_from_registry( + pipeline_cfg.model_type, + pipeline_cfg, + cli_overrides, + deploy_config_path, + ) + # Not in the pipeline registry — let the caller fall back to the # legacy ``stage_configs/*.yaml`` path (resolve_model_config_path). return None