Update README.md
Browse files
README.md
CHANGED
|
@@ -17,11 +17,56 @@ library_name: diffusers
|
|
| 17 |
---
|
| 18 |
# π¬ Wan-NVFP4-4Steps Models
|
| 19 |
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
## β¨ Features
|
| 23 |
-
|
| 24 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
## π¬ Generation Results
|
| 27 |
|
|
@@ -88,45 +133,28 @@ library_name: diffusers
|
|
| 88 |
</tr>
|
| 89 |
</table>
|
| 90 |
|
|
|
|
| 91 |
|
|
|
|
|
|
|
| 92 |
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
```bash
|
| 96 |
-
git clone https://github.com/ModelTC/LightX2V.git
|
| 97 |
-
cd LightX2V
|
| 98 |
-
uv pip install -v . # or pip install -v .
|
| 99 |
-
```
|
| 100 |
-
2) Install lightx2v-kernel (NVFP4 operators)
|
| 101 |
-
```bash
|
| 102 |
-
pip install scikit_build_core uv
|
| 103 |
-
git clone https://github.com/NVIDIA/cutlass.git
|
| 104 |
-
cd LightX2V/lightx2v_kernel
|
| 105 |
-
MAX_JOBS=$(nproc) CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) \
|
| 106 |
-
uv build --wheel \
|
| 107 |
-
-Cbuild-dir=build . \
|
| 108 |
-
-Ccmake.define.CUTLASS_PATH=/path/to/cutlass \ # Fill in the absolute path to your local cutlass repository here
|
| 109 |
-
--verbose --color=always --no-build-isolation
|
| 110 |
-
pip install dist/*whl --force-reinstall --no-deps
|
| 111 |
-
```
|
| 112 |
-
3) Run inference (modify model paths in scripts)
|
| 113 |
-
```bash
|
| 114 |
-
cd LightX2V/examples/wan
|
| 115 |
-
python wan_i2v_nvfp4.py # I2V
|
| 116 |
-
python wan_t2v_nvfp4.py # T2V
|
| 117 |
-
```
|
| 118 |
-
|
| 119 |
-
## π§ Directory Structure Guide
|
| 120 |
-
- `examples/wan/`: Example inference scripts (choose 480P / 1.3B / 14B based on memory).
|
| 121 |
-
- `lightx2v_kernel/`: Self-compiled NVFP4 operators.
|
| 122 |
|
| 123 |
-
|
| 124 |
-
-
|
| 125 |
-
-
|
| 126 |
|
| 127 |
## π€ Community
|
| 128 |
|
| 129 |
-
-
|
| 130 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
|
| 132 |
-
|
|
|
|
| 17 |
---
|
| 18 |
# π¬ Wan-NVFP4-4Steps Models
|
| 19 |
|
| 20 |
+
> **NVFP4 Quantization-Aware Step Distillation for Blackwell Architecture**
|
| 21 |
+
|
| 22 |
+
[](https://github.com/ModelTC/LightX2V)
|
| 23 |
+
[](https://huggingface.co/lightx2v/)
|
| 24 |
+
|
| 25 |
+
## π Table of Contents
|
| 26 |
+
|
| 27 |
+
- [β¨ Features](#-features)
|
| 28 |
+
- [π Quick Start](#-quick-start)
|
| 29 |
+
- [π¬ Generation Results](#-generation-results)
|
| 30 |
+
- [β‘ Performance Comparison](#-performance-comparison)
|
| 31 |
+
- [π¦ Installation](#-installation)
|
| 32 |
+
- [π οΈ Usage](#-usage)
|
| 33 |
+
- [π§ Project Structure](#-project-structure)
|
| 34 |
+
- [β οΈ Notes](#οΈ-notes)
|
| 35 |
+
- [π€ Community](#-community)
|
| 36 |
|
| 37 |
## β¨ Features
|
| 38 |
+
|
| 39 |
+
- **β‘ 4-Step Inference**: Dramatically accelerated end-to-end generation approaching real-time performance (tested on RTX 5090 single GPU)
|
| 40 |
+
- **π― NVFP4 Quantization**: Reduced memory and bandwidth usage, optimized for Blackwell architecture
|
| 41 |
+
- **π§ LightX2V Integration**: Optimal performance and stability on the official framework
|
| 42 |
+
- **π High-Quality Generation**: Maintains Wan2.1's superior video quality while achieving unprecedented speed
|
| 43 |
+
|
| 44 |
+
## π Quick Start
|
| 45 |
+
|
| 46 |
+
```bash
|
| 47 |
+
# 1. Install LightX2V
|
| 48 |
+
git clone https://github.com/ModelTC/LightX2V.git
|
| 49 |
+
cd LightX2V
|
| 50 |
+
uv pip install -v .
|
| 51 |
+
|
| 52 |
+
# 2. Install NVFP4 Kernel
|
| 53 |
+
pip install scikit_build_core uv
|
| 54 |
+
git clone https://github.com/NVIDIA/cutlass.git
|
| 55 |
+
cd lightx2v_kernel
|
| 56 |
+
|
| 57 |
+
MAX_JOBS=$(nproc) CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) \
|
| 58 |
+
uv build --wheel \
|
| 59 |
+
-Cbuild-dir=build . \
|
| 60 |
+
-Ccmake.define.CUTLASS_PATH=/path/to/cutlass \
|
| 61 |
+
--verbose --color=always --no-build-isolation
|
| 62 |
+
|
| 63 |
+
pip install dist/*whl --force-reinstall --no-deps
|
| 64 |
+
|
| 65 |
+
# 3. Run inference
|
| 66 |
+
cd examples/wan
|
| 67 |
+
python wan_i2v_nvfp4.py # Image-to-Video
|
| 68 |
+
python wan_t2v_nvfp4.py # Text-to-Video
|
| 69 |
+
```
|
| 70 |
|
| 71 |
## π¬ Generation Results
|
| 72 |
|
|
|
|
| 133 |
</tr>
|
| 134 |
</table>
|
| 135 |
|
| 136 |
+
## β οΈ Notes
|
| 137 |
|
| 138 |
+
### System Requirements
|
| 139 |
+
- **Required Hardware**: NVIDIA RTX 50-series GPUs (RTX 5090/5080/5070/5060) or other Blackwell architecture GPUs
|
| 140 |
|
| 141 |
+
### Dependencies
|
| 142 |
+
- Prepare T5 / CLIP / VAE components yourself (same as Wan2.x structure)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 143 |
|
| 144 |
+
### Performance Tips
|
| 145 |
+
- Use Blackwell + NVFP4 for best performance
|
| 146 |
+
- Enable CPU offload for GPUs with limited memory
|
| 147 |
|
| 148 |
## π€ Community
|
| 149 |
|
| 150 |
+
- **π Issues**: [GitHub Issues](https://github.com/ModelTC/LightX2V/issues)
|
| 151 |
+
- **π€ Models**: [HuggingFace Hub](https://huggingface.co/lightx2v/)
|
| 152 |
+
- **π Documentation**: [LightX2V Docs](https://github.com/ModelTC/LightX2V)
|
| 153 |
+
|
| 154 |
+
---
|
| 155 |
+
|
| 156 |
+
<div align="center">
|
| 157 |
+
|
| 158 |
+
**If you find this project helpful, please give us a β on [GitHub](https://github.com/ModelTC/LightX2V)**
|
| 159 |
|
| 160 |
+
</div>
|