1.7 KiB
1.7 KiB
Quick start
Install FastVideo, generate one video, then start from a maintained recipe.
Install
Requires Python 3.10 to 3.12 and CUDA 12.6 or newer.
uv venv --python 3.12 --seed
source .venv/bin/activate
# CUDA 12. Use cu130 on CUDA 13.
UV_TORCH_BACKEND=cu126 uv pip install fastvideo
For the fastest attention kernels, install flash-attn:
uv pip install flash-attn --no-build-isolation -v
Generate a video
from fastvideo import VideoGenerator
generator = VideoGenerator.from_pretrained(
"Wan-AI/Wan2.1-T2V-1.3B-Diffusers",
num_gpus=1,
text_encoder_cpu_offload=True,
)
generator.generate_video(
"A raccoon peers through a field of sunflowers.",
output_path="videos/",
save_video=True,
)
The first run downloads the Wan2.1 1.3B checkpoint. The call writes an MP4 under videos/. The full example is examples/inference/basic/basic.py.
Choose a maintained recipe
The cookbook selects complete, checked-in recipes instead of mixing model, parallelism, offload, and attention settings independently.
:::tip[Need more control?] Start from a maintained recipe, then use the configuration and optimization guides for supported changes. :::
Next Steps
- Inference Cookbook - Choose a maintained recipe
- Installation Guide - Detailed installation instructions
- Configuration - Learn about configuration options
- Examples - Explore more examples
- Optimizations - Performance optimization tips