[Refactor] Migrate dynin_omni to pipeline registry, drop legacy stage… (#4078)
Signed-off-by: dph97 <nenbaying@163.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
23484d8a11
commit
3329f1b674
11 files changed
+208
-271
No files matched your search
@@ -144,7 +144,6 @@ _DYNIN_CONFIG_CANDIDATE_RELPATHS = (
|
||||
"configs/dynin_omni.yaml",
|
||||
"models/configs/dynin_omni.yaml",
|
||||
"vllm_omni/model_executor/models/dynin_omni/configs/dynin_omni.yaml",
|
||||
"vllm_omni/model_executor/stage_configs/dynin_omni.yaml",
|
||||
"dynin_omni.yaml",
|
||||
)
|
||||
|
||||
@@ -482,7 +481,6 @@ def _resolve_config_path(vllm_config: VllmConfig, runtime_info: dict[str, Any])
|
||||
for bundled in (
|
||||
module_root / "configs" / "dynin_omni.yaml",
|
||||
module_root / "models" / "configs" / "dynin_omni.yaml",
|
||||
module_root.parent / "stage_configs" / "dynin_omni.yaml",
|
||||
):
|
||||
if bundled.exists():
|
||||
return str(bundled)
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
"""Dynin-Omni pipeline topology (frozen).
|
||||
|
||||
Stage 0: token2text — multimodal understanding / text generation (comprehension)
|
||||
Stage 1: token2image — stage-0 tokens → image latents
|
||||
Stage 2: token2audio — stage-1 tokens → audio latents
|
||||
|
||||
All three stages run on the generation worker (``LLM_GENERATION``); the
|
||||
inter-stage hand-off uses the worker-connector full-payload data plane
|
||||
(``*_full_payload`` producers + ``token2text_to_token2image`` /
|
||||
``token2image_to_token2audio`` consumers). Deploy knobs (devices, GPU memory,
|
||||
batched tokens, connectors) live in ``vllm_omni/deploy/dynin_omni*.yaml``.
|
||||
"""
|
||||
|
||||
from vllm_omni.config.stage_config import (
|
||||
PipelineConfig,
|
||||
StageExecutionType,
|
||||
StagePipelineConfig,
|
||||
)
|
||||
|
||||
_PROC = "vllm_omni.model_executor.stage_input_processors.dynin_omni"
|
||||
|
||||
DYNIN_OMNI_PIPELINE = PipelineConfig(
|
||||
model_type="dynin_omni",
|
||||
model_arch="DyninOmniForConditionalGeneration",
|
||||
# Arch-fallback safety net: route by hf_config.architectures when the
|
||||
# auto-detected model_type does not match the registry key exactly.
|
||||
hf_architectures=("DyninOmniForConditionalGeneration",),
|
||||
stages=(
|
||||
StagePipelineConfig(
|
||||
stage_id=0,
|
||||
model_stage="token2text",
|
||||
execution_type=StageExecutionType.LLM_GENERATION,
|
||||
input_sources=(),
|
||||
final_output=True,
|
||||
final_output_type="text",
|
||||
owns_tokenizer=True,
|
||||
engine_output_type="latent",
|
||||
custom_process_next_stage_input_func=f"{_PROC}.token2text_to_token2image_full_payload",
|
||||
),
|
||||
StagePipelineConfig(
|
||||
stage_id=1,
|
||||
model_stage="token2image",
|
||||
execution_type=StageExecutionType.LLM_GENERATION,
|
||||
input_sources=(0,),
|
||||
final_output=True,
|
||||
final_output_type="image",
|
||||
engine_output_type="latent",
|
||||
custom_process_input_func=f"{_PROC}.token2text_to_token2image",
|
||||
custom_process_next_stage_input_func=f"{_PROC}.token2image_to_token2audio_full_payload",
|
||||
),
|
||||
StagePipelineConfig(
|
||||
stage_id=2,
|
||||
model_stage="token2audio",
|
||||
execution_type=StageExecutionType.LLM_GENERATION,
|
||||
input_sources=(1,),
|
||||
final_output=True,
|
||||
final_output_type="audio",
|
||||
engine_output_type="latent",
|
||||
custom_process_input_func=f"{_PROC}.token2image_to_token2audio",
|
||||
),
|
||||
),
|
||||
)
|
||||
Reference in new issue
Block a user