vdub-hindi-dubbing / fetch_models.sh
Bbkblo's picture
update fetch_models.sh: generic + repo-local models
e3ba112 verified
Raw History Blame Contribute Delete
2.05 kB
#!/usr/bin/env bash
# ============================================================
# vdub — fetch_models.sh
# Repo clone me models na mile to ye unhe refill karta hai.
# (Repo me pehle se models/ folder hai — ye sirf backup/partial-clone ke liye)
# ============================================================
set -e
MODELS_DIR="${1:-./models}"
mkdir -p "$MODELS_DIR/chatterbox_hi" "$MODELS_DIR/mtl23" "$MODELS_DIR/separation" "$MODELS_DIR/nllb-200-distilled-600M"
echo "▶ refill target: $MODELS_DIR"
BASE="https://huggingface.co"
fetch() { # fetch <repo> <file> <dest>
if [ -f "$3" ] && [ "$(stat -c%s "$3" 2>/dev/null || echo 0)" -gt 1000000 ]; then
echo " (exists) $3"
return
fi
curl -L -C - -o "$3" "$BASE/$1/resolve/main/$2"
}
# [1] Chatterbox Hindi pack (MIT) — CORE TTS
fetch ResembleAI/Chatterbox-Multilingual-hi t3_hi.safetensors "$MODELS_DIR/chatterbox_hi/t3_hi.safetensors"
fetch ResembleAI/Chatterbox-Multilingual-hi s3gen_v3.pt "$MODELS_DIR/chatterbox_hi/s3gen_v3.pt"
fetch ResembleAI/Chatterbox-Multilingual-hi grapheme_mtl_merged_expanded_v1.json "$MODELS_DIR/chatterbox_hi/grapheme_mtl_merged_expanded_v1.json"
fetch ResembleAI/chatterbox ve.pt "$MODELS_DIR/chatterbox_hi/ve.pt"
# [2] 23-lang pack (MIT) — optional A/B
fetch ResembleAI/chatterbox t3_mtl23ls_v3.safetensors "$MODELS_DIR/mtl23/t3_mtl23ls_v3.safetensors"
# [3] Separation
fetch seanghay/uvr_models Kim_Vocal_2.onnx "$MODELS_DIR/separation/Kim_Vocal_2.onnx"
fetch FunAudioLLM/Fun-CineForge MelBandRoformer.ckpt "$MODELS_DIR/separation/MelBandRoformer.ckpt"
# [4] NLLB-200-600M translation (cc-by-nc)
for f in pytorch_model.bin config.json generation_config.json sentencepiece.bpe.model tokenizer.json tokenizer_config.json special_tokens_map.json; do
fetch facebook/nllb-200-distilled-600M "$f" "$MODELS_DIR/nllb-200-distilled-600M/$f"
done
echo
echo "✓ refill done — models:"
du -sh "$MODELS_DIR"