refactor(moss_tts_nano): migrate to Pipeline + Deploy schema
Follow-up to #2958. MOSS-TTS-Nano was authored before the schema refactor and still shipped as a legacy stage_configs yaml; this aligns it with the same layout the 5 migrated TTS models now use. - vllm_omni/model_executor/models/moss_tts_nano/pipeline.py declares MOSS_TTS_NANO_PIPELINE (single LLM_AR stage, owns_tokenizer, audio output, stop_token_ids=[2] as a hard EOS backstop). - vllm_omni/deploy/moss_tts_nano.yaml holds runtime knobs (max_num_seqs, gpu_memory_utilization, enforce_eager, default_sampling_params, skip_mm_profiling); trust_remote_code stays at deploy top-level. - vllm_omni/config/pipeline_registry.py registers the entry so the lazy registry can resolve it. - moss_tts_nano/__init__.py exports MossTTSNanoForGeneration (VoxCPM2 pattern). - Removed vllm_omni/model_executor/stage_configs/moss_tts_nano.yaml. Examples, shell scripts, READMEs, and buildkite-invoked tests are updated to use `vllm serve <model> --omni` / `--deploy-config` (auto-load kicks in; no --stage-configs-path or --trust-remote-code). Signed-off-by: Yueqian Lin <linyueqian@outlook.com>
This commit is contained in:
1 parent
26bbe7b527
commit
b03a41a7f9
12 files changed
+104
-101
No files matched your search
@@ -1,2 +1,5 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
from .modeling_moss_tts_nano import MossTTSNanoForGeneration
|
||||
|
||||
__all__ = ["MossTTSNanoForGeneration"]
|
||||
@@ -0,0 +1,40 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
"""MOSS-TTS-Nano pipeline topology (frozen).
|
||||
|
||||
Single-stage AR TTS: text -> speech waveform in one pass. The 0.1B AR LM
|
||||
and the MOSS-Audio-Tokenizer-Nano codec both run inside
|
||||
``MossTTSNanoForGeneration.forward()``, which uses the VoxCPM-style
|
||||
generator pattern (``inference_stream()`` stored per-request; one audio
|
||||
chunk yielded per forward) to drive progressive streaming through the
|
||||
AR scheduler.
|
||||
"""
|
||||
|
||||
from vllm_omni.config.stage_config import (
|
||||
PipelineConfig,
|
||||
StageExecutionType,
|
||||
StagePipelineConfig,
|
||||
)
|
||||
|
||||
MOSS_TTS_NANO_PIPELINE = PipelineConfig(
|
||||
model_type="moss_tts_nano",
|
||||
model_arch="MossTTSNanoForCausalLM",
|
||||
stages=(
|
||||
StagePipelineConfig(
|
||||
stage_id=0,
|
||||
model_stage="moss_tts_nano",
|
||||
execution_type=StageExecutionType.LLM_AR,
|
||||
input_sources=(),
|
||||
final_output=True,
|
||||
final_output_type="audio",
|
||||
owns_tokenizer=True,
|
||||
engine_output_type="audio",
|
||||
sampling_constraints={
|
||||
"detokenize": False,
|
||||
# compute_logits() forces EOS (token id 2) when the last
|
||||
# streaming chunk is yielded; keep a hard backstop here.
|
||||
"stop_token_ids": [2],
|
||||
},
|
||||
),
|
||||
),
|
||||
)
|
||||
@@ -1,61 +0,0 @@
|
||||
# Stage config for MOSS-TTS-Nano (OpenMOSS-Team/MOSS-TTS-Nano).
|
||||
#
|
||||
# Single AR stage: the 0.1B AR LM and MOSS-Audio-Tokenizer-Nano codec
|
||||
# both run inside MossTTSNanoForGeneration.forward(). The model uses the
|
||||
# VoxCPM-style generator pattern for streaming: inference_stream() is
|
||||
# stored per-request, and each forward() call yields one audio chunk.
|
||||
# compute_logits() controls EOS to keep requests alive until done.
|
||||
#
|
||||
# Verified on: 1x GPU with ≥2 GB VRAM, or CPU (slower).
|
||||
# Output: 48 kHz, 2-channel stereo audio.
|
||||
#
|
||||
# Request additional_information fields:
|
||||
# text (str) – text to synthesize [required]
|
||||
# voice (str) – built-in voice preset, default "Junhao"
|
||||
# mode (str) – "continuation" (default) | "voice_clone"
|
||||
# prompt_audio_path (str) – path to reference audio for custom voice clone
|
||||
# prompt_text (str) – reference transcript (continuation mode)
|
||||
# max_new_frames (int) – max AR frames, default 375 (~14 s)
|
||||
# text_temperature (float) – default 1.0
|
||||
# audio_temperature (float) – default 0.8
|
||||
# audio_top_k (int) – default 25
|
||||
# audio_top_p (float) – default 0.95
|
||||
# seed (int) – optional RNG seed
|
||||
|
||||
async_chunk: false
|
||||
|
||||
stage_args:
|
||||
- stage_id: 0
|
||||
stage_type: llm
|
||||
is_comprehension: true
|
||||
runtime:
|
||||
devices: "0"
|
||||
engine_args:
|
||||
model_stage: moss_tts_nano
|
||||
model_arch: MossTTSNanoForCausalLM
|
||||
worker_type: ar
|
||||
scheduler_cls: vllm_omni.core.sched.omni_ar_scheduler.OmniARScheduler
|
||||
trust_remote_code: true
|
||||
enforce_eager: true
|
||||
engine_output_type: audio
|
||||
gpu_memory_utilization: 0.3
|
||||
enable_prefix_caching: false
|
||||
skip_mm_profiling: true
|
||||
max_num_seqs: 4
|
||||
max_model_len: 4096
|
||||
max_num_batched_tokens: 4096
|
||||
final_output: true
|
||||
final_output_type: audio
|
||||
default_sampling_params:
|
||||
temperature: 1.0
|
||||
top_p: 1.0
|
||||
top_k: 50
|
||||
max_tokens: 4096
|
||||
seed: 42
|
||||
detokenize: false
|
||||
|
||||
runtime:
|
||||
enabled: true
|
||||
defaults:
|
||||
window_size: -1
|
||||
max_inflight: 4
|
||||
Reference in new issue
Block a user