Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions tests/test_config_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
18 changes: 18 additions & 0 deletions vllm_omni/config/config_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading