# Stable Audio 3 small-sfx 音效生成环境变量(模板) # 用法: cp env.d/sfx.example.sh env.d/sfx.sh,填入真实 HF_TOKEN 后 source env.d/sfx.sh # 注意: env.d/sfx.sh 含真实 token,已被 .gitignore 忽略,切勿提交 export PATH="$HOME/.local/bin:$PATH" export HF_HOME=/home/xsl/SoundGame/models/hf # 注意: hf-mirror 镜像会把 gated 模型 308 重定向回 huggingface.co 导致下载失败。 # Stable Audio 3 是 gated 模型, 必须直连官方端点。 # 若以后直连失效且只用公开模型, 可临时改回镜像: # export HF_ENDPOINT=https://hf-mirror.com # 本机 pypi.org 直连极慢, 重装/更新依赖时走阿里云镜像 (uv sync 用) export UV_DEFAULT_INDEX=https://mirrors.aliyun.com/pypi/simple/ # 接受 https://huggingface.co/stabilityai/stable-audio-3-small-sfx 的许可后, # 在 https://huggingface.co/settings/tokens 创建 read 权限 token 填入: export HF_TOKEN=hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx