diff --git a/tests/test_config_factory.py b/tests/test_config_factory.py index 865315ad445..b285a99cc13 100644 --- a/tests/test_config_factory.py +++ b/tests/test_config_factory.py @@ -655,6 +655,16 @@ def custom_resolver( 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 c34d21c4965..28828b6af1c 100644 --- a/vllm_omni/config/config_factory.py +++ b/vllm_omni/config/config_factory.py @@ -123,6 +123,24 @@ def create_from_model( 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