Skip to content

ModelTC/lightx2v

Repository files navigation

LightX2V: Light Video Generation Inference Framework

LightLLM

Supported Model List

HunyuanVideo-T2V

HunyuanVideo-I2V

Wan2.1-T2V

Wan2.1-I2V

Fast Start Up With Conda

# clone repo and submodules
git clone https://github.com/ModelTC/lightx2v.git lightx2v && cd lightx2v
git submodule update --init --recursive

# create conda env and install requirments
conda create -n lightx2v python=3.11 && conda activate lightx2v
pip install -r requirements.txt --use-deprecated=legacy-resolver

# install flash-attention 2
cd lightx2v/3rd/flash-attention && pip install --no-cache-dir -v -e .

# install flash-attention 3, only if hopper
cd lightx2v/3rd/flash-attention/hopper && pip install --no-cache-dir -v -e .

# modify the parameters of the running script
bash scripts/run_hunyuan_t2v.sh

Fast Start Up With Docker

docker pull lightx2v/lightx2v:latest
docker run -it --rm --name lightx2v --gpus all --ipc=host lightx2v/lightx2v:latest

Contributing Guidelines

We have prepared a pre-commit hook to enforce consistent code formatting across the project. If your code complies with the standards, you should not see any errors, you can clean up your code following the steps below:

  1. Install the required dependencies:
pip install ruff pre-commit
  1. Then, run the following command before commit:
pre-commit run --all-files
  1. Finally, please double-check your code to ensure it complies with the following additional specifications as much as possible:
  • Avoid hard-coding local paths: Make sure your submissions do not include hard-coded local paths, as these paths are specific to individual development environments and can cause compatibility issues. Use relative paths or configuration files instead.
  • Clear error handling: Implement clear error-handling mechanisms in your code so that error messages can accurately indicate the location of the problem, possible causes, and suggested solutions, facilitating quick debugging.
  • Detailed comments and documentation: Add comments to complex code sections and provide comprehensive documentation to explain the functionality of the code, input-output requirements, and potential error scenarios.

Thank you for your contributions!