FastVideo
Project description
| Documentation | Quick Start | Weekly Dev Meeting | 🟣💬 Slack | 🟣💬 WeChat |
FastVideo is a unified post-training and real-time inference framework for accelerated video generation.
NEWS
2026/03/17: Release Live demo: Into the Dreamverse: Vibe Directing in FastVideo, check out the Blog.2026/03/13: Release Live demo: Create a 5s 1080p Video in 4.5s with FastVideo on a Single GPU, check out the Blog.2025/11/19: Release CausalWan2.2 I2V A14B Preview models, Blog and Inference Code!.2025/08/04: Release FastWan models and Sparse-Distillation.
More News
2025/06/14: Release finetuning and inference code for VSA.2025/04/24: FastVideo V1 is released!2025/02/18: Release the inference code for Sliding Tile Attention.
Key Features
FastVideo has the following features:
- End-to-end post-training support for bidirectional and autoregressive models:
- Support full finetuning and LoRA finetuning for state-of-the-art open video DiTs
- Data preprocessing pipeline for video, image, and text data
- Distribution Matching Distillation (DMD2) stepwise distillation.
- Sparse attention with Video Sparse Attention
- Sparse distillation to achieve >50x denoising speedup
- Scalable training with FSDP2, sequence parallelism, and selective activation checkpointing.
- Causal distillation through Self-Forcing
- See this page for full list of supported models and recipes.
- State-of-the-art performance optimizations for inference
- Sequence Parallelism for distributed inference
- Multiple state-of-the-art attention backends
- User-friendly CLI and Python API
- See this page for full list of supported optimizations.
- Diverse hardware and OS support
- Support H100, A100, 4090
- Support Linux, Windows, MacOS
- See this page for full list of supported models, hardware assumptions, and optimization compatibility.
- Realtime video generation & editing
- Dreamverse: stream and "vibe direct" video in realtime (live demo), deployable on local GPU, a self-hosted B200 server, Docker, or serverless Modal
Getting Started
We recommend using uv to create a clean environment. If you previously used Conda, switching to uv generally gives faster and more stable installs.
# Create and activate a new uv environment
uv venv --python 3.12 --seed
source .venv/bin/activate
# Install FastVideo
uv pip install fastvideo
Please see our docs for more detailed installation instructions.
Sparse Distillation
For our sparse distillation techniques, please see our distillation docs and check out our blog.
See below for recipes and datasets:
| Model | Sparse Distillation | Dataset |
|---|---|---|
| FastWan2.1-T2V-1.3B | Recipe | FastVideo Synthetic Wan2.1 480P |
| FastWan2.2-TI2V-5B | Recipe | FastVideo Synthetic Wan2.2 720P |
Dreamverse — Realtime Video Generation & Editing
Dreamverse is FastVideo's realtime video generation
and editing platform — "vibe directing" a video as it streams. It lives in the
monorepo under apps/dreamverse/ and ships its own backend
(dreamverse-server) plus a web UI.
Try the live demo, read the blog, or run it yourself. Dreamverse deploys on a local GPU, a self-hosted B200 server over SSH, Docker, or serverless Modal — see the Dreamverse README.
Inference
Generating Your First Video
Here's a minimal example to generate a video using the default settings. Make sure VSA kernels are installed. Create a file called example.py with the following code:
import os
from fastvideo import VideoGenerator
def main():
os.environ["FASTVIDEO_ATTENTION_BACKEND"] = "VIDEO_SPARSE_ATTN"
# Create a video generator with a pre-trained model
generator = VideoGenerator.from_pretrained(
"FastVideo/FastWan2.1-T2V-1.3B-Diffusers",
num_gpus=1, # Adjust based on your hardware
)
# Define a prompt for your video
prompt = "A curious raccoon peers through a vibrant field of yellow sunflowers, its eyes wide with interest."
# Generate the video
video = generator.generate_video(
prompt,
output_path="my_videos/", # Controls where videos are saved
save_video=True
)
if __name__ == '__main__':
main()
Run the script with:
python example.py
For a more detailed guide, please see our inference quick start.
More Guides
Awesome work using FastVideo or our research projects
- SGLang: SGLang's diffusion inference functionality is based on a fork of FastVideo on Sept. 24, 2025.
- DanceGRPO: A unified framework to adapt Group Relative Policy Optimization (GRPO) to visual generation paradigms. Code based on FastVideo.
- SRPO: A method to directly align the full diffusion trajectory with fine-grained human preference. Code based on FastVideo.
- DCM: Dual-expert consistency model for efficient and high-quality video generation. Code based on FastVideo.
- HY-WorldPlay: An action-conditioned world model model trained using FastVideo framework.
- Hunyuan Video 1.5: A leading lightweight video generation model, where they proposed SSTA based on Sliding Tile Attention.
- Kandinsky-5.0: A family of diffusion models for video & image generation, where their NABLA attention includes a Sliding Tile Attention branch.
- LongCat Video: A foundational video generation model with 13.6B parameters with block-sparse attention similar to Video Sparse Attention.
🤝 Contributing
We welcome all contributions. Please check out our guide here. See details in development roadmap.
Acknowledgement
We learned the design and reused code from the following projects: Wan-Video, ThunderKittens, DMD2, diffusers, xDiT, vLLM, SGLang. We thank MBZUAI, Anyscale, and GMI Cloud for their support throughout this project.
Citation
If you find FastVideo useful, please consider citing our research work:
@article{zhang2025vsa,
title={Vsa: Faster video diffusion with trainable sparse attention},
author={Zhang, Peiyuan and Chen, Yongqi and Huang, Haofeng and Lin, Will and Liu, Zhengzhong and Stoica, Ion and Xing, Eric and Zhang, Hao},
journal={arXiv preprint arXiv:2505.13389},
year={2025}
}
@article{zhang2025fast,
title={Fast video generation with sliding tile attention},
author={Zhang, Peiyuan and Chen, Yongqi and Su, Runlong and Ding, Hangliang and Stoica, Ion and Liu, Zhengzhong and Zhang, Hao},
journal={arXiv preprint arXiv:2502.04507},
year={2025}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fastvideo-0.2.0.tar.gz.
File metadata
- Download URL: fastvideo-0.2.0.tar.gz
- Upload date:
- Size: 1.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c37ec2adf7cf7bd6772f8579ef104c3c0cb4e9708728656013b4091f9bb8f311
|
|
| MD5 |
2f2b7dc9efde4548ee053069f1d121a3
|
|
| BLAKE2b-256 |
0c9ddefac2c676f4b3d29e7d8adabe6acf1dd28fdd16146be8548337007da61c
|
Provenance
The following attestation bundles were made for fastvideo-0.2.0.tar.gz:
Publisher:
publish-fastvideo.yml on hao-ai-lab/FastVideo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fastvideo-0.2.0.tar.gz -
Subject digest:
c37ec2adf7cf7bd6772f8579ef104c3c0cb4e9708728656013b4091f9bb8f311 - Sigstore transparency entry: 1734610206
- Sigstore integration time:
-
Permalink:
hao-ai-lab/FastVideo@041e5e9029979e8fcdaba61db557061eacb99ad9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/hao-ai-lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-fastvideo.yml@041e5e9029979e8fcdaba61db557061eacb99ad9 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file fastvideo-0.2.0-py3-none-any.whl.
File metadata
- Download URL: fastvideo-0.2.0-py3-none-any.whl
- Upload date:
- Size: 2.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b5fd60dfb03b9b203b3881b4d68db277622b9950d77de8c39f1a7cc6b2f26bd
|
|
| MD5 |
057f27a7c1bce251da21e5d616257644
|
|
| BLAKE2b-256 |
ff44c7ddea3612bd71e7717866015120d143f8a88b83e320d9de7362aee252cd
|
Provenance
The following attestation bundles were made for fastvideo-0.2.0-py3-none-any.whl:
Publisher:
publish-fastvideo.yml on hao-ai-lab/FastVideo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fastvideo-0.2.0-py3-none-any.whl -
Subject digest:
5b5fd60dfb03b9b203b3881b4d68db277622b9950d77de8c39f1a7cc6b2f26bd - Sigstore transparency entry: 1734610231
- Sigstore integration time:
-
Permalink:
hao-ai-lab/FastVideo@041e5e9029979e8fcdaba61db557061eacb99ad9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/hao-ai-lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-fastvideo.yml@041e5e9029979e8fcdaba61db557061eacb99ad9 -
Trigger Event:
workflow_dispatch
-
Statement type: