CoolFace
Modelpublic

nvidia/AnyFlow-Wan2.1-T2V-1.3B-Diffusers

sourceHugging Faceotherupdated 4mo agoView on Hugging Face
10likes105downloads
Model Card

AnyFlow

<p align="center"> ๐Ÿ–ฅ๏ธ <a href="https://github.com/NVlabs/AnyFlow">GitHub</a> &nbsp;&nbsp; ๏ฝœ &nbsp;&nbsp; ๐Ÿค— <a href="https://huggingface.co/collections/nvidia/anyflow">Hugging Face</a> &nbsp;&nbsp; ๏ฝœ &nbsp;&nbsp; ๐Ÿ“‘ <a href="https://arxiv.org/">Paper</a> &nbsp;&nbsp; ๏ฝœ &nbsp;&nbsp; ๐ŸŒ <a href="https://nvlabs.github.io/AnyFlow">Website</a> <br> </p>


AnyFlow: Any-Step Video Diffusion Model with On-Policy Flow Map Distillation

In this repository, we present AnyFlow, the first any-step video diffusion framework built on flow maps. AnyFlow offers these key features:

  • โ€”โšก Any-Step Generation: Unlike traditional distilled models tied to fixed step budgets, AnyFlow enables a single model to adapt to arbitrary inference budgets. It achieves high-quality few-step generation while providing stable improvements as more sampling steps are added.
  • โ€”๐Ÿ”€ Multiple Architectures: AnyFlow supports any-step distillation for both causal and bidirectional video diffusion models.
  • โ€”๐ŸŽฌ Multiple Tasks: AnyFlow supports Text-to-Video, Image-to-Video, and Video-to-Video generation within one causal video diffusion model.
  • โ€”๐Ÿ“ˆ Scalable Performance: AnyFlow is validated from 1.3B up to 14B parameters.

This directory contains AnyFlow-Wan2.1-T2V-1.3B-Diffusers (a 1.3B bidirectional video diffusion model) in Hugging Face Diffusers format, derived from the **Wan2.1-T2V-1.3B-Diffusers** text-to-video backbone.

Video Demos

<div align="center"> <video width="80%" autoplay loop muted playsinline controls> <source src="https://nvlabs.github.io/AnyFlow/assets/videos/demo_video.mp4" type="video/mp4"> Your browser does not support the video tag. </video> </div>

๐Ÿ”ฅ Latest News!!

  • โ€”May 4, 2026: ๐Ÿ‘‹ We've released the codebase and weights of AnyFlow.

Quickstart

Setup Environment

1๏ธโƒฃ Create Conda Environment

bash
conda create -n far python=3.10
conda activate far

2๏ธโƒฃ Install PyTorch and Dependencies

bash
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128
pip install -r requirements.txt --no-build-isolation

Model Download

ModelTasksResolutionDownload Link
AnyFlow-FAR-Wan2.1-1.3B-DiffusersT2V, I2V, V2V480P๐Ÿค— Hugging Face
AnyFlow-FAR-Wan2.1-14B-DiffusersT2V, I2V, V2V480P๐Ÿค— Hugging Face
AnyFlow-Wan2.1-T2V-14B-DiffusersT2V480P๐Ÿค— Hugging Face
AnyFlow-Wan2.1-T2V-1.3B-DiffusersT2V480P๐Ÿค— Hugging Face

Download models using ๐Ÿค— hf download:

pip install "huggingface_hub[cli]"

hf download nvidia/AnyFlow-FAR-Wan2.1-1.3B-Diffusers --repo-type model --local-dir experiments/pretrained_models/AnyFlow-FAR-Wan2.1-1.3B-Diffusers

Run Text-to-Video Generation with Diffusers

python
import torch
from diffusers.utils import export_to_video

from far.pipelines.pipeline_wan_anyflow import WanAnyFlowPipeline

model_id = "nvidia/AnyFlow-Wan2.1-T2V-1.3B-Diffusers"
pipeline = WanAnyFlowPipeline.from_pretrained(model_path).to('cuda', dtype=torch.bfloat16)

prompt = "CG game concept digital art, a majestic elephant with a vibrant tusk and sleek fur running swiftly towards a herd of its kind."

video = pipeline(
    prompt=prompt,
    height=480,
    width=832,
    num_frames=81,
    num_inference_steps=4,
    generator=torch.Generator('cuda').manual_seed(0)
).frames[0]
export_to_video(output, "output.mp4", fps=16)

License

This model is released under the NVIDIA One-Way Noncommercial License (NSCLv1).

Under the NVIDIA One-Way Noncommercial License (NSCLv1), NVIDIA confirms:

  • โ€”Models are not for commercial use.
  • โ€”NVIDIA does not claim ownership to any outputs generated using the Models or Derivative Models.

Citation

If you find our work helpful, please cite us.

bibtex
@article{gu2026anyflow,
    title={AnyFlow: Any-Step Video Diffusion Model with On-Policy Flow Map Distillation},
    author={Gu, Yuchao and Fang, Guian and Jiang, Yuxin and Mao, Weijia and Han, Song and Cai, Han and Shou, Mike Zheng},
    journal={arXiv preprint arXiv:2605.13724},
    year={2026}
}

@article{gu2025long,
    title={Long-Context Autoregressive Video Modeling with Next-Frame Prediction},
    author={Gu, Yuchao and Mao, weijia and Shou, Mike Zheng},
    journal={arXiv preprint arXiv:2503.19325},
    year={2025}
}

Acknowledgements

This codebase is built on Diffusers. We also refer to implementations from FAR, Self-Forcing, and TiM. We thank the authors for open-sourcing their work.