ckpt / code /infer_frieren_test_set.sbat
AE-W's picture
archive loose scripts/configs
219f052 verified
Raw
History Blame Contribute Delete
1.77 kB
#!/bin/bash
#SBATCH --job-name=fr_test_set
#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=3:00: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/fr_test_set-%j.log
#
# Frieren bulk inference on full 3919-pair test set.
# Best ckpt: x30o3oq8 step 14000 (val/loss_simple_ema = 3.62, lowest in run).
# Output: /home/dingqy/inference_demo/frieren_test_set/<rel_path>/{bg,fg_pred,mix}.wav
# LUFS protocol: bg=-30 (FIXED), mix=-23 (binary search on fg gain).
set -eu
source /nfs/turbo/coe-ahowens-nobackup/dingqy/miniforge3/etc/profile.d/conda.sh
source /home/dingqy/.hf_token
CACHE=/nfs/turbo/coe-ahowens-nobackup/dingqy/.cache/huggingface
conda activate V2A
FR_CKPT=$(python - <<PYEOF
from huggingface_hub import hf_hub_download
p = hf_hub_download(repo_id="AE-W/ckpt",
filename="frieren_bg2fg_rebalance/step00014000-0.0000.ckpt",
repo_type="dataset", cache_dir="$CACHE")
print(p, end="")
PYEOF
)
echo "ckpt: $FR_CKPT"
python /nfs/turbo/coe-ahowens-nobackup/dingqy/infer_frieren_test_set.py \
--ckpt "$FR_CKPT" \
--steps 26 --cfg-scale 1.0 \
--batch-size 32
echo ""
echo "=== sample subfolder check ==="
SAMPLE_DIR=$(find /home/dingqy/inference_demo/frieren_test_set -name "mix.wav" 2>/dev/null | head -1 | xargs dirname 2>/dev/null)
echo "first subfolder: $SAMPLE_DIR"
[ -n "$SAMPLE_DIR" ] && ls -la "$SAMPLE_DIR"
echo ""
echo "=== count ==="
find /home/dingqy/inference_demo/frieren_test_set -name "mix.wav" 2>/dev/null | wc -l
echo "done"