diff --git a/tests/config/test_pipeline_registry.py b/tests/config/test_pipeline_registry.py index 3483d530c..6cc7c9258 100644 --- a/tests/config/test_pipeline_registry.py +++ b/tests/config/test_pipeline_registry.py @@ -6,11 +6,7 @@ from __future__ import annotations import pytest -from vllm_omni.config.pipeline_registry import ( - _DIFFUSION_PIPELINES, - _OMNI_PIPELINES, - _VLLM_OMNI_PIPELINES, -) +from vllm_omni.config.pipeline_registry import _OMNI_PIPELINES from vllm_omni.config.stage_config import ( _PIPELINE_REGISTRY, PipelineConfig, @@ -23,17 +19,9 @@ from vllm_omni.config.stage_config import ( class TestCentralRegistryDeclarations: """Every in-tree pipeline must be declared exactly once in the central registry.""" - def test_union_contains_all_omni(self): + def test_omni_entries_visible_in_registry(self): for key in _OMNI_PIPELINES: - assert key in _VLLM_OMNI_PIPELINES - - def test_union_contains_all_diffusion(self): - for key in _DIFFUSION_PIPELINES: - assert key in _VLLM_OMNI_PIPELINES - - def test_no_duplicate_model_type_between_omni_and_diffusion(self): - overlap = set(_OMNI_PIPELINES) & set(_DIFFUSION_PIPELINES) - assert not overlap, f"Duplicate model_types across omni/diffusion: {overlap}" + assert key in _PIPELINE_REGISTRY def test_expected_omni_pipelines_present(self): # Guard against accidental removal during future refactors. diff --git a/tests/test_config_factory.py b/tests/test_config_factory.py index 3148d8dc6..16d49034f 100644 --- a/tests/test_config_factory.py +++ b/tests/test_config_factory.py @@ -701,7 +701,7 @@ stages: class TestPipelineDiscovery: - """Tests for the central pipeline registry (``pipeline_registry._VLLM_OMNI_PIPELINES``).""" + """Tests for the central pipeline registry (``pipeline_registry._OMNI_PIPELINES``).""" def test_registry_has_known_models(self): """Built-in pipelines are lazy-loaded from the central declaration diff --git a/vllm_omni/config/pipeline_registry.py b/vllm_omni/config/pipeline_registry.py index d9351842d..937220914 100644 --- a/vllm_omni/config/pipeline_registry.py +++ b/vllm_omni/config/pipeline_registry.py @@ -15,7 +15,13 @@ they just no longer need to self-register via ``register_pipeline(...)``. Adding a new pipeline: 1. Define the ``PipelineConfig`` instance as a module-level variable in ``vllm_omni/.../pipeline.py``. - 2. Add one line to ``_OMNI_PIPELINES`` or ``_DIFFUSION_PIPELINES`` below. + 2. Add one line to ``_OMNI_PIPELINES`` below. + +Single-stage diffusion models continue to use the +``_create_default_diffusion_stage_cfg`` fallback in +``async_omni_engine.py`` — they don't need a registry entry. The empty +``_DIFFUSION_PIPELINES`` placeholder previously here (#2915) was removed +once #2987 (which would have populated it) was deferred. ``register_pipeline(config)`` in ``stage_config`` is still supported for out-of-tree plugins and tests that create pipelines at runtime; those override @@ -80,12 +86,3 @@ _OMNI_PIPELINES: dict[str, tuple[str, str]] = { "FISH_SPEECH_PIPELINE", ), } - -# --- Single-stage diffusion pipelines (populated in PR 3/N) --- -_DIFFUSION_PIPELINES: dict[str, tuple[str, str]] = {} - -# Union view used by ``_LazyPipelineRegistry``; don't mutate at runtime. -_VLLM_OMNI_PIPELINES: dict[str, tuple[str, str]] = { - **_OMNI_PIPELINES, - **_DIFFUSION_PIPELINES, -} diff --git a/vllm_omni/config/stage_config.py b/vllm_omni/config/stage_config.py index f69e5c139..950685d62 100644 --- a/vllm_omni/config/stage_config.py +++ b/vllm_omni/config/stage_config.py @@ -274,9 +274,9 @@ class _LazyPipelineRegistry: def _get_lazy_map(self) -> dict[str, tuple[str, str]]: if self._lazy_map is None: - from vllm_omni.config.pipeline_registry import _VLLM_OMNI_PIPELINES + from vllm_omni.config.pipeline_registry import _OMNI_PIPELINES - self._lazy_map = _VLLM_OMNI_PIPELINES + self._lazy_map = _OMNI_PIPELINES return self._lazy_map def _load_lazy(self, model_type: str) -> PipelineConfig | None: @@ -374,7 +374,7 @@ _PIPELINE_REGISTRY = _LazyPipelineRegistry() def register_pipeline(pipeline: PipelineConfig) -> None: """Register a pipeline config dynamically. - In-tree pipelines are declared in ``pipeline_registry._VLLM_OMNI_PIPELINES`` + In-tree pipelines are declared in ``pipeline_registry._OMNI_PIPELINES`` and loaded lazily; calling ``register_pipeline`` is only needed for out-of-tree plugins or tests that build a ``PipelineConfig`` at runtime. A dynamic registration overrides the central-registry entry with the same