Upload training/scripts/train_quick.sh with huggingface_hub
Browse files
training/scripts/train_quick.sh
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
# MiniMax H3 LoRA — quick run (2 epochs, mega_curated 3.9k, i2va, video-only)
|
| 3 |
+
# Recipe: Akane fork c4b84fa + Ada anti-distillation flags (guidance 4/sigma/normalized,
|
| 4 |
+
# preservation 0.02, spatial jitter 0.2), int8 convrot, AdaLN rank 16, block swap for 5090 32GB.
|
| 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 |
+
export PYTORCH_ALLOC_CONF=expandable_segments:True
|
| 12 |
+
|
| 13 |
+
exec accelerate launch --num_cpu_threads_per_process 1 --mixed_precision bf16 \
|
| 14 |
+
src/musubi_tuner/minimax_h3_train_network.py \
|
| 15 |
+
--dit "$M/diffusion_models/minimax_h3_fl2va_bf16.safetensors" \
|
| 16 |
+
--dataset_config "$P/configs/dataset_quick_train.toml" \
|
| 17 |
+
--network_module networks.lora_minimax_h3 \
|
| 18 |
+
--network_dim 32 --network_alpha 32 \
|
| 19 |
+
--sdpa --mixed_precision bf16 --gradient_checkpointing \
|
| 20 |
+
--h3_convrot_int8 --h3_convrot_int8_fwd bf16 \
|
| 21 |
+
--h3_adaln_rank 16 \
|
| 22 |
+
--blocks_to_swap 24 --block_swap_h2d_only --block_swap_ring_size 2 \
|
| 23 |
+
--use_pinned_memory_for_block_swap \
|
| 24 |
+
--optimizer_type AdamW8bit --learning_rate 1e-4 \
|
| 25 |
+
--lr_scheduler constant_with_warmup --lr_warmup_steps 50 \
|
| 26 |
+
--max_grad_norm 1.0 \
|
| 27 |
+
--timestep_sampling uniform --discrete_flow_shift 1.0 \
|
| 28 |
+
--h3_guidance_distillation_scale 4 \
|
| 29 |
+
--h3_guidance_loss_schedule sigma \
|
| 30 |
+
--h3_guidance_loss_form normalized \
|
| 31 |
+
--h3_spatial_density_jitter 0.2 \
|
| 32 |
+
--h3_base_preservation_loss_weight 0.02 \
|
| 33 |
+
--seed 42 \
|
| 34 |
+
--max_data_loader_n_workers 8 --persistent_data_loader_workers \
|
| 35 |
+
--max_train_epochs 2 \
|
| 36 |
+
--save_every_n_steps 500 --save_state --autoresume --save_last_n_steps_state 1500 \
|
| 37 |
+
--text_encoder "$M/text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors" \
|
| 38 |
+
--text_encoder_quantization nvfp4_awq \
|
| 39 |
+
--vae "$M/vae/minimax_h3_video_vae_fp16.safetensors" \
|
| 40 |
+
--audio_vae "$M/vae/minimax_h3_audio_vae_fp32.safetensors" \
|
| 41 |
+
--sample_prompts "$P/configs/sample_prompts.txt" \
|
| 42 |
+
--sample_at_first --sample_every_n_steps 500 \
|
| 43 |
+
--output_dir "$P/output" --output_name minih33_quick \
|
| 44 |
+
--log_with tensorboard --logging_dir "$P/logs/tb" \
|
| 45 |
+
"$@"
|