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
Update README.md
Browse files
README.md
CHANGED
|
@@ -16,6 +16,7 @@ tags:
|
|
| 16 |
|
| 17 |
[](https://github.com/ModelTC/LightX2V)
|
| 18 |
[](https://huggingface.co/lightx2v/)
|
|
|
|
| 19 |
|
| 20 |
## 📋 Table of Contents
|
| 21 |
|
|
@@ -44,11 +45,17 @@ We strongly recommend using the official LightX2V Docker image for the cleanest
|
|
| 44 |
# 1. Pull LightX2V Docker image
|
| 45 |
docker pull lightx2v/lightx2v:26052801-cu130-5090
|
| 46 |
|
| 47 |
-
# 2. Run
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
#
|
| 51 |
-
bash scripts/wan22/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
```
|
| 53 |
|
| 54 |
### Option B: Manual Installation
|
|
@@ -74,16 +81,28 @@ uv build --wheel \
|
|
| 74 |
|
| 75 |
pip install dist/*whl --force-reinstall --no-deps
|
| 76 |
|
| 77 |
-
# 3. Run
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
#
|
| 81 |
-
bash scripts/wan22/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
```
|
| 83 |
|
| 84 |
-
Scripts:
|
| 85 |
-
|
| 86 |
-
- [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
## 🎬 Generation Results
|
| 89 |
|
|
@@ -104,10 +123,16 @@ Scripts:
|
|
| 104 |
|
| 105 |
**Test Environment**: RTX 5090 Single GPU | LightX2V Framework | End-to-End Latency
|
| 106 |
|
| 107 |
-
| Resolution |
|
| 108 |
-
| --- | ---: | ---: | ---: |
|
| 109 |
-
| 480p |
|
| 110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
|
| 112 |
## ⚠️ Notes
|
| 113 |
|
|
|
|
| 16 |
|
| 17 |
[](https://github.com/ModelTC/LightX2V)
|
| 18 |
[](https://huggingface.co/lightx2v/)
|
| 19 |
+
[](https://light-ai.top/LightX2V-BLOG/posts/Wan22-NVFP4-Sparse/)
|
| 20 |
|
| 21 |
## 📋 Table of Contents
|
| 22 |
|
|
|
|
| 45 |
# 1. Pull LightX2V Docker image
|
| 46 |
docker pull lightx2v/lightx2v:26052801-cu130-5090
|
| 47 |
|
| 48 |
+
# 2. Run single-GPU inference
|
| 49 |
+
# Text-to-video
|
| 50 |
+
bash scripts/wan22/extreme/run_wan22_moe_t2v_extreme.sh
|
| 51 |
+
# Image-to-video
|
| 52 |
+
bash scripts/wan22/extreme/run_wan22_moe_i2v_extreme.sh
|
| 53 |
+
|
| 54 |
+
# 3. Run multi-GPU sequence-parallel inference
|
| 55 |
+
# Text-to-video
|
| 56 |
+
bash scripts/wan22/extreme/run_wan22_moe_t2v_extreme_sp_parallel.sh
|
| 57 |
+
# Image-to-video
|
| 58 |
+
bash scripts/wan22/extreme/run_wan22_moe_i2v_extreme_sp_parallel.sh
|
| 59 |
```
|
| 60 |
|
| 61 |
### Option B: Manual Installation
|
|
|
|
| 81 |
|
| 82 |
pip install dist/*whl --force-reinstall --no-deps
|
| 83 |
|
| 84 |
+
# 3. Run single-GPU inference
|
| 85 |
+
# Text-to-video
|
| 86 |
+
bash scripts/wan22/extreme/run_wan22_moe_t2v_extreme.sh
|
| 87 |
+
# Image-to-video
|
| 88 |
+
bash scripts/wan22/extreme/run_wan22_moe_i2v_extreme.sh
|
| 89 |
+
|
| 90 |
+
# 4. Run multi-GPU sequence-parallel inference
|
| 91 |
+
# Text-to-video
|
| 92 |
+
bash scripts/wan22/extreme/run_wan22_moe_t2v_extreme_sp_parallel.sh
|
| 93 |
+
# Image-to-video
|
| 94 |
+
bash scripts/wan22/extreme/run_wan22_moe_i2v_extreme_sp_parallel.sh
|
| 95 |
```
|
| 96 |
|
| 97 |
+
**Single-GPU Scripts:**
|
| 98 |
+
|
| 99 |
+
- [run_wan22_moe_t2v_extreme.sh](https://github.com/ModelTC/LightX2V/blob/main/scripts/wan22/extreme/run_wan22_moe_t2v_extreme.sh)
|
| 100 |
+
- [run_wan22_moe_i2v_extreme.sh](https://github.com/ModelTC/LightX2V/blob/main/scripts/wan22/extreme/run_wan22_moe_i2v_extreme.sh)
|
| 101 |
+
|
| 102 |
+
**Multi-GPU Scripts:**
|
| 103 |
+
|
| 104 |
+
- [run_wan22_moe_t2v_extreme_sp_parallel.sh](https://github.com/ModelTC/LightX2V/blob/main/scripts/wan22/extreme/run_wan22_moe_t2v_extreme_sp_parallel.sh)
|
| 105 |
+
- [run_wan22_moe_i2v_extreme_sp_parallel.sh](https://github.com/ModelTC/LightX2V/blob/main/scripts/wan22/extreme/run_wan22_moe_i2v_extreme_sp_parallel.sh)
|
| 106 |
|
| 107 |
## 🎬 Generation Results
|
| 108 |
|
|
|
|
| 123 |
|
| 124 |
**Test Environment**: RTX 5090 Single GPU | LightX2V Framework | End-to-End Latency
|
| 125 |
|
| 126 |
+
| Method | Task | GPU Number | Resolution | NFE | E2E Latency | Speedup |
|
| 127 |
+
| --- | :---: | ---: | ---: | ---: | ---: | ---: |
|
| 128 |
+
| Wan2.2-T2V-14B | T2V | 1 | 480p | 40 | 734.0s | 1.0x |
|
| 129 |
+
| Wan2.2-NVFP4-Sparse | T2V | 1 | 480p | 4 | 9.1s | 80.7x |
|
| 130 |
+
| Wan2.2-T2V-14B | T2V | 1 | 720p | 40 | 2668.0s | 1.0x |
|
| 131 |
+
| Wan2.2-NVFP4-Sparse | T2V | 1 | 720p | 4 | 22.5s | 118.7x |
|
| 132 |
+
| Wan2.2-I2V-14B | I2V | 1 | 480p | 40 | 787.0s | 1.0x |
|
| 133 |
+
| Wan2.2-NVFP4-Sparse | I2V | 1 | 480p | 4 | 10.7s | 73.9x |
|
| 134 |
+
| Wan2.2-I2V-14B | I2V | 1 | 720p | 40 | 2685.0s | 1.0x |
|
| 135 |
+
| Wan2.2-NVFP4-Sparse | I2V | 1 | 720p | 4 | 26.7s | 100.5x |
|
| 136 |
|
| 137 |
## ⚠️ Notes
|
| 138 |
|