| #!/bin/bash | |
| #SBATCH --job-name=infer_sa_fix | |
| #SBATCH --mail-type=FAIL,END | |
| #SBATCH --mail-user=dingqy@umich.edu | |
| #SBATCH --nodes=1 | |
| #SBATCH --ntasks-per-node=1 | |
| #SBATCH --cpus-per-task=4 | |
| #SBATCH --mem-per-cpu=11GB | |
| #SBATCH --time=0:30:00 | |
| #SBATCH --account=ahowens1 | |
| #SBATCH --partition=spgpu | |
| #SBATCH --qos=foe | |
| #SBATCH --reservation=spgpu_foe_nodes | |
| #SBATCH --gres=gpu:a40:1 | |
| #SBATCH --output=/nfs/turbo/coe-ahowens-nobackup/dingqy/infer_sa_fix-%j.log | |
| set -eu | |
| source /nfs/turbo/coe-ahowens-nobackup/dingqy/miniforge3/etc/profile.d/conda.sh | |
| source /home/dingqy/.hf_token | |
| conda activate stable-audio | |
| CACHE=/nfs/turbo/coe-ahowens-nobackup/dingqy/.cache/huggingface | |
| CKPT=$(python - <<PYEOF | |
| from huggingface_hub import hf_hub_download | |
| print(hf_hub_download(repo_id="AE-W/ckpt", | |
| filename="sa_open_bg2fg_rebalance/ah30jdoz/epoch=0-step=30000.ckpt", | |
| repo_type="dataset", cache_dir="$CACHE"), end="") | |
| PYEOF | |
| ) | |
| echo "ckpt=$CKPT" | |
| python /nfs/turbo/coe-ahowens-nobackup/dingqy/infer_sa_bg2fg.py \ | |
| --ckpt "$CKPT" --steps 100 --cfg-scale 1.0 | |
| # Regenerate the spectrogram PNGs from the (fixed) new wavs | |
| python /nfs/turbo/coe-ahowens-nobackup/dingqy/regen_demo_specs.py | |
| echo "done" | |