Instructions to use lightx2v/LightWan2.2-A14B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use lightx2v/LightWan2.2-A14B with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("lightx2v/LightWan2.2-A14B", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
π¬ LightWan2.2-A14B
An extremely efficient Wan 2.2 14B variant: NVFP4 Quantization-Aware Step Distillation with Sparse Attention for Blackwell Architecture
π Table of Contents
- β¨ Features
- π Quick Start
- π¬ Generation Results
- β‘ Performance Comparison
- β οΈ Notes
- π€ Community
β¨ Features
- β‘ 4-Step Inference: Two high-noise expert steps followed by two low-noise expert steps, enabling extremely fast Wan2.2 MoE generation on a single Blackwell GPU.
- π― NVFP4 Quantization: Quantization-aware step distillation reduces memory traffic and compute cost while targeting Blackwell architecture.
- π§© Sparse Attention: Accelerates the costly O(nΒ²) self-attention workload with sparse attention, reducing end-to-end latency for high-resolution video generation.
- π§ LightX2V Integration: Recommended runtime stack for stable deployment and best performance.
- π High-Quality Generation: Preserves the visual quality of Wan2.2-T2V/I2V-14B while dramatically improving inference speed.
π Quick Start
Environment and weights
Follow the LightX2V environment setup and NVFP4 kernel installation. Use a Blackwell GPU with the required sparse-attention dependencies.
Download the matching T2V or I2V NVFP4 checkpoints from this repository.
In each launch script, set lightx2v_path, model_path, CUDA_VISIBLE_DEVICES, and the input/output paths. Keep model_path pointed at the complete corresponding Wan2.2 base model directory.
In the JSON selected by each script, set high_noise_quantized_ckpt and low_noise_quantized_ckpt to your downloaded NVFP4 files.
Run all commands below from the LightX2V repository root.
Single-GPU inference
Set --config_json in the corresponding launch script to the matching NVFP4 configuration:
| Task | Launch script | Configuration |
|---|---|---|
| T2V | scripts/wan22/inference/distill/run_wan22_moe_t2v_distill.sh |
configs/wan22/extreme/wan_moe_t2v_distill_nvfp4_sparse_attn.json |
| I2V | scripts/wan22/inference/distill/run_wan22_moe_i2v_distill.sh |
configs/wan22/extreme/wan_moe_i2v_distill_nvfp4_sparse_attn.json |
Prefix the configuration path with ${lightx2v_path}/ when setting --config_json in the script.
# Text-to-video
bash scripts/wan22/inference/distill/run_wan22_moe_t2v_distill.sh
# Image-to-video
bash scripts/wan22/inference/distill/run_wan22_moe_i2v_distill.sh
Multi-GPU inference
The following scripts are configured for eight GPUs and use their own _sp_parallel.json presets. Update the checkpoint paths in those presets before running.
# Text-to-video
bash scripts/wan22/inference/extreme/run_wan22_moe_t2v_extreme_sp_parallel.sh
# Image-to-video
bash scripts/wan22/inference/extreme/run_wan22_moe_i2v_extreme_sp_parallel.sh
π¬ Generation Results
"Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage"
| Resolution | Wan2.2-T2V-14B | LightWan2.2-A14B |
|---|---|---|
| 480p | ||
| 720p |
β‘ Performance Comparison
Test Environment: RTX 5090 Single GPU | LightX2V Framework | End-to-End Latency
| Method | Task | GPU Number | Resolution | NFE | E2E Latency | Speedup |
|---|---|---|---|---|---|---|
| Wan2.2-T2V-14B | T2V | 1 | 480p | 40 | 734.0s | 1.0x |
| LightWan2.2-A14B | T2V | 1 | 480p | 4 | 9.1s | 80.7x |
| Wan2.2-T2V-14B | T2V | 1 | 720p | 40 | 2668.0s | 1.0x |
| LightWan2.2-A14B | T2V | 1 | 720p | 4 | 22.5s | 118.7x |
| Wan2.2-I2V-14B | I2V | 1 | 480p | 40 | 787.0s | 1.0x |
| LightWan2.2-A14B | I2V | 1 | 480p | 4 | 10.7s | 73.9x |
| Wan2.2-I2V-14B | I2V | 1 | 720p | 40 | 2685.0s | 1.0x |
| LightWan2.2-A14B | I2V | 1 | 720p | 4 | 26.7s | 100.5x |
β οΈ Notes
System Requirements
- Required Hardware: NVIDIA RTX 50-series GPUs or other Blackwell architecture GPUs.
- Recommended Runtime:
lightx2v/lightx2v:26052801-cu130-5090.
Dependencies
- Prepare Wan2.2 T5 / VAE components following the standard LightX2V Wan2.2 model structure.
- For I2V, also prepare the required image encoder components and input image according to the LightX2V Wan2.2 I2V script.
- Use Blackwell + NVFP4 kernels for optimal speed and memory efficiency.
Performance Tips
- Use the provided extreme inference script for the 4-step high-noise / low-noise expert schedule.
- Sparse attention is most beneficial at higher resolutions where self-attention dominates latency.
- Enable CPU offload only when GPU memory is limited, since offload can reduce throughput.
π€ Community
- π Issues: GitHub Issues
- π€ Models: HuggingFace Hub
- π Documentation: LightX2V Docs
If you find this project helpful, please give us a β on GitHub
For questions or issues, please open an issue on LightX2V or contact lvchengtao0319@gmail.com.
- Downloads last month
- 13,048
Model tree for lightx2v/LightWan2.2-A14B
Base model
Wan-AI/Wan2.2-I2V-A14B