Funktionierender STand!!!

This commit is contained in:
2026-06-20 19:54:41 +02:00
parent 404c632cfc
commit cc3c0dad7b
6 changed files with 379 additions and 89 deletions

View File

@@ -2,33 +2,43 @@
set -e
MODEL="${QWEN3_TTS_CLONE_MODEL:-}"
PORT="${QWEN3_TTS_CLONE_PORT:-8091}"
PORT="${QWEN3_TTS_CLONE_PORT:-8091}" # external-facing proxy port
VLLM_PORT=8095 # internal vllm-omni port
if [ -z "$MODEL" ]; then
echo "[clone] QWEN3_TTS_CLONE_MODEL ist nicht gesetzt." >&2
exit 2
fi
echo "[clone] starte Clone-Modell: ${MODEL} auf Port ${PORT}"
echo "[clone] starte Clone-Modell: ${MODEL} auf Port ${PORT} (vllm intern: ${VLLM_PORT})"
if [ -f /patch_qwen3_tts_runtime.py ]; then
python3 /patch_qwen3_tts_runtime.py
fi
# Proxy auf client-facing PORT; leitet an internen VLLM_PORT weiter.
if [ -f /ws_log_proxy.py ]; then
python3 /ws_log_proxy.py \
--host 0.0.0.0 \
--port "$PORT" \
--upstream "ws://localhost:${VLLM_PORT}/v1/audio/speech/stream" &
echo "[ws-proxy] Proxy läuft auf Port ${PORT} -> vllm-omni Port ${VLLM_PORT}"
fi
vllm-omni serve "$MODEL" \
--omni \
--host 0.0.0.0 \
--port "$PORT" \
--port "$VLLM_PORT" \
--deploy-config /deploy/qwen3_tts_clone.yaml \
--trust-remote-code &
SERVER_PID=$!
(
for _ in $(seq 1 150); do
if curl -sf "http://localhost:${PORT}/health" >/dev/null 2>&1; then
if curl -sf "http://localhost:${VLLM_PORT}/health" >/dev/null 2>&1; then
echo "[warmup] Clone gesund — sende Warmup-Request (kompiliert CUDA-Graphen)..."
t0=$SECONDS
curl -sf -X POST "http://localhost:${PORT}/v1/audio/speech" \
curl -sf -X POST "http://localhost:${VLLM_PORT}/v1/audio/speech" \
-H 'Content-Type: application/json' \
--max-time 180 \
-d "{\"model\":\"${MODEL}\",\"input\":\"System wird aufgewärmt.\",\"language\":\"German\",\"response_format\":\"wav\",\"task_type\":\"VoiceDesign\",\"instructions\":\"Eine ruhige Stimme.\"}" \