mirror of
https://github.com/remsky/Kokoro-FastAPI.git
synced 2025-04-13 09:39:17 +00:00

Updates the service name to 'InstaVoice' and introduces multiple server services to enhance scalability. Modifies GPU resource allocation to use all available devices and adds an NGINX service for reverse proxy capabilities. Simplifies the structure for better management of the API and UI services.
31 lines
No EOL
662 B
Bash
Executable file
31 lines
No EOL
662 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Ensure models directory exists
|
|
mkdir -p api/src/models
|
|
|
|
# Function to download a file
|
|
download_file() {
|
|
local url="$1"
|
|
local filename=$(basename "$url")
|
|
echo "Downloading $filename..."
|
|
curl -L "$url" -o "api/src/models/$filename"
|
|
}
|
|
|
|
# Default PTH model if no arguments provided
|
|
DEFAULT_MODELS=(
|
|
"https://github.com/remsky/Kokoro-FastAPI/releases/download/v0.1.0/kokoro-v0_19.pth"
|
|
)
|
|
|
|
# Use provided models or default
|
|
if [ $# -gt 0 ]; then
|
|
MODELS=("$@")
|
|
else
|
|
MODELS=("${DEFAULT_MODELS[@]}")
|
|
fi
|
|
|
|
# Download all models
|
|
for model in "${MODELS[@]}"; do
|
|
download_file "$model"
|
|
done
|
|
|
|
echo "PyTorch model download complete!" |