Skip to content

Repository files navigation

DistillAlign: Coordinating Mode Covering and Mode Seeking in Autoregressive Video Distillation

Jiaxing Li1,2*, Kai Zou1*, Cindy Zhou1,3, Kaichen Huang1,2, Junyao Gao1, Zile Wang1,
Yang Liu1, Bin Liu1, Bo An2, Yangguang Li1†

1Riemann Dynamics    2Nanyang Technological University    3Wellington College, UK

*Equal contribution    Corresponding author

Project Page    Paper    Hugging Face Models    Hugging Face Data    License

DistillAlign aligns and balances the mode-covering and mode-seeking objectives of the multi-stage autoregressive video distillation pipeline — using only a 1.3B DMD teacher, it already surpasses baselines refined with a 14B DMD teacher.

Columns ·  Wan2.1-1.3B  |  Self-Forcing  |  Causal-Forcing  |  Ours (1.3B teacher)  |  Ours (14B teacher)




🔥 News

  • [2026-07] Initial release: inference code, released checkpoints, training data, and the full teacher-normalized distribution-evaluation pipeline.

🤗 Release Table

All released generators are Wan2.1-1.3B students; the size in each name refers to the teacher used during training.

Checkpoints

Model Checkpoint Description
Initializer (1.3B teacher) 🤗 Huggingface Pre-DMD initializer, trained toward a Wan2.1-T2V-1.3B teacher
Initializer (14B teacher) 🤗 Huggingface Pre-DMD initializer, trained toward a Wan2.1-T2V-14B teacher
Distilled (1.3B teacher) 🤗 Huggingface Final joint-distilled generator, Wan2.1-T2V-1.3B DMD teacher
Distilled (14B teacher) 🤗 Huggingface Final joint-distilled generator, Wan2.1-T2V-14B DMD teacher

Distillation data (prompts curated from VidProM, 25K samples each):

Data Download Description
Wan2.1-14B data 🤗 Huggingface 25K distillation samples generated by Wan2.1-T2V-14B
Wan2.1-1.3B data 🤗 Huggingface 25K distillation samples generated by Wan2.1-T2V-1.3B

Other intermediate results (teacher-normalized distribution evaluation):

Cache Download Description
Wan2.1-1.3B teacher reference features 🤗 Huggingface 256 x 2560 V-JEPA2 features,
ready for --teacher-features
Wan2.1-14B teacher reference features 🤗 Huggingface 256 x 2560 V-JEPA2 features,
ready for --teacher-features

🛠️ Installation

We recommend Linux, Python 3.10, CUDA, and:

  • at least 24 GB GPU memory for 1.3B student inference;
  • an 80 GB GPU for the native Wan2.1-14B teacher stage;
  • at least 128 GB system memory for loading the 14B teacher shards.

Create the environment:

conda create -n distillalign python=3.10 -y
conda activate distillalign
pip install torch==2.5.1 torchvision==0.20.1 \
  --index-url https://download.pytorch.org/whl/cu121
pip install -r requirements.txt
pip install flash-attn --no-build-isolation
pip install -e .

Download the Wan2.1 student/teacher models and the V-JEPA2 encoder:

bash scripts/download_models.sh

The script writes model weights under wan_models/ and Hugging Face artifacts under .cache/huggingface/. Both directories are excluded from Git.

🚀 Inference

Generate a video from a text prompt:

python inference.py \
  --config_path configs/self_forcing_dmd.yaml \
  --checkpoint_path checkpoints/distillalign_distill_14b_teacher.pt \
  --prompt "A young couple stands side by side under a vast, starry night sky, gazing upward in wonder as distant stars flicker with soft, ethereal light. Their faces glow with awe, hands lightly touching, shoulders relaxed. The camera slowly pans around them, tilting upward to capture the infinite cosmos, then gently zooms in on their eyes reflecting the stars. Shot in cinematic 4K HD, with deep blues and warm golden hues, the scene pulses with quiet romance and cosmic wonder as gentle wind rustles their hair" \
  --output_path outputs/inference_case.mp4

For batch generation, pass --data_path prompts.txt (one prompt per line) and --output_folder videos/ instead of --prompt/--output_path.

📊 Distribution Evaluation

The evaluation compares a generator against a target teacher (Wan2.1-T2V-1.3B or Wan2.1-T2V-14B) on a fixed prompt/seed grid and reports PRDC precision and coverage in V-JEPA2 feature space.

1. Prepare the eval set

Build the shared prompt/seed eval set (paper protocol: 16 prompts x 16 seeds, built-in defaults, written to outputs/eval_jobs.jsonl):

python evaluate_distribution.py make-jobs

For a quick one-sample pipeline check before a full run, build a single-sample job list instead: python evaluate_distribution.py make-jobs --num-prompts 1 --seeds 11 --output outputs/smoke_jobs.jsonl.

2. Student features

Sample the evaluated checkpoint, optionally refine (initializer protocol: re-noise each endpoint to 90% and let the teacher finish denoising; skip for post-DMD checkpoints), then encode with V-JEPA2:

python evaluate_distribution.py sample \
  --checkpoint checkpoints/distillalign_distill_14b_teacher.pt \
  --jobs outputs/eval_jobs.jsonl \
  --output-dir outputs/my_eval/student_raw

# optional refinement (initializer protocol)
python evaluate_distribution.py teacher-refine \
  --raw-manifest outputs/my_eval/student_raw/manifest.jsonl \
  --output-dir outputs/my_eval/student_refined \
  --teacher-model Wan2.1-T2V-14B

# encode: use student_refined when refined, student_raw otherwise
python evaluate_distribution.py extract \
  --manifest outputs/my_eval/student_refined/manifest.jsonl \
  --output outputs/my_eval/student_refined/student_refined_vjepa2.npz \
  --cache-dir .cache/huggingface

The checkpoint can also be a Hub URL such as hf://LiJiaxing/DistillAlign/checkpoints/distillalign_distill_14b_teacher.pt.

3. Teacher features

Matched 25-step teacher sampling on the same prompt/seed grid, then encode:

python evaluate_distribution.py teacher-sample \
  --raw-manifest outputs/my_eval/student_raw/manifest.jsonl \
  --output-dir outputs/my_eval/teacher_reference \
  --teacher-model Wan2.1-T2V-14B

python evaluate_distribution.py extract \
  --manifest outputs/my_eval/teacher_reference/manifest.jsonl \
  --output outputs/my_eval/teacher_reference/teacher_reference_vjepa2.npz \
  --cache-dir .cache/huggingface

We release ready-made teacher feature caches for Wan2.1-T2V-1.3B and Wan2.1-T2V-14B on the paper prompt/seed grid, which replace this step entirely.

4. Metrics

PRDC precision and coverage with k=5:

python evaluate_distribution.py metrics \
  --teacher-features outputs/my_eval/teacher_reference/teacher_reference_vjepa2.npz \
  --student-features outputs/my_eval/student_refined/student_refined_vjepa2.npz \
  --output outputs/my_eval/precision_coverage.json

The metric CLI rejects feature caches whose V-JEPA2 protocol or prompt/seed set do not match.

One-command wrapper

run chains all of the above with the initializer protocol defaults:

python evaluate_distribution.py run \
  --checkpoint checkpoints/distillalign_distill_14b_teacher.pt \
  --jobs outputs/eval_jobs.jsonl \
  --teacher-model Wan2.1-T2V-14B \
  --output-dir outputs/my_eval

Useful variants: --no-refine (post-DMD protocol) and --teacher-features PATH (reuse a released teacher cache).

🙏 Acknowledgements

This implementation uses Self-Forcing and Causal-Forcing as its code base, with the V-JEPA2 encoder powering the distribution evaluation. We thank the open-source community for the infrastructure that made this release possible.

📜 Citation

If you find DistillAlign useful, please consider citing:

@misc{li2026distillalign,
  title         = {DistillAlign: Coordinating Mode Covering and Mode Seeking in Autoregressive Video Distillation},
  author        = {Li, Jiaxing and Zou, Kai and Zhou, Cindy and Huang, Kaichen and Gao, Junyao and Wang, Zile and Liu, Yang and Liu, Bin and An, Bo and Li, Yangguang},
  year          = {2026},
  eprint        = {2607.26811},
  archivePrefix = {arXiv},
  primaryClass  = {cs.CV},
  url           = {https://arxiv.org/abs/2607.26811}
}

📮 Contact

For questions and discussion, please open a GitHub issue or contact:

📜 License

The code is released under the Apache License 2.0. Third-party model weights remain subject to their own licenses.

About

DistillAlign: Coordinating Mode Covering and Mode Seeking in Autoregressive Video Distillation

Resources

Stars

117 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages