Qwen3-TTS full-payload: emit empty-finished payload on degenerate take instead of dropping (fixes Stage-1 300s hang) (#4465)

Signed-off-by: jjw <m@jjw.in>
Signed-off-by: henryj <349043+henryj@users.noreply.github.com>
Co-authored-by: Yueqian Lin <70319226+linyueqian@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
authored and GitHub committed 2026-06-23 00:21:11 +00:00
1 parent 9177b37e2f
commit 9c260b3774
3 files changed
+59 -3

No files matched your search

@@ -27,6 +27,17 @@ from vllm_omni.model_executor.stage_input_processors.tts_utils import (
logger = init_logger(__name__)
def _qwen3_tts_empty_finished_payload():
"""Empty-but-finished stage payload. Returned instead of None on a degenerate
talker take so the Stage-1 wait gate releases (code2wav handles empty codec
input -> 0-sample audio, request finished) rather than the connector silently
dropping the request and Stage-1 hanging to connector_get_max_wait."""
return {
"codes": {"audio": torch.zeros(0, dtype=torch.long)},
"meta": {"finished": torch.tensor(True, dtype=torch.bool)},
}
def talker2code2wav(
source_outputs: list[Any],
prompt: Any = None,
@@ -474,7 +485,7 @@ def talker2code2wav_full_payload(
type(pooling_output).__name__,
rid,
)
return None
return _qwen3_tts_empty_finished_payload()
# codes.audio — try flat dotted first (flatten_payload), then nested fallback.
audio = pooling_output.get("codes.audio")
@@ -489,7 +500,7 @@ def talker2code2wav_full_payload(
list(pooling_output.keys()),
rid,
)
return None
return _qwen3_tts_empty_finished_payload()
audio = audio.to(torch.long)
audio = _filter_audio_codes_qwen3_tts(audio)
if audio.numel() == 0:
@@ -498,7 +509,7 @@ def talker2code2wav_full_payload(
"filter (negative/all-zero/out-of-range rows dropped) for req=%s.",
rid,
)
return None
return _qwen3_tts_empty_finished_payload()
output_token_ids = list(getattr(request, "output_token_ids", None) or [])
seq_len = max(len(output_token_ids) - 1, 0)