Lauffähige Cloning Version

This commit is contained in:
2026-06-19 15:52:58 +02:00
parent 569970e339
commit a5230964cb
5 changed files with 266 additions and 8 deletions

View File

@@ -2,7 +2,7 @@
set -e
MODEL="${QWEN3_TTS_CLONE_MODEL:-}"
PORT="${QWEN3_TTS_CLONE_PORT:-8093}"
PORT="${QWEN3_TTS_CLONE_PORT:-8091}"
if [ -z "$MODEL" ]; then
echo "[clone] QWEN3_TTS_CLONE_MODEL ist nicht gesetzt." >&2
@@ -11,4 +11,36 @@ fi
echo "[clone] starte Clone-Modell: ${MODEL} auf Port ${PORT}"
exec vllm-omni serve "$MODEL" --omni --host 0.0.0.0 --port "$PORT" --deploy-config /deploy/qwen3_tts.yaml --gpu-memory-utilization 0.10 --trust-remote-code
if [ -f /patch_qwen3_tts_runtime.py ]; then
python3 /patch_qwen3_tts_runtime.py
fi
vllm-omni serve "$MODEL" \
--omni \
--host 0.0.0.0 \
--port "$PORT" \
--deploy-config /deploy/qwen3_tts.yaml \
--gpu-memory-utilization 0.10 \
--trust-remote-code &
SERVER_PID=$!
(
for _ in $(seq 1 150); do
if curl -sf "http://localhost:${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" \
-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.\"}" \
-o /dev/null \
&& echo "[warmup] Clone fertig nach $(( SECONDS - t0 ))s — jetzt heiß." \
|| echo "[warmup] fehlgeschlagen (Clone läuft trotzdem)."
break
fi
sleep 2
done
) &
trap 'kill "$SERVER_PID" 2>/dev/null || true' TERM INT
wait "$SERVER_PID"