Fixes all P1/P2 items from the review of 7c7704da: - E2E test's data_path pointed at a nonexistent combined_parquet_dataset/ subdir; preprocess_kandinsky5_overfit.py writes directly to its output root. - Stage 2 loaded the raw DCP checkpoint-N/ directly, which isn't a diffusers model dir. Added dcp_to_diffusers --verify (strict-reload the export immediately) and wired the conversion into the E2E test, launcher scripts, and README between stage 1 and stage 2. - Kandinsky5DmdDenoisingStage called the transformer without set_forward_context, so LocalAttention's missing-context guard caught the AssertionError and silently fell back to plain SDPA -- Stage 2 validation never actually exercised ATTN_QAT_TRAIN. Wrapped the call to match the parent stage's contract and added a scoped backend assertion (ATTN_QAT_TRAIN/ATTN_QAT_INFER only, since other backends can legitimately fall back to auto-selection). - Exported DMD checkpoints kept the base T2V model_index.json, so VideoGenerator.from_pretrained resolved them to Kandinsky5T2VPipeline instead of the DMD sampler. Added Kandinsky5DMDConfig and documented the required override_pipeline_cls_name + pipeline_config combo. - The FSDP-training dtype-detection special case (scan params, default to bf16) applied unconditionally, so an explicit fp32 pipeline was silently cast to bf16 for plain inference. Extracted _resolve_target_dtype and gated the scan on isinstance(transformer, FSDPModule). - Preprocessing tokenized captions with a 512-token cap that doesn't account for the 129-token system template runtime strips off; now reads text_encoder_max_lengths from pipeline_config to match runtime. Also replaced unconditional item["cap"][0] indexing (silently takes the first character of a string caption) with a get_caption() helper that accepts/validates both the documented string schema and the list-of-variants schema some producers use. - test_kandinsky5_qat_attention_engages.py set FASTVIDEO_ATTENTION_BACKEND and cleared the attention backend selector cache without teardown, leaking ATTN_QAT_TRAIN into later tests in the same pytest process. Now uses monkeypatch + try/finally. Added regression tests: test_kandinsky5_target_dtype.py, test_kandinsky5_dmd_pipeline_resolution.py, test_kandinsky5_overfit_caption.py. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Training Configs
Single-step training configurations organized by method and model.
configs/
├── fine_tuning/ # Standard finetuning and DFSFT
├── distribution_matching/ # DMD2 and Self-Forcing
├── knowledge_distillation/ # KD from teacher to student
└── example.yaml # Annotated reference config with all fields
Each method directory contains per-model subdirectories (e.g. wan/, hunyuan/).
Launch any config with:
bash examples/train/run.sh examples/train/configs/<method>/<model>/<config>.yaml
For multi-step training pipelines, see examples/train/scenario/.