Files
hao-ai-lab-FastVideo/fastvideo/train
Will LinandClaude Fable 5 69fb5af602 [train] H3 VSA/DMD2 training fixes: bf16 boundaries, validation offload, buffer-free AdamW
- VSA-H3 backend + DistributedAttention_VSA: cast autocast-fp32 activations
  to bf16 before comm/tiling (kernels are bf16-only; RMSNorm emits fp32
  under autocast), restore output dtype.
- minimax_h3 DiT: recompute gate_compress activity under grad instead of
  trusting a cached no-grad answer.
- Scheduler: shift_sigmas() helper; denoising stage honors
  pipeline_config.dmd_denoising_steps with per-modality shifts so validation
  samples at the exact training sigmas; batch.VSA_sparsity fallback.
- ValidationCallback: never .to('cpu') FSDP-managed modules, inject the
  method's dmd_denoising_steps, post-validation off-CUDA param scan;
  make_inference_args no longer defaults dit_cpu_offload=True (this offloaded
  the live training student after every validation).
- AdamWBeta1Zero: beta1=0 AdamW without the exp_avg buffer (mathematically
  identical; saves one full parameter-sized state per trainable model),
  auto-selected when betas[0] == 0.
- methods/base + train models: per-role attn kind for VIDEO_SPARSE_ATTN_H3,
  VSA metadata built in the base H3 model's prepare_batch (DMD wrapper
  inherits), device-scan probe compares against the model's own device.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-11 04:41:35 +00:00
..
2026-07-19 18:37:47 -07:00

Fastvideo New Modular Training Framework

This is the new training infrastructure for FastVideo, replacing the monolithic per-model pipeline scripts in fastvideo/training/.

Key differences from fastvideo/training/

fastvideo/training/ (legacy) fastvideo/train/ (new)
Architecture One pipeline class per model+method combo Composable: model plugins + method classes
Adding a model Write a full training pipeline from scratch Add a model plugin under models/
Adding a method Fork an existing pipeline Add a method class under methods/
Config Flat argparse flags Hierarchical YAML with dotted-key overrides
Distributed Manual FSDP setup per pipeline Shared trainer handles FSDP/HSDP

Structure

fastvideo/train/
├── models/       # Per-model plugins (wan/, hunyuan/, ...)
├── methods/      # Training methods (fine_tuning/, distribution_matching/, ...)
├── callbacks/    # Validation, grad clipping, etc.
├── entrypoint/   # CLI entry points (train.py, dcp_to_diffusers.py)
├── trainer.py    # Core training loop
└── utils/        # Config parsing, dataloader, etc.

Usage

See examples/train/ for configs and launch scripts.

Guides