From bb973cb10cb81fa51712be43bac752567ecb8569 Mon Sep 17 00:00:00 2001 From: rein yang <73573651+R2-Y@users.noreply.github.com> Date: Wed, 24 Jun 2026 17:29:48 +0800 Subject: [PATCH] [Bugfix] [AURA] Correct aura results when use qwen3-tts in custom voice mode (#4650) Signed-off-by: R2-Y --- .../stage_input_processors/test_aura_omni.py | 3 ++- vllm_omni/deploy/aura_omni.yaml | 8 ++++---- .../model_executor/stage_input_processors/aura_omni.py | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/model_executor/stage_input_processors/test_aura_omni.py b/tests/model_executor/stage_input_processors/test_aura_omni.py index 21f798b3a..fa7ad2e8d 100644 --- a/tests/model_executor/stage_input_processors/test_aura_omni.py +++ b/tests/model_executor/stage_input_processors/test_aura_omni.py @@ -95,7 +95,7 @@ def test_aura2tts_builds_qwen3_tts_prompt_information(): [tts_input] = aura2tts([_source_output("Hello.")], prompt=[prompt]) - assert len(tts_input["prompt_token_ids"]) >= 32 + assert len(tts_input["prompt_token_ids"]) > 0 assert tts_input["additional_information"]["text"] == ["Hello."] assert PRECOMPUTED_TEXT_IDS_KEY not in tts_input["additional_information"] assert tts_input["additional_information"]["task_type"] == ["Base"] @@ -166,6 +166,7 @@ def test_aura2tts_supports_custom_voice_mode(): assert tts_input["additional_information"]["task_type"] == ["CustomVoice"] assert tts_input["additional_information"]["speaker"] == ["Vivian"] assert "ref_audio" not in tts_input["additional_information"] + assert len(tts_input["prompt_token_ids"]) == 14 def test_aura2tts_passes_token_ids_to_qwen3_tts_when_enabled(): diff --git a/vllm_omni/deploy/aura_omni.yaml b/vllm_omni/deploy/aura_omni.yaml index 55beb53a7..486e44b57 100644 --- a/vllm_omni/deploy/aura_omni.yaml +++ b/vllm_omni/deploy/aura_omni.yaml @@ -67,8 +67,8 @@ stages: devices: "0" output_connectors: to_stage_3: connector_of_shared_memory - # model: Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice - model: Qwen/Qwen3-TTS-12Hz-1.7B-Base + model: Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice + # model: Qwen/Qwen3-TTS-12Hz-1.7B-Base default_sampling_params: temperature: 0.9 top_k: 50 @@ -93,8 +93,8 @@ stages: devices: "0" input_connectors: from_stage_2: connector_of_shared_memory - # model: Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice - model: Qwen/Qwen3-TTS-12Hz-1.7B-Base + model: Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice + # model: Qwen/Qwen3-TTS-12Hz-1.7B-Base default_sampling_params: temperature: 0.0 top_p: 1.0 diff --git a/vllm_omni/model_executor/stage_input_processors/aura_omni.py b/vllm_omni/model_executor/stage_input_processors/aura_omni.py index c112e1e8e..789ed2c64 100644 --- a/vllm_omni/model_executor/stage_input_processors/aura_omni.py +++ b/vllm_omni/model_executor/stage_input_processors/aura_omni.py @@ -287,7 +287,7 @@ def _estimate_tts_prompt_len_from_token_ids( prompt_len = base_len + max(0, assistant_len - 6) else: prompt_len = base_len + 1 - return max(32, min(4096, int(prompt_len))) + return int(prompt_len) if task_type == "Base": in_context_mode = not bool(x_vector_only_mode) @@ -306,10 +306,10 @@ def _estimate_tts_prompt_len_from_token_ids( prompt_len = base_len + max(0, assistant_len - 6) else: prompt_len = base_len + 1 - return max(32, min(4096, int(prompt_len))) + return int(prompt_len) # Defensive fallback for unknown task types. - return max(32, min(4096, int(base_len + max(assistant_len, 1)))) + return int(base_len + max(assistant_len, 1)) def aura2tts(