From 5fd69f06b1370e404c2023f944590806284d4523 Mon Sep 17 00:00:00 2001 From: Vuong Hoang Date: Mon, 27 Apr 2026 22:07:03 -0700 Subject: [PATCH] qwen3-tts: wire optimized backend to /app/config.yaml so model registry actually loads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The wrapper's `optimized` backend (torch.compile + CUDA graphs + real-time streaming) reads its model registry from a YAML config: default path is ~/qwen3-tts/config.yaml inside the container, which doesn't exist. Without TTS_CONFIG set, the backend boots with an empty registry and every synthesis request fails with "Unknown model key: ''. Available: []". The repo ships /app/config.yaml with all 4 model variants defined. Pointing TTS_CONFIG at it lets the optimized backend load cleanly. This is a prerequisite for benching the optimized backend properly — it's the path to the upstream's claimed 97 ms streaming TTFB. The default `official` backend uses naive HF transformers autoregressive generation that pegged GPU at only 27% utilization and gave us 8-12 s TTFB on bench (no recompile theory needed — same phrase repeated 4x plateaued at 8.5 s, ruling out shape-specific recompilation). --- stacks/qwen3-tts/compose.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stacks/qwen3-tts/compose.yaml b/stacks/qwen3-tts/compose.yaml index ff02623..8589eee 100644 --- a/stacks/qwen3-tts/compose.yaml +++ b/stacks/qwen3-tts/compose.yaml @@ -52,6 +52,13 @@ services: - PORT=8880 - TTS_BACKEND=${QWEN3_TTS_BACKEND:-official} - TTS_MODEL_NAME=${QWEN3_TTS_MODEL:-Qwen/Qwen3-TTS-12Hz-1.7B} + # Only used when TTS_BACKEND=optimized — points the optimized backend + # at the upstream config.yaml (which defines the model registry + + # default model). Without this, the optimized backend looks at + # ~/qwen3-tts/config.yaml inside the container, which doesn't exist + # at runtime, leaving the model registry empty and synthesis fails + # with "Unknown model key". + - TTS_CONFIG=/app/config.yaml - TTS_WARMUP_ON_START=${QWEN3_TTS_WARMUP:-true} - TTS_MAX_CONCURRENT=${QWEN3_TTS_MAX_CONCURRENT:-1} - ENABLE_VOICE_STUDIO=${QWEN3_TTS_VOICE_STUDIO:-true}