Upload training/scripts/cache_quick.sh with huggingface_hub
Browse files
training/scripts/cache_quick.sh
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
# Latent + text-encoder caches for the quick run.
|
| 3 |
+
# Latents: batch capped at 4 (video VAE VRAM); TE: batch capped at 4 (32B VL encoder + first-frame image).
|
| 4 |
+
# Cache TOML has batch_size=8 in [general]; the CLI flag lowers it per stage.
|
| 5 |
+
set -Eeuo pipefail
|
| 6 |
+
source /venv/main/bin/activate
|
| 7 |
+
cd /workspace/projects/musubi-tuner
|
| 8 |
+
|
| 9 |
+
M=/workspace/models/MiniMax-H3
|
| 10 |
+
P=/workspace/projects/h3_loop
|
| 11 |
+
CFG="${1:-$P/configs/dataset_quick_cache.toml}"
|
| 12 |
+
|
| 13 |
+
echo "=== latent cache ($CFG) ==="
|
| 14 |
+
python src/musubi_tuner/minimax_h3_cache_latents.py \
|
| 15 |
+
--dataset_config "$CFG" \
|
| 16 |
+
--vae "$M/vae/minimax_h3_video_vae_fp16.safetensors" \
|
| 17 |
+
--device cuda --batch_size 24 --num_workers 16 \
|
| 18 |
+
--skip_existing --keep_cache
|
| 19 |
+
|
| 20 |
+
echo "=== text encoder cache (task i2va, guidance empty) ==="
|
| 21 |
+
python src/musubi_tuner/minimax_h3_cache_text_encoder_outputs.py \
|
| 22 |
+
--dataset_config "$CFG" \
|
| 23 |
+
--text_encoder "$M/text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors" \
|
| 24 |
+
--text_encoder_quantization nvfp4_awq \
|
| 25 |
+
--task i2va --cache_guidance_empty \
|
| 26 |
+
--device cuda --batch_size 24 --num_workers 16 \
|
| 27 |
+
--skip_existing --keep_cache
|
| 28 |
+
|
| 29 |
+
echo "=== cache sizes ==="
|
| 30 |
+
du -sh /workspace/cache/quick/* 2>/dev/null
|