[Core][Model] Enable Qwen3-TTS MRV2 and optimize the TTS pipeline (#7781)

Signed-off-by: Sy03 <1370724210@qq.com>
This commit is contained in:
Sy03 authored and GitHub committed 2026-09-20 23:03:08 -07:00
1 parent d139c600c7
commit a9e2117f5e
103 files changed
+10232 -661

No files matched your search

+26 -5
View File
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
import gc
import os
@@ -8,7 +11,10 @@ from vllm.tracing import instrument
from vllm.utils.mem_utils import MemorySnapshot, format_gib
from vllm.utils.torch_utils import set_random_seed
from vllm.v1.utils import report_usage_stats
from vllm.v1.worker.gpu_worker import init_worker_distributed_environment
from vllm.v1.worker.gpu_worker import (
CompilationTimes,
init_worker_distributed_environment,
)
from vllm.v1.worker.workspace import init_workspace_manager
from vllm_omni.platforms import current_omni_platform
@@ -96,13 +102,28 @@ class GPUGenerationWorker(OmniWorkerMixin, OmniGPUWorkerBase):
num_ubatches = 2 if self.vllm_config.parallel_config.enable_dbo else 1
init_workspace_manager(self.device, num_ubatches)
self.use_v2_model_runner = bool(getattr(self.model_config, "use_v2_model_runner", False))
if self.use_v2_model_runner:
# OMNI: v2 model runner does not yet include omni hooks.
logger.warning("OMNI GPUGenerationWorker forces v1 model runner for omni hooks.")
self.use_v2_model_runner = False
from vllm_omni.worker_v2.omni_generation_model_runner import (
OmniGenerationModelRunner,
)
self.model_runner = self.model_runner_cls(self.vllm_config, self.device)
logger.info("Using MR v2 OmniGenerationModelRunner for generation stage.")
self.model_runner = OmniGenerationModelRunner(self.vllm_config, self.device)
else:
self.model_runner = self.model_runner_cls(self.vllm_config, self.device)
if self.rank == 0:
# If usage stat is enabled, collect relevant info.
report_usage_stats(self.vllm_config)
@instrument(span_name="Compile/warmup")
def compile_or_warm_up_model(self) -> CompilationTimes:
"""Generation stages have no KV cache or sampler — skip warmup_kernels."""
if not self.use_v2_model_runner:
return super().compile_or_warm_up_model()
import time
start = time.perf_counter()
self.model_runner.profile_run()
return CompilationTimes(language_model=time.perf_counter() - start, encoder=0.0)