Files
hao-ai-lab-FastVideo/examples
leffffandClaude Sonnet 5 2dbb0c94a9 [feat] Add Kandinsky5 QAD training pipeline: data preprocessing, QAT finetune, QAT-aware DMD distillation
Adds the training-side counterpart to the existing Kandinsky-5 T2V/I2V
inference pipeline (#1471): a full quantization-aware distillation (QAD)
recipe for Kandinsky-5.0 Lite T2V at 512x768/121 frames on the new
fastvideo/train/ stack.

- Data preprocessing: preprocess_kandinsky5_overfit.py encodes raw
  video + captions (Kandinsky5's shared HunyuanVideo VAE + dual
  Qwen/Reason1 + CLIP text encoders) into the t2v parquet schema.
- Stage 1 (Attn-QAT finetune): fastvideo.train.models.kandinsky5.Kandinsky5Model
  wires Kandinsky5 into the modular trainer; FASTVIDEO_ATTENTION_BACKEND=
  ATTN_QAT_TRAIN routes dense/local attention through a fake-quantized
  straight-through-estimator kernel during finetuning so the DiT learns
  to absorb quantization error. No weight quantization during training.
- Stage 2 (QAT-aware DMD2 distillation): Kandinsky5DmdDenoisingStage +
  Kandinsky5DMDPipeline distill the stage-1 checkpoint from many-step
  teacher sampling down to a 4-step student, with teacher/critic masked
  back to full-precision dense attention regardless of the student's
  QAT env var (component_loader.py's _loading_teacher_critic_model gate).

See examples/train/configs/fine_tuning/kandinsky5/README.md for the full
data -> stage-1 -> stage-2 -> inference (NVFP4/FP8) walkthrough.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-26 02:29:52 -07:00
..
2026-07-19 18:37:47 -07:00