Repository navigation
Expand file tree
/
Copy pathMiniMax-H3-NF4-Ref2VA.sh
More file actions
27 lines (25 loc) · 1.71 KB
/
Copy pathMiniMax-H3-NF4-Ref2VA.sh
File metadata and controls
27 lines (25 loc) · 1.71 KB
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
modelscope download --dataset DiffSynth-Studio/diffsynth_example_dataset --include "minimax_h3/MiniMax-H3-Ref2VA/*" --local_dir ./data/diffsynth_example_dataset
# Optional: fuse the DeCFG training adapter into the DiT while training, for a better optimization landscape on this CFG-distilled base. Training only -- do not load it at inference.
# modelscope download --model DiffSynth-Studio/MiniMax-H3-TrainingAdapter --include model_ref2va.safetensors --local_dir ./models/DiffSynth-Studio/MiniMax-H3-TrainingAdapter
# --preset_lora_path "./models/DiffSynth-Studio/MiniMax-H3-TrainingAdapter/model_ref2va.safetensors" \
# --preset_lora_model "dit"
accelerate launch examples/minimax_h3/model_training/train.py \
--dataset_base_path data/diffsynth_example_dataset/minimax_h3/MiniMax-H3-Ref2VA \
--dataset_metadata_path data/diffsynth_example_dataset/minimax_h3/MiniMax-H3-Ref2VA/metadata.json \
--data_file_keys "video,input_audio,references" \
--extra_inputs "input_audio,references" \
--height 480 \
--width 832 \
--num_frames 124 \
--dataset_repeat 100 \
--model_id_with_origin_paths "DiffSynth-Studio/MiniMax-H3-NF4:minimax-h3-text-encoder-nf4.safetensors,DiffSynth-Studio/MiniMax-H3-NF4:minimax-h3-ref2va-nf4.safetensors,DiffSynth-Studio/MiniMax-H3-NF4:video_vae_nf4.safetensors,DiffSynth-Studio/MiniMax-H3-NF4:audio_vae_nf4.safetensors" \
--processor_path "MiniMax/MiniMax-H3:Ref2VA/processor/" \
--learning_rate 1e-4 \
--num_epochs 5 \
--remove_prefix_in_ckpt "pipe.dit." \
--output_path "./models/train/MiniMax-H3-Ref2VA-nf4" \
--lora_base_model "dit" \
--lora_target_modules "attn.qkv_proj,attn.out_proj,mlp.fc1,mlp.fc2" \
--lora_rank 32 \
--use_gradient_checkpointing \
--find_unused_parameters