feat: 支持配置本地模型路径
This commit is contained in:
9
start.sh
9
start.sh
@@ -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
|
||||
Reference in New Issue
Block a user