[Core][Model] Enable Qwen3-TTS MRV2 and optimize the TTS pipeline (#7781)
Signed-off-by: Sy03 <1370724210@qq.com>
This commit is contained in:
103 files changed
+10232
-661
No files matched your search
@@ -1,3 +1,6 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
|
||||
|
||||
import gc
|
||||
import os
|
||||
|
||||
@@ -75,7 +78,6 @@ class GPUARWorker(OmniWorkerMixin, OmniGPUWorkerBase):
|
||||
f"DP adjusted local rank {self.local_rank} is out of "
|
||||
f"bounds for {torch.accelerator.device_count()} devices."
|
||||
)
|
||||
|
||||
visible_device_index = current_platform.logical_device_id_to_visible_device_id(self.local_rank)
|
||||
self.device = current_omni_platform.get_torch_device(visible_device_index)
|
||||
torch.accelerator.set_device_index(self.device)
|
||||
@@ -113,13 +115,24 @@ class GPUARWorker(OmniWorkerMixin, OmniGPUWorkerBase):
|
||||
num_ubatches = 2 if self.vllm_config.parallel_config.enable_dbo else 1
|
||||
init_workspace_manager(self.device, num_ubatches)
|
||||
|
||||
if self.use_v2_model_runner:
|
||||
# OMNI: v2 model runner does not yet include omni hooks.
|
||||
logger.warning("OMNI GPUARWorker forces v1 model runner for omni hooks.")
|
||||
self.use_v2_model_runner = False
|
||||
model_stage = getattr(self.model_config, "model_stage", None)
|
||||
stage_id = getattr(self.model_config, "stage_id", None)
|
||||
|
||||
# Construct the model runner
|
||||
self.model_runner = self.model_runner_cls(self.vllm_config, self.device)
|
||||
self.use_v2_model_runner = bool(getattr(self.model_config, "use_v2_model_runner", False))
|
||||
if self.use_v2_model_runner:
|
||||
from vllm_omni.worker_v2.omni_ar_model_runner import (
|
||||
OmniARModelRunner,
|
||||
)
|
||||
|
||||
logger.info(
|
||||
"Using MR v2 OmniARModelRunner for omni AR stage (stage_id=%s model_stage=%s).",
|
||||
stage_id,
|
||||
model_stage,
|
||||
)
|
||||
self.model_runner = OmniARModelRunner(self.vllm_config, self.device)
|
||||
else:
|
||||
self.use_v2_model_runner = False
|
||||
self.model_runner = self.model_runner_cls(self.vllm_config, self.device)
|
||||
|
||||
if self.rank == 0:
|
||||
# If usage stat is enabled, collect relevant info.
|
||||
|
||||
Reference in new issue
Block a user