Pre-download Qwen3-TTS model on container startup

This commit is contained in:
russell@unturf.com 2026-01-26 11:07:30 -05:00
parent b315659be6
commit 381ba3b462

View file

@ -2,9 +2,13 @@
[ -f speech.env ] && . speech.env
echo "First startup may download 2GB of speech models. Please wait."
echo "First startup may download ~3GB of Qwen3-TTS model. Please wait."
bash download_voices_tts-1.sh
bash download_voices_tts-1-hd.sh $PRELOAD_MODEL
# Pre-download Qwen3-TTS model (default engine)
python -c "from qwen_tts import Qwen3TTSModel; Qwen3TTSModel.from_pretrained('Qwen/Qwen3-TTS-12Hz-1.7B-Base')" 2>/dev/null || echo "Qwen3-TTS will download on first request"
# Optional: download legacy engines if enabled
# bash download_voices_tts-1.sh
# bash download_voices_tts-1-hd.sh $PRELOAD_MODEL
python speech.py ${PRELOAD_MODEL:+--preload $PRELOAD_MODEL} $EXTRA_ARGS $@