Python API

The LTX-2 codebase is a monorepo with several packages. From model definition in ‘ltx-core’ to pipelines in ‘ltx-pipelines’ and training capabilities in ‘ltx-trainer’.

The codebase has been tested with Python >=3.12, CUDA version >12.7, and supports PyTorch ~= 2.7.

Python API Quick Start

For developers who want direct Python integration or custom workflows.

Installation

$# Clone the repository
>git clone https://github.com/Lightricks/LTX-2.git
>cd LTX-2
>
># Set up the environment
>uv sync --frozen
>source .venv/bin/activate

Download Models

$# Download the distilled model (recommended for speed)
>huggingface-cli download Lightricks/LTX-2 \
> --include "ltx-2-19b-distilled.safetensors" \
> --local-dir ComfyUI/models/checkpoints/LTX-Video

A full list of available models can be found in the LTX-2 GitHub repo