Download launch.sh from ajh-code/Fish-Audio-S2-Pro-NVFP4-Balanced: direct link, hf CLI and curl.
- Browser
- Download file 1.31 kB
-
https://huggingface.co/ajh-code/Fish-Audio-S2-Pro-NVFP4-Balanced/resolve/main/launch.sh
- Command line
-
hf download hf://ajh-code/Fish-Audio-S2-Pro-NVFP4-Balanced/launch.sh
-
curl -L -o launch.sh https://huggingface.co/ajh-code/Fish-Audio-S2-Pro-NVFP4-Balanced/resolve/main/launch.sh
1.31 kB
| set -euo pipefail | |
| release_root="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | |
| python_bin="${TTS_PYTHON:-${release_root}/.venv/bin/python}" | |
| listen_host="${TTS_HOST:-0.0.0.0}" | |
| listen_port="${TTS_PORT:-8080}" | |
| device_name="${TTS_DEVICE:-cuda:0}" | |
| cache_length="${TTS_CACHE_LENGTH:-3072}" | |
| runtime_data="${TTS_RUNTIME_DATA:-${release_root}/runtime-data}" | |
| if [[ ! -x "${python_bin}" ]]; then | |
| echo "Python environment not found at ${python_bin}; run ./install.sh first." >&2 | |
| exit 1 | |
| fi | |
| mkdir -p "${runtime_data}/references" "${runtime_data}/torch-extensions" | |
| export FISH_NVFP4_ROOT="${release_root}" | |
| export FISH_NVFP4_BUILD_ROOT="${runtime_data}/torch-extensions" | |
| export PYTHONPATH="${release_root}/runtime${PYTHONPATH:+:${PYTHONPATH}}" | |
| export TEMPORARILY_DISABLE_PROTOBUF_VERSION_CHECK=true | |
| export TORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST:-12.0a}" | |
| server_args=( | |
| "${release_root}/runtime/server.py" | |
| --checkpoint "${release_root}" | |
| --host "${listen_host}" | |
| --port "${listen_port}" | |
| --device "${device_name}" | |
| --cache-length "${cache_length}" | |
| ) | |
| if [[ "${TTS_VERIFY_CHECKSUMS:-0}" == "1" ]]; then | |
| server_args+=(--verify-checksums) | |
| fi | |
| if [[ -n "${TTS_API_KEY:-}" ]]; then | |
| server_args+=(--api-key "${TTS_API_KEY}") | |
| fi | |
| cd "${runtime_data}" | |
| exec "${python_bin}" "${server_args[@]}" | |