Skip to content

[BUG FIX]: prevent EngineCore crash when Qwen TTS Base task is missing ref_text#2203

Open
teith wants to merge 3 commits intovllm-project:mainfrom
teith:fix/qwen3-tts-missing-ref-text-crash
Open

[BUG FIX]: prevent EngineCore crash when Qwen TTS Base task is missing ref_text#2203
teith wants to merge 3 commits intovllm-project:mainfrom
teith:fix/qwen3-tts-missing-ref-text-crash

Conversation

@teith
Copy link

@teith teith commented Mar 26, 2026

A single malformed request to /v1/audio/speech with task_type=Base and no ref_text kills the entire EngineCore. All subsequent requests — including valid ones — fail with EngineDeadError.

Reproduce:
serve:
vllm-omni serve Qwen/Qwen3-TTS-12Hz-1.7B-Base --omni --trust-remote-code --host 0.0.0.0 --port 8000 --enforce-eager

from openai import OpenAI
client = OpenAI(api_key="none", base_url="http://localhost:8000/v1")
client.audio.speech.create(
    model="Qwen/Qwen3-TTS-12Hz-1.7B-Base",
    voice="clone",
    input="Hello",
    extra_body={
        "task_type": "Base",
        "ref_audio": "https://cdn-media.huggingface.co/speech_samples/sample1.flac",
    },
)
# Engine is now dead. Every subsequent request returns EngineDeadError.

Root cause: _build_prompt_embeds() raises ValueError when ref_text is missing in ICL mode. vLLM v1 treats any worker exception as fatal.

Fix:
serving_speech.py: validate ref_text presence for Base task before the request reaches the engine (returns HTTP 400)
qwen3_tts_talker.py: fall back to x-vector-only mode instead of raising, matching the existing non-ICL codepath (protects offline inference and other entrypoints)

@teith teith requested a review from hsliuustc0106 as a code owner March 26, 2026 00:39
@yenuo26
Copy link
Contributor

yenuo26 commented Mar 26, 2026

Do we need to add test cases for this scenario? @linyueqian

@linyueqian
Copy link
Collaborator

Do we need to add test cases for this scenario? @linyueqian

yes, it would be great.

Copy link
Collaborator

@linyueqian linyueqian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@linyueqian linyueqian added the ready label to trigger buildkite CI label Mar 26, 2026
@linyueqian
Copy link
Collaborator

fix pre-commit please

@linyueqian
Copy link
Collaborator

fix dco please

teith and others added 2 commits March 27, 2026 01:40
@teith teith force-pushed the fix/qwen3-tts-missing-ref-text-crash branch from 4babda6 to 152f1b6 Compare March 27, 2026 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready label to trigger buildkite CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants