默认示例需先单独安装 VSA 注意力内核,否则 VIDEO_SPARSE_ATTN 后端不可用;模型权重需从 Hugging Face 另行下载;在 Colab/Kaggle 这类约 16GB 主机内存的机器上应保持 num_gpus=1,多卡易 OOM。
FastVideo
hao-ai-labApache-2.0活跃维护统一视频生成推理与后训练框架,支持扩散模型加速、蒸馏和微调,帮你在有限算力下更快跑出视频。
A unified inference and post-training framework for accelerated video generation.
uv venv --python 3.12 --seed
source .venv/bin/activate
UV_TORCH_BACKEND=cu126 uv pip install fastvideoREADME 称支持 H100、A100、4090,以及 RTX 5090、RTX PRO 6000、DGX Spark 和 Apple Silicon(MLX);FastH3 Trim 模型最低可在 8 GB 显存运行;支持 Linux、Windows、macOS。
统一视频生成后训练与实时推理框架,用稀疏注意力和蒸馏把扩散视频模型跑快
统一视频生成推理与后训练框架,支持扩散模型加速、蒸馏和微调,帮你在有限算力下更快跑出视频。
核心能力
- 支持全量与 LoRA 微调开源视频 DiT 模型
- 用 DMD2 做逐步蒸馏,稀疏蒸馏实现超 50 倍去噪加速
- 集成 Video Sparse Attention 可训练稀疏注意力
- 用 FSDP2、序列并行和选择性激活检查点扩展训练
- 提供 CLI 与 Python API,支持分布式推理序列并行
容易踩的坑
- v0.2.0Release 0.2.0最新正式版2026-06-04 · 2026-06-04 21:24 UTC
What's Changed
- Added longcat-video python api examples by @shaoxiongduan in https://github.com/hao-ai-lab/FastVideo/pull/994
- [docs]: add LoRA extraction utilities documentation by @ShreejithSG in https://github.com/hao-ai-lab/FastVideo/pull/992
- [bugfix] Add configs for TurboDiffusion T2V/I2V models by @loaydatrain in https://github.com/hao-ai-lab/FastVideo/pull/993
- [ci] temporarily disable turbodiffusion ssim test by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/1000
- [CI] Fixed Turbodiffusion I2V CI by @loaydatrain in https://github.com/hao-ai-lab/FastVideo/pull/1002
- [feat!] Disable FSDP inference by default by @XOR-op in https://github.com/hao-ai-lab/FastVideo/pull/1001
- [misc] [bugfix] unpin 'av' in pyproject by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/1009
- [feat] Introduce Cosmos 2.5 Text2World pipeline by @KyleShao1016 in https://github.com/hao-ai-lab/FastVideo/pull/974
- [CI] SSIM tests optimization: load all model weights from Modal persistent Volume by @alexzms in https://github.com/hao-ai-lab/FastVideo/pull/958
- [CI] Fix OOM issues in ssim tests by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/1011
- [Bug Fix] Add autograd wrapper for block-sparse attention in fastvideo-kernel + fix CMake extension linking by @alexzms in https://github.com/hao-ai-lab/FastVideo/pull/1015
- [chore] release fastvideo-kernel 0.2.3 by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/1018
- [feat] Hooks API and layerwise offloading for all DiTs by @XOR-op in https://github.com/hao-ai-lab/FastVideo/pull/1006
- [kernel] Fix fastvideo-kernel release workflow by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/1019
- [kernel] [bugfix] [ci] bump v0.2.4. Fix STA output handling, TurboDiffusion CUDA norm dtypes for fastvideo-kernel unit tests. by @alexzms in https://github.com/hao-ai-lab/FastVideo/pull/1020
- Added LTX-2 Distilled T2V Generation by @shaoxiongduan in https://github.com/hao-ai-lab/FastVideo/pull/1016
- fix: SP for hunyuanvideo 1.5 by @XOR-op in https://github.com/hao-ai-lab/FastVideo/pull/1026
- [fastvideo-kernel] replace map to index with Triton implementation + add vsa benchmark by @alexzms in https://github.com/hao-ai-lab/FastVideo/pull/1029
- [bugfix] add omegaconf as dep. by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/1032
- [bugfix] Allow update timesteps for hy1.5 model. by @Davids048 in https://github.com/hao-ai-lab/FastVideo/pull/1033
- [feat] Add HY-World1.5-Bidirectional-480P-I2V by @mignonjia in https://github.com/hao-ai-lab/FastVideo/pull/1027
- [ci] Increase ci test error threshold by @alexzms in https://github.com/hao-ai-lab/FastVideo/pull/1038
- [bugfix] Fix NCCL all_gather contiguity + correct ParallelTiledVAE decode tiling threshold by @KyleShao1016 in https://github.com/hao-ai-lab/FastVideo/pull/1037
- [bugfix]: handle architectural differences while lora extraction by @ShreejithSG in https://github.com/hao-ai-lab/FastVideo/pull/1035
- [bugfix] fix torchvision import by @RandNMR73 in https://github.com/hao-ai-lab/FastVideo/pull/1039
- [docs] Update runpod instructions by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/1043
- [docs] Offloading instruction by @XOR-op in https://github.com/hao-ai-lab/FastVideo/pull/1022
- [feat]Add Matrix Game 2.0 training by @H1yori233 in https://github.com/hao-ai-lab/FastVideo/pull/1017
- [docs] Update design overview and add agents tutorial by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/1044
- [SP Sharding] Fix SP loss sharding on token axis (thw) with padding; add distributed correctness tests by @alexzms in https://github.com/hao-ai-lab/FastVideo/pull/1045
- fix: sageattn3 installation by @XOR-op in https://github.com/hao-ai-lab/FastVideo/pull/1050
- [bugfix] Double Normalization in Preprocessing Dataset by @H1yori233 in https://github.com/hao-ai-lab/FastVideo/pull/1055
- [Bug
- v0.1.7Release 0.1.72026-01-05 · 2026-01-05 21:47 UTC
查看更新说明
What's Changed
- [VSA] [STA] Fix directory structure for pypi publishing by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/769
- [bugfix] fix STA install setup.py import by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/770
- [bugfix] [VSA] [STA] Fix MANIFEST.in for VSA and STA; Move tk into both directories by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/771
- [misc] [VSA] [STA] fix tk_root in setup.py for VSA and STA by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/772
- [Preprocess][Feat] support torchvision to load video in new preprocessing by @Eigensystem in https://github.com/hao-ai-lab/FastVideo/pull/761
- [Preprocess][Fix] video quality issue by @Eigensystem in https://github.com/hao-ai-lab/FastVideo/pull/773
- [misc] Improve text encoding stage by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/774
- [CI] Add ssim test for causal inference by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/784
- [misc] Update Slack invite link by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/786
- fix: lora_B init zeros by @DataAIPlayer in https://github.com/hao-ai-lab/FastVideo/pull/781
- [Feature] Support Lora for DMD by @Edenzzzz in https://github.com/hao-ai-lab/FastVideo/pull/755
- [Backend][Vmoba] Add implementation of VMoba by @EricLina in https://github.com/hao-ai-lab/FastVideo/pull/778
- [Self-forcing] [1/n] Handle extra dim in time embedding and add timestep warping by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/792
- [preprocessing] [self-forcing] [2/n] Improve preprocessing and add ode trajectory dataset schema by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/794
- [bugfix] Fix delta calculation by @DataAIPlayer in https://github.com/hao-ai-lab/FastVideo/pull/796
- [bugfix] pin gradio version and set current_vsa_sparsity in TrainingPipeline by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/798
- [self-forcing] [3/n] Text embed only preprocessing by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/797
- [bugfix] Fix empty PipelineConfigs for Wan2.2 A14B by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/800
- [Bugfix] Fix VMoba requirements by @Edenzzzz in https://github.com/hao-ai-lab/FastVideo/pull/802
- [bugfix] Wan2.2 Boundary ratio by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/804
- [self-forcing] [4/n] Preprocessing for collecting ODE trajectory by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/788
- Update example files and readme by @BrianChen1129 in https://github.com/hao-ai-lab/FastVideo/pull/809
- [self-forcing] [5/n] Add Self-Forcing distillation pipeline by @JerryZhou54 in https://github.com/hao-ai-lab/FastVideo/pull/808
- [bugfix] Update learning rates for sparse distillation recipe by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/812
- [self-forcing] [6/n] Add Ode Init training by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/811
- Add Sage Attention 3 Backend by @RandNMR73 in https://github.com/hao-ai-lab/FastVideo/pull/815
- [Feature]Update count trainable param for FSDP2 by @BrianChen1129 in https://github.com/hao-ai-lab/FastVideo/pull/820
- [bugfix] Use training_state_checkpointing_steps instead of checkpointing_steps by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/821
- [self-forcing][8/n] Self-Forcing For Wan2.2-A14B + torch.compile training and distillation support by @RandNMR73 in https://github.com/hao-ai-lab/FastVideo/pull/818
- [bugfix] Allow overriding dit checkpoint for inference and Lower VSA LR in example scripts by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/831
- [feature] Add torch profiler by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/827
- Add wan2.1 functionality support for Ascend NPU platform by @
- v0.1.6Release 0.1.62025-08-29 · 2025-08-29 03:57 UTC
查看更新说明
What's Changed
- [Chore] Include our demo in the readme. by @jzhang38 in https://github.com/hao-ai-lab/FastVideo/pull/720
- [Feat] Add Wan2.2 14B MoE by @JerryZhou54 in https://github.com/hao-ai-lab/FastVideo/pull/688
- [Misc] change installation logic of vsa by @jzhang38 in https://github.com/hao-ai-lab/FastVideo/pull/721
- [3/3][Preprocess] add preprocessing workflows by @Eigensystem in https://github.com/hao-ai-lab/FastVideo/pull/645
- [Fix] training pipeline pin_cpu_memory issue by @Eigensystem in https://github.com/hao-ai-lab/FastVideo/pull/692
- add cicd workflow for publishing VSA kernel by @Gary-ChenJL in https://github.com/hao-ai-lab/FastVideo/pull/723
- Remove all empty_cache by @Edenzzzz in https://github.com/hao-ai-lab/FastVideo/pull/713
- update version selection for VSA workflow by @Gary-ChenJL in https://github.com/hao-ai-lab/FastVideo/pull/725
- [bugfix] fix pyproject install and VSA precision test by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/726
- Fix LoRA load from training checkpoint by @Edenzzzz in https://github.com/hao-ai-lab/FastVideo/pull/719
- [bugfix] [distill] remove i2v validation schema import in distill by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/728
- [feature] add Gradio live serving demo code by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/727
- [bugfix] [dmd] Fix backward simulation and also naming in wan_i2v_dmd_pipeline by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/731
- Fix vsa backward gQ by @jzhang38 in https://github.com/hao-ai-lab/FastVideo/pull/735
- feat: preprocess validation dataset only when exist by @Eigensystem in https://github.com/hao-ai-lab/FastVideo/pull/734
- Update WeChat group link by @jzhang38 in https://github.com/hao-ai-lab/FastVideo/pull/739
- [Feat][Preprocessing] i2v preprocessing workflow by @Eigensystem in https://github.com/hao-ai-lab/FastVideo/pull/737
- [Docker] add 12.9 docker image and also fix py3.10 and py3.11 dockerfile by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/749
- [bugfix] Missing Docker file for cuda12.9 by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/750
- [bugfix] [dmd] Align backward simulation with dmd2 sample back by @nappengman in https://github.com/hao-ai-lab/FastVideo/pull/744
- [Fix] fix seed in dmd denoising loop by @jzhang38 in https://github.com/hao-ai-lab/FastVideo/pull/736
- [bugfix] Check that model_index.json module is in required_modules list before removing by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/756
- Optionally use unmerged weights for inference by @Edenzzzz in https://github.com/hao-ai-lab/FastVideo/pull/745
- [Feat][Preprocess] support merged dataset by @Eigensystem in https://github.com/hao-ai-lab/FastVideo/pull/752
- [Feat][Preprocess] support multi-gpus by @Eigensystem in https://github.com/hao-ai-lab/FastVideo/pull/753
- [misc] [docs] Various fixes for logging and docs by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/758
- [bugfix] Fix wrong HF model string for FastWan2.2 5B by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/763
- Update Community Link by @jzhang38 in https://github.com/hao-ai-lab/FastVideo/pull/765
- [Feat] Support Self-Forcing's Causal Inference for Wan2.1 T2V 1.3B by @JerryZhou54 in https://github.com/hao-ai-lab/FastVideo/pull/766
- [Feature] Add wan2.2 5b i2v by @JerryZhou54 in https://github.com/hao-ai-lab/FastVideo/pull/760
- [chore] Release 0.1.6 by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/768
New Contributors
- @Gary-ChenJL made their first contribution in https://github.com/hao-ai-lab/FastVideo/pull/723
- @nappengman made their first contribution in https://github.com/hao-ai-lab/FastVideo/pull/744
Full Changelog: https://github.com/hao-ai-lab/FastVideo/compare/v0.1.5...v0.1.6
- v0.1.5Release 0.1.52025-08-06 · 2025-08-06 20:09 UTC
查看更新说明
What's Changed
- [CI] Add LoRA inference tests by @Edenzzzz in https://github.com/hao-ai-lab/FastVideo/pull/546
- [bugfix] [training] use separate generator for validation by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/610
- [chore] release 0.1.2 by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/622
- video gen working on apple silicon (addressed issues from prior pr) by @RandNMR73 in https://github.com/hao-ai-lab/FastVideo/pull/595
- [v0] Remove V0 code by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/621
- [LoRA] Support v1 LoRA training by @Edenzzzz in https://github.com/hao-ai-lab/FastVideo/pull/576
- Py/add triton block sparse by @jzhang38 in https://github.com/hao-ai-lab/FastVideo/pull/593
- Fix lora train steps by @Edenzzzz in https://github.com/hao-ai-lab/FastVideo/pull/627
- [bugfix] fa3 no longer returns lse by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/631
- [CI] Fix CI for pull request targets other than main by @kevin314 in https://github.com/hao-ai-lab/FastVideo/pull/632
- [bugfix] Fix preprocessing pipelines and nightly tests by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/633
- [Bugfix] Fix LoRA trainable params and training ckpt loading by @Edenzzzz in https://github.com/hao-ai-lab/FastVideo/pull/630
- [Docs] Docs update for Training and MPS by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/641
- [Feature] Add DMD inference pipeline by @BrianChen1129 in https://github.com/hao-ai-lab/FastVideo/pull/637
- [Feature] Multi-lora inference by @Edenzzzz in https://github.com/hao-ai-lab/FastVideo/pull/640
- [Feature] Remove V1 folder by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/642
- [1/3][Preprocess] refactor preprocessing configs by @Eigensystem in https://github.com/hao-ai-lab/FastVideo/pull/638
- [misc] Use FASTVIDEO_STAGE_LOGGING for perf timing of stage by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/644
- [Feature] Add prompt_txt support for CLI inference; Add DMD CLI inference by @BrianChen1129 in https://github.com/hao-ai-lab/FastVideo/pull/646
- [core] Add offloading for vae and image encoder and rename offloading args by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/643
- [CI] Add publish workflow for ComfyUI by @kevin314 in https://github.com/hao-ai-lab/FastVideo/pull/647
- [CI] Fix ComfyUI publisher ID by @kevin314 in https://github.com/hao-ai-lab/FastVideo/pull/648
- [bugfix] VideoGenerator improperly extracts output_video_name by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/649
- [Feature] Add DMD T2V training pipeline by @BrianChen1129 in https://github.com/hao-ai-lab/FastVideo/pull/651
- [Feature] Ignore [union-attr] and [override] mypy check and remove from training by @BrianChen1129 in https://github.com/hao-ai-lab/FastVideo/pull/652
- [Feature] Add Wan-14B-T2V-VSA CLI inference; add master port args by @BrianChen1129 in https://github.com/hao-ai-lab/FastVideo/pull/653
- [Feature][Distill]Add DMD+VSA joint training example by @BrianChen1129 in https://github.com/hao-ai-lab/FastVideo/pull/654
- [2/3][Preprocess] refactor pipeline registry & file structure by @Eigensystem in https://github.com/hao-ai-lab/FastVideo/pull/639
- [Feature][Distill]Add 14B 480p T2V distill example scripts by @BrianChen1129 in https://github.com/hao-ai-lab/FastVideo/pull/655
- [Feat] Support VSA with any resolution. by @jzhang38 in https://github.com/hao-ai-lab/FastVideo/pull/650
- [Bugfix]Fix DMD wan pipeline by @BrianChen1129 in https://github.com/hao-ai-lab/FastVideo/pull/659
- [Bugfix]Fix mdoel inference checkpoint saving when enabling HSDP by @BrianChen1129 in https://github.com/hao-ai-lab/FastVideo/pull/660
- [Feature] Add DMD CI test by @BrianChen1129 in https://github.com/hao-ai-lab/FastVideo/pull/661
- [Feature]Add DMD distillation training resume checkpoint; Update DMD CI test b
- v0.1.22025-07-15 · 2025-07-15 19:26 UTC
查看更新说明
Last release before removal of v0 code.
What's Changed
- Fix VAE precisions by @Edenzzzz in https://github.com/hao-ai-lab/FastVideo/pull/588
- [LoRA] Fix lora merge weights by @Edenzzzz in https://github.com/hao-ai-lab/FastVideo/pull/579
- Add ComfyUI custom node for inference by @kevin314 in https://github.com/hao-ai-lab/FastVideo/pull/596
- [Feature] Offload all text encoders by default by @Edenzzzz in https://github.com/hao-ai-lab/FastVideo/pull/594
- [Training] Use inference pipeline for training validation by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/585
- [chore] Upgrade min Python version from 3.8 to 3.10 by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/597
- [bugfix] [training] fix deadlock in latent datasets and init error in multi-node training by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/598
- [docs] Update slack invite by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/601
- [docs] update dev guide runpod image to py3.12 by @SolitaryThinker in https://github.com/hao-ai-lab/FastVideo/pull/602
- Remove all unnecessary torch.cuda.empty_cache by @Edenzzzz in https://github.com/hao-ai-lab/FastVideo/pull/606
- Set encoder TP size to 1 by default by @Edenzzzz in https://github.com/hao-ai-lab/FastVideo/pull/569
- [Feature][Training]Update example fine-tuning scripts to enable gradient checkpointing by @BrianChen1129 in https://github.com/hao-ai-lab/FastVideo/pull/618
Full Changelog: https://github.com/hao-ai-lab/FastVideo/compare/v0.1.1...v0.1.2
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
FastVideo is a unified post-training and real-time inference framework for accelerated video generation.
Recent news
2026/10/21: Release FastH3 Omni (Ref2VA): reference-conditioned video-and-audio generation from a prompt plus ordered image, video and audio references, in eight fused forwards. It runs on consumer Blackwell (RTX 5090, RTX PRO 6000, DGX Spark — NVFP4 QAD), on RTX 4090 (FP8) and on Apple Silicon (MLX). See the cookbook and the inference guide.2026/10/06: FastVideo now supports Kandinsky 6 from Kandinsky Lab: text- and image-to-video with synchronized audio (base and 10-step distilled pi-Flow checkpoints) plus video super-resolution up to 4x. See the Kandinsky 6 recipes.2026/10/06: FastH3 V2 now runs on a single consumer machine: NVIDIA RTX 5090, RTX 4090 and RTX PRO 6000 GPUs, DGX Spark and Apple Silicon. We also release FastH3 Trim, an experimental pruned model that is 4.2× smaller than base H3 and runs in as little as 8 GB of GPU memory. Get the models and read the Blog.2026/09/15: Release FastH3 8-Step V2, an eight-forward data-free DMD2 checkpoint distilled from MiniMax-H3 with 80% Video Sparse Attention. Run it withexamples/inference/basic/basic_fasth3_8step.pyor the FastH3 8-Step V2 recipe.2026/09/01: FastH3 now runs locally on Apple Silicon through MLX and on NVIDIA DGX Spark through CUDA 13, including two-Spark inference. Follow the FastH3 recipes and read the Blog.2026/08/27: FastH3 Preview v1 is an open-weight 4-step sparse-distilled MiniMax-H3 model for synchronized video-and-audio generation, developed in collaboration with Nuva Lab and the NVIDIA FastGen team. Download the recommended VSA / Data-Free weights, or see the full FastH3 collection.2026/08/19: FastVideo now supports MLX on Apple Silicon with FastMetal-QAD, a family of 1.3B, 5B, and 14B models optimized for Mac. Follow the MLX install guide and read the Blog.
More News
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 the supported training workflows, and the support matrix for supported models.
- 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
Install FastVideo with uv:
uv venv --python 3.12 --seed
source .venv/bin/activate
# NVIDIA CUDA 12; use cu130 on CUDA 13
UV_TORCH_BACKEND=cu126 uv pip install fastvideo
Platform guides: NVIDIA GPUs, DGX Spark / GB10, Apple Silicon MLX, AMD / ROCm — or the full installation guide.
To have a coding agent do the install, give it the agent install prompt.
Sparse Distillation
Sparse distillation reaches >50× denoising speedup. See the distillation guide and the blog; the training recipes live under examples/distill/ with the FastVideo Synthetic datasets.
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()
num_gpus=1 runs the worker in-process (weights load once, no extra Python process). On Colab/Kaggle-style machines with ~16GB host RAM, keep num_gpus=1; free-tier system memory does not grow with extra T4s, so num_gpus>1 is likely to OOM.
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}
}