File size: 2,033 Bytes
adabee1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #!/usr/bin/env bash
# Night of 2026-11-25, part 4 (GPU 0, queued ~23:20 UTC, starts when runs/vocoder-r9-Ctex ends ~00:17).
# The round 8 idea, cancelled at 19:00, now on T's pairs: lowering the mel weight 15 -> 5 was the
# strongest buzz lever since the pairs (TTS locking 0.48 -> 0.40 at 1-2 kHz; real 0.33). This
# goes one step further: Ctex continued with --mel-weight 2, the same recipe otherwise (fresh
# cosine 5e-5, 500 warm-up, 20k steps), on data/vocoder-pairs-tex120k.
# Run detached in the v3 image:
# docker compose run -d --name tiny-voca-dk-night4 kit-v3 \
# bash -c "bash scripts/night4_chain.sh > checks/night4-chain.log 2>&1"
set -uo pipefail
cd /opt/kit
stamp() { echo "== stage $1 $(date -u +%FT%TZ)"; }
wait_gpu() { # device index, free bytes needed
until CUDA_VISIBLE_DEVICES=$1 python -c "import sys, torch; sys.exit(0 if torch.cuda.mem_get_info(0)[0] > $2 else 1)" 2>/dev/null
do sleep 30; done; }
GPU=${GPU:-0}
INIT=runs/vocoder-r9-Ctex/last.pt
OUT=runs/vocoder-r11-Ctex-m2
stamp wait-ctex
until grep -q "^tex exit=" checks/night2-chain.log 2>/dev/null; do sleep 60; done
grep -q "^tex exit=0" checks/night2-chain.log || { echo "exit=1 Ctex failed"; exit 1; }
START=(--init-from "$INIT" --fresh-schedule); [[ -f "$OUT/last.pt" ]] && START=(--resume)
wait_gpu "$GPU" 8e9
stamp vocoder
CUDA_VISIBLE_DEVICES=$GPU python -m tiny_voca.train_vocoder "${START[@]}" --prior --prior-high-hz 2500 --prior-high-gain 0.05 \
--prior-gain-range 0.0 0.1 --mel-weight 2 \
--manifests data/full-features/train.jsonl --validation data/full-features/validation.jsonl --output "$OUT" \
--steps 172000 --learning-rate 5e-5 --warmup 500 --batch 32 --teacher vocos --distill-mode spectrum --distill-weight 4 \
--pairs data/vocoder-pairs-tex120k/train/pairs.jsonl --pair-fraction 0.7 \
--device cuda --workers 6 --save-every 1000 --keep-every 4000 >> "$OUT.log" 2>&1
code=$?
[[ $code -eq 0 ]] && cp --update=none "$OUT/vocoder.pt" models/vocoder-r11-Ctex-m2-s172000.pt
echo "exit=$code $(date -u +%FT%TZ)"
|