ModelTC/LightX2V

Lightweight Image Video Action Generation Inference Framework

⚡️ LightX2V – Light‑weight Video Generation Inference Framework

What it is – LightX2V is an open‑source inference engine that lets you run state‑of‑the‑art image‑and‑video generation models (text‑to‑video, image‑to‑video, text‑to‑image, image‑to‑image, etc.) efficiently on a single GPU or a multi‑GPU cluster. It focuses on speed: the authors provide quantized, distilled LoRA checkpoints and a set of deployment tricks (off‑loading, tensor/sequence parallelism, FP8/NVFP4 quantization, feature caching) that cut inference time dramatically compared with other frameworks such as Diffusers, FastVideo or SGL‑Diffusion.


🎯 Core capabilities

Capability Details
Multi‑modal generation Text‑to‑Video (T2V), Image‑to‑Video (I2V), Text‑to‑Image (T2I), Image‑to‑Image (I2I) and audio‑synchronized video (T2AV, I2AV, FL2AV, Ref2AV).
Supported models MiniMax‑H3, LTX‑2/2.3, HunyuanVideo‑1.5, Wan 2.1/2.2, SwiftVR, Qwen‑Image/‑Edit, Self‑Forcing, Matrix‑Game‑2.0 and many others.
Speed‑up tricks 4‑step distilled LoRAs, CFG‑free inference, FP8/NVFP4 quantization, block‑level off‑loading, tensor/sequence parallelism, disaggregated deployment (Mooncake, T‑head PPU, iluvatar, Enflame, MUSA, ROCm, Ascend, etc.).
Benchmarks On an H100 (8 GPUs) LightX2V runs a 40‑step 81‑frame video in 0.35 s/step (FP8, no‑CFG) – ~2× faster than its own baseline and up to 3.9× faster than competing frameworks.
Front‑ends Gradio web UI, ComfyUI node‑based UI, Windows one‑click installer.
Packaging Docker image, pip installable package, source build with optional custom attention/quantization kernels.

🚀 Getting started (quick‑start)

# Install directly from the repo
pip install -v git+https://github.com/ModelTC/LightX2V.git

Or clone and build locally:

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

Run a MiniMax‑H3 text‑to‑audio‑video example

from lightx2v import LightX2VPipeline
pipe = LightX2VPipeline(
    model_path="/path/to/MiniMax-H3",
    model_cls="minimax_h3",
    model_variant="fl2av",
)
pipe.create_generator(config_json="configs/minimax_h3/dmd/minimax_h3_bf16_4step.json")
pipe.generate(
    task="t2av",
    seed=42,
    prompt="A cinematic fox walks through a snowy forest while soft wind and distant birds create an immersive winter soundscape.",
    save_result_path="outputs/fox.mp4",
)

For full installation of the optional attention/quantization kernels and for more examples (NVFP4, off‑loading, multi‑GPU scripts) see the examples/ and scripts/ directories.


📚 Documentation & community


🛠️ Typical use‑cases

  • Rapid prototyping of video generation – developers can spin up a Gradio UI or a ComfyUI node to experiment with T2V/T2AV pipelines.
  • Production‑grade inference – the framework’s parallelism and quantization let you serve high‑resolution (720‑1080p) video models on a modest GPU farm.
  • Research on multimodal diffusion – built‑in support for LoRA‑based step‑distillation and custom DMD configs makes it easy to test new model variants.
  • Edge‑oriented deployment – support for T‑head PPU, iluvatar, Enflame, MUSA, ROCm, Ascend, etc., enables inference on non‑NVIDIA hardware.

📜 License

Apache 2.0 – free for commercial and academic use.


Bottom line – LightX2V is a production‑ready, highly optimized inference stack for the newest generation of image and video diffusion/flow models. It bundles model zoo integration, speed‑up tricks, and ready‑to‑use front‑ends, making it a solid choice for anyone who needs fast, scalable video generation.

Related

  • Project
  • Project
  • Project
  • Project
  • Project