feat: 支持配置本地模型路径

This commit is contained in:
2026-04-22 16:34:03 +08:00
parent f7c1bed80e
commit e6ae11b7c4
3 changed files with 60 additions and 10 deletions

View File

@@ -4,8 +4,17 @@
cd "$(dirname "$0")"
PORT=${PORT:-12002}
MODEL_PATH=${MODEL_PATH:-""}
MODEL_SOURCE=${MODEL_SOURCE:-"auto"}
echo "Starting ChatTTS service on port $PORT..."
echo "Device: $(python3 -c 'import torch; print("cuda" if torch.cuda.is_available() else "cpu")')"
if [ -n "$MODEL_PATH" ]; then
echo "Model path: $MODEL_PATH"
fi
export MODEL_PATH
export MODEL_SOURCE
python3 server.py