Instructions to use lightx2v/Wan2.1-Distill-Models with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use lightx2v/Wan2.1-Distill-Models with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Wan-AI/Wan2.1-T2V-14B", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("lightx2v/Wan2.1-Distill-Models") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Diffusion Single File
How to use lightx2v/Wan2.1-Distill-Models with Diffusion Single File:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
# No code snippets available yet for this library.
# To use this model, check the repository files and the library's documentation.
# Want to help? PRs adding snippets are welcome at:
# https://github.com/huggingface/huggingface.js㪠Wan2.1 Distilled Models
β‘ High-Performance Video Generation with 4-Step Inference
Distillation-accelerated versions of Wan2.1 - Dramatically faster while maintaining exceptional quality
π What's Special?
π¦ Model Catalog
π₯ Model Types
π― Precision Variants
| Precision | Model Identifier | Model Size | Framework | Quality vs Speed |
|---|---|---|---|---|
| π BF16 | lightx2v_4step |
~28-32 GB | LightX2V | βββββ Highest quality |
| β‘ FP8 | scaled_fp8_e4m3_lightx2v_4step |
~15-17 GB | LightX2V | ββββ Excellent balance |
| π― INT8 | int8_lightx2v_4step |
~15-17 GB | LightX2V | ββββ Fast & efficient |
| π· FP8 ComfyUI | scaled_fp8_e4m3_lightx2v_4step_comfyui |
~15-17 GB | ComfyUI | βββ ComfyUI ready |
π Naming Convention
# Pattern: wan2.1_{task}_{resolution}_{precision}.safetensors
# Examples:
wan2.1_i2v_720p_lightx2v_4step.safetensors # 720P I2V - BF16
wan2.1_i2v_720p_scaled_fp8_e4m3_lightx2v_4step.safetensors # 720P I2V - FP8
wan2.1_i2v_480p_int8_lightx2v_4step.safetensors # 480P I2V - INT8
wan2.1_t2v_14b_scaled_fp8_e4m3_lightx2v_4step_comfyui.safetensors # T2V - FP8 ComfyUI
π‘ Explore all models: Browse Full Model Collection β
π Usage
LightX2V is a high-performance inference framework optimized for these models, approximately 2x faster than ComfyUI with better quantization accuracy. Highly recommended!
Quick Start
- Download model (720P I2V FP8 example)
huggingface-cli download lightx2v/Wan2.1-Distill-Models \
--local-dir ./models/wan2.1_i2v_720p \
--include "wan2.1_i2v_720p_scaled_fp8_e4m3_lightx2v_4step.safetensors"
- Clone LightX2V repository
git clone https://github.com/ModelTC/LightX2V.git
cd LightX2V
- Install dependencies
pip install -r requirements.txt
Or refer to Quick Start Documentation to use docker
- Configure inference
For the 720P I2V FP8 weights downloaded above, use the I2V FP8 configuration.
Set dit_quantized_ckpt to the local wan2.1_i2v_720p_scaled_fp8_e4m3_lightx2v_4step.safetensors file and set size to [720, 1280]. Choose an attention backend supported by your GPU and installed environment, and enable CPU offload if needed.
For other tasks or weight formats, see the Wan inference guide.
- Run inference
Edit the I2V FP8 launch script:
- Set
lightx2v_path,CUDA_VISIBLE_DEVICES, and the input/output paths. - Set
model_pathto the complete Wan2.1-I2V-14B-720P base model directory. - Use the FP8 configuration prepared above for
--config_json. - Change
--size 480 832to--size 720 1280.
Run from the LightX2V repository root:
bash scripts/wan/inference/distill/run_wan_i2v_distill_fp8.sh
Documentation
- Quick Start Guide: LightX2V Quick Start
- Complete Usage Guide: LightX2V Model Structure Documentation
- Configuration Guide: Configuration Files
- Quantization Usage: Quantization Documentation
- Parameter Offload: Offload Documentation
Performance Advantages
- β‘ Fast: Approximately 2x faster than ComfyUI
- π― Optimized: Deeply optimized for distilled models
- πΎ Memory Efficient: Supports CPU offload and other memory optimization techniques
- π οΈ Flexible: Supports multiple quantization formats and configuration options
Community
β οΈ Important Notes
Additional Components: These models only contain DIT weights. You also need:
- T5 text encoder
- CLIP vision encoder
- VAE encoder/decoder
- Tokenizers
Refer to LightX2V Documentation for how to organize the complete model directory.
If you find this project helpful, please give us a β on GitHub
- Downloads last month
- 17,384
Model tree for lightx2v/Wan2.1-Distill-Models
Base model
Wan-AI/Wan2.1-I2V-14B-480P