User decision after reviewing integration-review.md's Option D recommendation. Combines Option D's "generic backend stays generic" principle with Option B's monorepo subfolder layout for the Dreamverse product. Result: single repo (FastVideo), Dreamverse becomes apps/dreamverse/, generic backend stays at fastvideo.entrypoints.streaming.*, Dreamverse repo gets archived after migration. Methodology: 3 parallel exploration agents (FastVideo build/CI surface, Dreamverse product-vs-generic file split, Python+Next.js monorepo precedents). Synthesis authored by ultrabrain category. Oracle review applied as PASS-WITH-FIXES; 10 critical issues addressed (import contract too tight, Phase 2 missing shim list, prompt_enhancer misclassified, frontend CI Playwright/pnpm setup broken, .gitignore product-asset issue, uv.lock missing, backend CI path filters too narrow, cross-repo history claim wrong, Phase 6 too coarse, missing security/CORS risks). * integration-plan.md (new, 1205 lines): executable 7-phase migration plan with file-by-file map, tooling stack (uv workspace + standalone pnpm), pyproject.toml/pre-commit/.gitignore/CI YAML diffs, risk register, verification gates, rollback. Phase 0 lands #1288; Phases 1-7 add skeleton, move backend, move FE, promote generic-pending, retire prompt enhancer fork (DR-1), CI/release cutover (split into 6a-6f), archive Dreamverse repo. * integration-review.md: DEPRECATED banner added at top pointing to integration-plan.md. Body kept for drift-audit and OSS precedent reference (still authoritative). Reading-guide entry updated. * decisions-log.md: D-18 entry capturing strategy decision, rationale (drops cross-repo coordination overhead from D-17 cycle; preserves architectural separation; OSS precedents support shape), why not A/B/C/D (concrete reasons for each), implications (apps/ exclude in setuptools, no cross-repo history preservation, drift items fold into phases), and 4 deferred decisions (DR-2, VPO, history-import method, CORS/write-endpoint security). * README.md: Last-reconciled bumped with D-18 reference. Reading- guide table updated: integration-plan.md is CURRENT; integration-review.md marked DEPRECATED. Verified: pre-commit clean (memory dir excluded from yapf/ruff/mypy; spaces-check passes). Oracle PASS-WITH-FIXES, all 10 critical fixes applied (import contract relaxed to allow fastvideo.{api,configs, entrypoints.streaming,entrypoints.video_generator}; Phase 2 lists 6 explicit shims for generic-pending; Phase 5 explicitly retires the prompt fork; ci-dreamverse-frontend.yml uses pnpm/action-setup BEFORE setup-node; Playwright deferred to Phase 4 until health routes land; .gitignore unignores product assets; Phase 1 commits uv.lock with --locked enforcement; backend CI watches fastvideo/api + streaming + video_generator + configs; cross-repo history disposition documented; Phase 6 split into 6a-6f substeps with independent verification gates; CORS/write-endpoint risks added to register). PR #1288: https://github.com/hao-ai-lab/FastVideo/pull/1288 Co-authored-by: Junda (David) Su <90978028+Davids048@users.noreply.github.com> Co-authored-by: Matthew Noto <99706358+RandNMR73@users.noreply.github.com> Co-authored-by: XOR-op <17672363+XOR-op@users.noreply.github.com> Co-authored-by: Zhang Peiyuan <42993249+jzhang38@users.noreply.github.com>
| 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.
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 |
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}
}