Skip to content

ParthProLegendForks/LightX2V

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

764 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚡️ LightX2V:
Light Video Generation Inference Framework

logo

License Ask DeepWiki Doc Doc Papers Docker

[ English | 中文 ]


LightX2V is an advanced lightweight video generation inference framework engineered to deliver efficient, high-performance video synthesis solutions. This unified platform integrates multiple state-of-the-art video generation techniques, supporting diverse generation tasks including text-to-video (T2V) and image-to-video (I2V). X2V represents the transformation of different input modalities (X, such as text or images) into video output (V).

🔥 Latest News

  • November 21, 2025: 🚀 We support the HunyuanVideo-1.5 video generation model since Day 0. With the same number of GPUs, LightX2V can achieve a speed improvement of over 2 times and supports deployment on GPUs with lower memory (such as the 24GB RTX 4090). It also supports CFG/Ulysses parallelism, efficient offloading, TeaCache/MagCache technologies, and more. It also supports deployment on domestic chips such as Muxi and Cambricon. Quantized models and lightweight VAE models are now available: Hy1.5-Quantized-Models for quantized inference, and LightTAE for HunyuanVideo-1.5 for fast VAE decoding. We will soon update more models on our HuggingFace page, including step distillation, VAE distillation, and other related models. Refer to this for usage tutorials, or check out the examples directory for code examples.

💡 Quick Start

For comprehensive usage instructions, please refer to our documentation: English Docs | 中文文档

Installation from Git

pip install -v git+https://github.com/ModelTC/LightX2V.git

Building from Source

git clone https://github.com/ModelTC/LightX2V.git
cd LightX2V
uv pip install -v . # pip install -v .

(Optional) Install Attention/Quantize Operators

For attention operators installation, please refer to our documentation: English Docs | 中文文档

Quick Start

# examples/hunyuan_video/hunyuan_t2v.py
from lightx2v import LightX2VPipeline

pipe = LightX2VPipeline(
    model_path="/path/to/ckpts/hunyuanvideo-1.5/",
    model_cls="hunyuan_video_1.5",
    transformer_model_name="720p_t2v",
    task="t2v",
)

pipe.create_generator(
    attn_mode="sage_attn2",
    infer_steps=50,
    num_frames=121,
    guidance_scale=6.0,
    sample_shift=9.0,
    aspect_ratio="16:9",
    fps=24,
)

seed = 123
prompt = "Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage."
negative_prompt = ""
save_result_path="/path/to/save_results/output.mp4"

pipe.generate(
    seed=seed,
    prompt=prompt,
    negative_prompt=negative_prompt,
    save_result_path=save_result_path,
)

💡 More Examples: For more usage examples including quantization, offloading, caching, and other advanced configurations, please refer to the examples directory.

🤖 Supported Model Ecosystem

Official Open-Source Models

Quantized and Distilled Models/LoRAs (🚀 Recommended: 4-step inference)

Lightweight Autoencoder Models (🚀 Recommended: fast inference & low memory usage)

Autoregressive Models

💡 Refer to the Model Structure Documentation to quickly get started with LightX2V

🚀 Frontend Interfaces

We provide multiple frontend interface deployment options:

  • 🎨 Gradio Interface: Clean and user-friendly web interface, perfect for quick experience and prototyping
  • 🎯 ComfyUI Interface: Powerful node-based workflow interface, supporting complex video generation tasks
  • 🚀 Windows One-Click Deployment: Convenient deployment solution designed for Windows users, featuring automatic environment configuration and intelligent parameter optimization

💡 Recommended Solutions:

  • First-time Users: We recommend the Windows one-click deployment solution
  • Advanced Users: We recommend the ComfyUI interface for more customization options
  • Quick Experience: The Gradio interface provides the most intuitive operation experience

🚀 Core Features

🎯 Ultimate Performance Optimization

  • 🔥 SOTA Inference Speed: Achieve ~20x acceleration via step distillation and system optimization (single GPU)
  • ⚡️ Revolutionary 4-Step Distillation: Compress original 40-50 step inference to just 4 steps without CFG requirements
  • 🛠️ Advanced Operator Support: Integrated with cutting-edge operators including Sage Attention, Flash Attention, Radial Attention, q8-kernel, sgl-kernel, vllm

💾 Resource-Efficient Deployment

  • 💡 Breaking Hardware Barriers: Run 14B models for 480P/720P video generation with only 8GB VRAM + 16GB RAM
  • 🔧 Intelligent Parameter Offloading: Advanced disk-CPU-GPU three-tier offloading architecture with phase/block-level granular management
  • ⚙️ Comprehensive Quantization: Support for w8a8-int8, w8a8-fp8, w4a4-nvfp4 and other quantization strategies

🎨 Rich Feature Ecosystem

  • 📈 Smart Feature Caching: Intelligent caching mechanisms to eliminate redundant computations
  • 🔄 Parallel Inference: Multi-GPU parallel processing for enhanced performance
  • 📱 Flexible Deployment Options: Support for Gradio, service deployment, ComfyUI and other deployment methods
  • 🎛️ Dynamic Resolution Inference: Adaptive resolution adjustment for optimal generation quality
  • 🎞️ Video Frame Interpolation: RIFE-based frame interpolation for smooth frame rate enhancement

🏆 Performance Benchmarks

For detailed performance metrics and comparisons, please refer to our benchmark documentation.

Detailed Service Deployment Guide →

📚 Technical Documentation

📖 Method Tutorials

🛠️ Deployment Guides

🧾 Contributing Guidelines

We maintain code quality through automated pre-commit hooks to ensure consistent formatting across the project.

Tip

Setup Instructions:

  1. Install required dependencies:
pip install ruff pre-commit
  1. Run before committing:
pre-commit run --all-files

We appreciate your contributions to making LightX2V better!

🤝 Acknowledgments

We extend our gratitude to all the model repositories and research communities that inspired and contributed to the development of LightX2V. This framework builds upon the collective efforts of the open-source community.

🌟 Star History

Star History Chart

✏️ Citation

If you find LightX2V useful in your research, please consider citing our work:

@misc{lightx2v,
 author = {LightX2V Contributors},
 title = {LightX2V: Light Video Generation Inference Framework},
 year = {2025},
 publisher = {GitHub},
 journal = {GitHub repository},
 howpublished = {\url{https://github.com/ModelTC/lightx2v}},
}

📞 Contact & Support

For questions, suggestions, or support, please feel free to reach out through:


Built with ❤️ by the LightX2V team

About

Light Video Generation Inference Framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 65.9%
  • Vue 14.0%
  • JavaScript 8.0%
  • Shell 4.4%
  • Cuda 2.8%
  • HTML 1.9%
  • Other 3.0%