Text-to-Video
Diffusers
Safetensors
MiniMax H3
video
audio
text-to-audio-video
distillation
dmd2
few-step
fastvideo
fasth3
Instructions to use FastVideo/FastVideo-FastH3-8-Step-V2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use FastVideo/FastVideo-FastH3-8-Step-V2 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("FastVideo/FastVideo-FastH3-8-Step-V2", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
| { | |
| "base_model_dir": "/mnt/lustre/vlm-k1kong/models/MiniMax-H3", | |
| "config": { | |
| "callbacks": { | |
| "grad_clip": { | |
| "_target_": "fastvideo.train.callbacks.grad_clip.GradNormClipCallback", | |
| "max_grad_norm": 1.0 | |
| }, | |
| "latent_vis": { | |
| "_target_": "fastvideo.train.callbacks.latent_vis.LatentVisCallback", | |
| "every_steps": 100, | |
| "fps": 24 | |
| }, | |
| "validation": { | |
| "_target_": "fastvideo.train.callbacks.validation.ValidationCallback", | |
| "dataset_file": "/mnt/lustre/vlm-shared/h3_t2av_preprocessed/v10_mixed_native_v3/validation/heldout60.json", | |
| "every_steps": 100, | |
| "guidance_scale": 1.0, | |
| "max_record_num_frames": 345, | |
| "num_videos_per_prompt": 1, | |
| "offload_training_state": true, | |
| "pipeline_target": "fastvideo.pipelines.basic.minimax_h3.minimax_h3_pipeline.MiniMaxH3Pipeline", | |
| "run_at_start": true, | |
| "sampling_steps": [ | |
| 8 | |
| ], | |
| "sampling_timesteps": [ | |
| 999, | |
| 874, | |
| 749, | |
| 624, | |
| 500, | |
| 375, | |
| 250, | |
| 125 | |
| ], | |
| "text_encoder_cpu_offload": true, | |
| "use_record_dimensions": true, | |
| "use_validation_media_conditioning": false, | |
| "vae_cpu_offload": true | |
| } | |
| }, | |
| "method": { | |
| "_target_": "fastvideo.train.methods.distribution_matching.dmd2.DMD2Method", | |
| "cfg_uncond": { | |
| "text": "zero" | |
| }, | |
| "dmd_denoising_steps": [ | |
| 999, | |
| 874, | |
| 749, | |
| 624, | |
| 500, | |
| 375, | |
| 250, | |
| 125 | |
| ], | |
| "fake_score_betas": [ | |
| 0.9, | |
| 0.999 | |
| ], | |
| "fake_score_learning_rate": 2e-06, | |
| "fake_score_loss_space": "x0", | |
| "fake_score_lr_scheduler": "constant", | |
| "generator_update_interval": 5, | |
| "max_timestep_ratio": 0.999, | |
| "min_timestep_ratio": 0.001, | |
| "real_score_guidance_scale": 1.0, | |
| "rollout_carry": true, | |
| "rollout_carry_slots": 4, | |
| "rollout_mode": "simulate", | |
| "rollout_sample_type": "ode", | |
| "score_timestep_continuous": true, | |
| "score_timestep_shift": 2.4, | |
| "score_timestep_warp_max": 0.999 | |
| }, | |
| "models": { | |
| "critic": { | |
| "_target_": "fastvideo.train.models.minimax_h3.MiniMaxH3DMDModel", | |
| "attention_backend": "FLASH_ATTN", | |
| "disable_custom_init_weights": true, | |
| "enable_gradient_checkpointing_type": "full", | |
| "init_from": "/mnt/lustre/vlm-k1kong/models/MiniMax-H3", | |
| "trainable": true | |
| }, | |
| "student": { | |
| "_target_": "fastvideo.train.models.minimax_h3.MiniMaxH3DMDModel", | |
| "attention_backend": "VIDEO_SPARSE_ATTN_H3", | |
| "enable_gradient_checkpointing_type": "full", | |
| "init_from": "/mnt/lustre/vlm-k1kong/models/MiniMax-H3", | |
| "trainable": true | |
| }, | |
| "teacher": { | |
| "_target_": "fastvideo.train.models.minimax_h3.MiniMaxH3DMDModel", | |
| "attention_backend": "FLASH_ATTN", | |
| "disable_custom_init_weights": true, | |
| "init_from": "/mnt/lustre/vlm-k1kong/models/MiniMax-H3", | |
| "trainable": false | |
| } | |
| }, | |
| "pipeline": { | |
| "audio_scheduler_shift": 3.0, | |
| "dit_config": { | |
| "uniform_parameter_dtype": false | |
| }, | |
| "video_scheduler_shift": 10.0 | |
| }, | |
| "training": { | |
| "checkpoint": { | |
| "checkpointing_start_step": 100, | |
| "checkpoints_total_limit": 3, | |
| "inference_checkpoint_dtype": "bfloat16", | |
| "inference_checkpoint_role": "student", | |
| "output_dir": "/mnt/lustre/vlm-wlsaidhi/fastvideo/outputs/minimax_h3_dmd2_sp4_fsdp64_v14_datafree_mixed_vsa80_8step_vshift10", | |
| "require_complete_training_checkpoint": true, | |
| "resume_from_checkpoint": "latest", | |
| "save_inference_checkpoint_on_validation": true, | |
| "training_state_checkpointing_steps": 100 | |
| }, | |
| "data": { | |
| "data_path": [ | |
| "/mnt/lustre/vlm-shared/h3_t2av_preprocessed/v10_mixed_native_v3/h3_t2av_video_nuva_50k_720_mixed_len/data", | |
| "/mnt/lustre/vlm-shared/h3_t2av_preprocessed/v10_mixed_native_v3/h3_t2av_video_5s_768p/data", | |
| "/mnt/lustre/vlm-shared/h3_t2av_preprocessed/v10_mixed_native_v3/h3_t2av_video_nuva_10k_720_mixed_len/data", | |
| "/mnt/lustre/vlm-shared/h3_t2av_preprocessed/v10_mixed_native_v3/h3_t2av_video_nuva_10k_mixed_res_len/data", | |
| "/mnt/lustre/vlm-shared/h3_t2av_preprocessed/v10_mixed_native_v3/h3_t2av_fastgen_vidprom_150k/data" | |
| ], | |
| "dataloader_num_workers": 0, | |
| "native_shape_bucketing": true, | |
| "num_frames": 124, | |
| "num_height": 768, | |
| "num_latent_t": 37, | |
| "num_width": 1344, | |
| "preprocessed_data_type": "text_only", | |
| "seed": 42, | |
| "train_batch_size": 1, | |
| "training_cfg_rate": 0.0 | |
| }, | |
| "distributed": { | |
| "hsdp_replicate_dim": 1, | |
| "hsdp_shard_dim": 64, | |
| "num_gpus": 64, | |
| "sp_size": 4, | |
| "tp_size": 1 | |
| }, | |
| "dit_precision": "fp32", | |
| "loop": { | |
| "gradient_accumulation_steps": 4, | |
| "max_train_steps": 4000 | |
| }, | |
| "model": { | |
| "enable_gradient_checkpointing_type": "full", | |
| "enable_torch_compile": true, | |
| "precondition_outputs": false, | |
| "torch_compile_kwargs": { | |
| "dynamic": true, | |
| "recompile_limit": 32 | |
| } | |
| }, | |
| "optimizer": { | |
| "betas": [ | |
| 0.9, | |
| 0.999 | |
| ], | |
| "learning_rate": 2e-06, | |
| "lr_scheduler": "constant", | |
| "lr_warmup_steps": 0, | |
| "weight_decay": 0.01 | |
| }, | |
| "tracker": { | |
| "project_name": "h3-dmd2-vsa", | |
| "run_name": "dmd2_sp4_fsdp64_v14_datafree_mixed_vsa80_8step_vshift10" | |
| }, | |
| "vsa": { | |
| "sparsity": 0.8, | |
| "tile_size": 64 | |
| } | |
| } | |
| }, | |
| "dtype": "bfloat16", | |
| "format_version": 1, | |
| "kind": "inference", | |
| "max_shard_size_bytes": 5368709120, | |
| "module": "transformer", | |
| "role": "student", | |
| "shard_count": 14, | |
| "shard_file_sizes": [ | |
| 5331008552, | |
| 5318721256, | |
| 5318721248, | |
| 4875566048, | |
| 5318505992, | |
| 5164580688, | |
| 5318721240, | |
| 5318721248, | |
| 4875566056, | |
| 5318505984, | |
| 5164580688, | |
| 5318721256, | |
| 5318721208, | |
| 2138941296 | |
| ], | |
| "shard_sizes": [ | |
| 5331000320, | |
| 5318715392, | |
| 5318715392, | |
| 4875560448, | |
| 5318500352, | |
| 5164574720, | |
| 5318715392, | |
| 5318715392, | |
| 4875560448, | |
| 5318500352, | |
| 5164574720, | |
| 5318715392, | |
| 5318715392, | |
| 2138938880 | |
| ], | |
| "step": 1300, | |
| "tensor_count": 688, | |
| "total_size": 70099502592 | |
| } | |