LTX-2 README

The project's README from github.com/Lightricks/LTX-2. As one markdown file: README.md.

LTX-2

Website Model Demo Paper Discord

LTX-2 is the first DiT-based audio-video foundation model that contains all core capabilities of modern video generation in one model: synchronized audio and video, high fidelity, multiple performance modes, production-ready outputs, API access, and open access.

🚀 Quick Start

Clone the repo

git clone https://github.com/Lightricks/LTX-2.git
cd LTX-2

Install the dependencies. The natten extra is the fastest backend for the diffusion video VAE below, and is Linux + CUDA only -- on Windows and macOS it is skipped automatically and decoding falls back to a Triton or eager implementation, so the same command works everywhere (see neighborhood attention backends)

uv sync --extra natten

Download the models or use the Hugging Face CLI

hf auth login
hf download Lightricks/LTX-2.5 \
    diffusion_models/ltx-2.5-22b-distilled-transformer-bf16.safetensors \
    text_encoders/gemma4-12b-with-proj-ltx-2.5-bf16.safetensors \
    vae/ltx-2.5-video-vae-bf16.safetensors \
    vae/ltx-2.5-audio-vae-bf16.safetensors \
    latent_upscale_models/ltx-2.5-latent-spatial-upscaler-x2-bf16-1.0.safetensors \
    --local-dir models/ltx-2.5

That is roughly 66 GiB. The CLI keeps the repository's folder layout under --local-dir, which is why the paths below include diffusion_models/, vae/ and so on.

If you get a 401/403, accept the model terms on Hugging Face and log in with a Read token (fine-grained tokens need the "read gated repos" scope enabled).

Generate

uv run python -m ltx_pipelines.distilled \
    --transformer-path       models/ltx-2.5/diffusion_models/ltx-2.5-22b-distilled-transformer-bf16.safetensors \
    --text-encoder-path      models/ltx-2.5/text_encoders/gemma4-12b-with-proj-ltx-2.5-bf16.safetensors \
    --video-vae-path         models/ltx-2.5/vae/ltx-2.5-video-vae-bf16.safetensors \
    --audio-vae-path         models/ltx-2.5/vae/ltx-2.5-audio-vae-bf16.safetensors \
    --spatial-upsampler-path models/ltx-2.5/latent_upscale_models/ltx-2.5-latent-spatial-upscaler-x2-bf16-1.0.safetensors \
    --num-frames 121 \
    --seed 42 \
    --output-path output.mp4 \
    --prompt "A medium close-up shot features a Caucasian man with a beard, wearing a green and white baseball cap without any letters on the front, and a light blue shirt over a white t-shirt. He is positioned in the center of the frame, looking intently directly at the camera, his eyes focused on camera. His facial expression is one of deep concentration, with his brow slightly raised. As he looks straight at the camera, a quick sniff sound is heard, and then he speaks with a deep male voice and a satisfied tone, saying, 'I think it's so good.' The camera remains static throughout, maintaining a shallow depth of field, which keeps the man in sharp focus while the background is softly blurred, showing a beige wall behind him. After a brief pause, another short, audible sniff is heard. The man then continues to speak, his voice maintaining the same quality, as he states, 'So good. So good.' He elaborates further, emphasizing his point with a final statement, 'This got to be, it's got to be the best tool I've ever seen.'"

In cases of GPU memory constraints, consider --quantization fp8-cast --offload {cpu, disk}. See additional flags.

This is DistilledPipeline: the fast starting point. For production quality (slower, more VRAM), run DFR below. For other capabilities, see Models and Pipelines.

DFR (production quality)

DFR (Diffusion Fidelity Rendering) is the production-quality text/image-to-video path. It uses the same distilled transformer as the command above, plus a detailing IC-LoRA — extra generated keyframes and a spatial detailing pass. Expect longer runtime and more VRAM, not a different prompting style. Do not pass the full (dev) transformer.

Reuse the text encoder, VAEs, spatial upscaler, and distilled transformer from the first download; add the detailing IC-LoRA (separate repository):

hf download Lightricks/LTX-2.5-22b-IC-LoRA-Pixel-Spatial-Upscaler \
    ltx-2.5-22b-ic-lora-pixel-spatial-upscaler-x2-1.0.safetensors \
    --local-dir models/ltx-2.5/loras
uv run python -m ltx_pipelines.dfr_pipeline \
    --transformer-path       models/ltx-2.5/diffusion_models/ltx-2.5-22b-distilled-transformer-bf16.safetensors \
    --text-encoder-path      models/ltx-2.5/text_encoders/gemma4-12b-with-proj-ltx-2.5-bf16.safetensors \
    --video-vae-path         models/ltx-2.5/vae/ltx-2.5-video-vae-bf16.safetensors \
    --audio-vae-path         models/ltx-2.5/vae/ltx-2.5-audio-vae-bf16.safetensors \
    --detailing-lora         models/ltx-2.5/loras/ltx-2.5-22b-ic-lora-pixel-spatial-upscaler-x2-1.0.safetensors \
    --spatial-upsampler-path models/ltx-2.5/latent_upscale_models/ltx-2.5-latent-spatial-upscaler-x2-bf16-1.0.safetensors \
    --num-frames 121 \
    --seed 42 \
    --output-path output_dfr.mp4 \
    --prompt "A medium close-up shot features a Caucasian man with a beard, wearing a green and white baseball cap without any letters on the front, and a light blue shirt over a white t-shirt. He is positioned in the center of the frame, looking intently directly at the camera, his eyes focused on camera. His facial expression is one of deep concentration, with his brow slightly raised. As he looks straight at the camera, a quick sniff sound is heard, and then he speaks with a deep male voice and a satisfied tone, saying, 'I think it's so good.' The camera remains static throughout, maintaining a shallow depth of field, which keeps the man in sharp focus while the background is softly blurred, showing a beige wall behind him. After a brief pause, another short, audible sniff is heard. The man then continues to speak, his voice maintaining the same quality, as he states, 'So good. So good.' He elaborates further, emphasizing his point with a final statement, 'This got to be, it's got to be the best tool I've ever seen.'"

Defaults are 1024×1536 at 24 fps (--temporal-upscalings 0). UHD 4K is --width 3840 --height 2176 (not 2160). --temporal-upscalings 1 or 2 needs the temporal upscaler. Size, fps, and memory notes: Running DFR.

Full Model List

LTX-2.5 is the recommended model, and what the Quick Start uses. Its weights are published as one file per component, so you download only the parts your pipeline needs.

Download from the LTX-2.5 HuggingFace repository:

Transformer (choose and download one of the following)

Text Encoder - Gemma 4 12B, fine-tuned for LTX, with the text projection bundled in; required by every pipeline. It is bundled with the model, so no separate Gemma download is needed. Google's stock Gemma 4 release is not a substitute: loading checks the encoder's version against the one the checkpoint was trained with (gemma4-12b-ltx-v1)

Video VAE (choose and download one of the following)

Audio VAE - required by the pipelines that generate or decode audio

Spatial Upscaler - required by the two-stage pipeline implementations in this repository

Temporal Upscaler - required by DFRPipeline when running temporal refine rounds (--temporal-upscalings)

Distilled LoRA - required by the two-stage pipeline implementations that run the full model in stage 1 (TI2Vid two-stage / HQ, Keyframe, A2Vid; not DistilledPipeline, DFRPipeline, ICLoraPipeline, or DubItPipeline)

Detailing IC-LoRA - required by DFRPipeline's refinement stage (--detailing-lora). It lives in its own repository, LTX-2.5-22b-IC-LoRA-Pixel-Spatial-Upscaler

Duration Head - optional; lets you omit --num-frames and have the clip length predicted from the prompt

Legacy: LTX-2.3

Every pipeline in this repository also runs on LTX-2.3. Its checkpoints are single files bundling the transformer, VAEs and text projection, with the Gemma 3 text encoder downloaded separately. Files are not interchangeable between the two models, and a LoRA only works with the model it was trained on.

See LTX-2.3 models for the full list.

Available Pipelines

⚡ Optimization Tips

✍️ Prompting for LTX-2

When writing prompts, focus on detailed, chronological descriptions of actions and scenes. Include specific movements, appearances, camera angles, and environmental details - all in a single flowing paragraph. Start directly with the action, and keep descriptions literal and precise. Think like a cinematographer describing a shot list. Keep within 200 words. For best results, build your prompts using this structure:

For additional guidance on writing a prompt please refer to https://ltx.io/blog/prompting-guide-for-ltx-2

Automatic Prompt Enhancement

LTX-2 pipelines support automatic prompt enhancement via an enhance_prompt parameter.

🔌 ComfyUI Integration

To use our model with ComfyUI, please follow the instructions at https://github.com/Lightricks/ComfyUI-LTXVideo/.

📦 Packages

This repository is organized as a monorepo with three main packages:

Each package has its own README and documentation. See the Documentation section below.

📚 Documentation

Each package includes compre

LTX-2 (Lightricks/LTX-2)

Searching Database…

9.8K ·GitHub
这是什么?这是 Lightricks 官方的 LTX-2 Python 包,LTX-2 是他们的音视频基础模型:一个基于 DiT 的模型,可以从文字或图片生成带同步音频的视频,并提供多种画质/速度模式。
它是我写代码时调用的库,是命令行工具,还是模型权重本身?它是一个 Python monorepo:ltx-core(模型内部实现)、ltx-pipelines(开箱即用的生成流水线)和 ltx-trainer(微调)。模型权重需要另外从 Hugging Face 下载,大约 66 GiB。
我怎么把它跑起来?克隆仓库,安装依赖,然后用 Hugging Face CLI 下载模型组件。这个仓库是受限的:需要先接受模型条款,并用一个带有 'read gated repos' 权限的 Read 令牌登录。
LTX-2.3 和 LTX-2.5 的检查点或 LoRA 能混用吗?不能——两个模型的文件不能互相通用,而且一个 LoRA 只能在训练它所用的那个模型上生效。推荐使用 LTX-2.5,Quick Start 用的也是它。
跑它需要什么样的硬件?真正必需的是 NVIDIA CUDA 显卡——快速的 natten VAE 后端只支持 Linux + CUDA;Windows 和 macOS 会自动回退到 Triton 或 eager 解码。显存不够的话,可以用 --quantization fp8-cast 加上 --offload cpu 或磁盘。
DistilledPipeline 和 DFR 有什么区别?DistilledPipeline 是快速上手的方案(第一阶段 8 步,第二阶段 4 步)。DFR 是生产级质量的路线:同样的蒸馏 transformer 外加一次细节增强的 IC-LoRA 处理,所以运行时间更长,占用显存也更多。
除了文生视频,它还能做什么?图生视频、视频转视频和 HDR 视频变换、关键帧插值、音频生成视频、对指定时间段重新生成,以及 Dub-It——在保持说话人身份和口型一致的前提下改写台词。
它能输出什么分辨率和帧率?默认是 1024×1536、24 fps;UHD 4K 用 --width 3840 --height 2176(不是 2160)。更高的帧率需要时间维度超分(1 或 2 轮),这要用单独的时间超分模型。
它支持 HDR 工作流吗?支持。标准流水线可以通过 --hdr SRGBLINEAR、ACESCG 或 ACESCCT 接受 EXR 静帧和 EXR 帧序列文件夹,并能输出半精度浮点的 EXR 帧以及 BT.2020/HLG 母版。
提示词应该怎么写?像摄影师写分镜清单那样:一段不超过 200 词的连贯段落,先写主要动作,然后按时间顺序写运动、外貌、机位、灯光和突然的变化。流水线还可以通过 enhanceprompt 参数自动优化提示词。
我能用自己的素材微调它吗?可以——ltx-trainer 包支持 LoRA、全量微调和 IC-LoRA 训练。
我能在 ComfyUI 里使用 LTX-2 吗?可以,有官方的 ComfyUI 集成;README 里有安装说明的链接。
Creator
Lightricks
Size
1.9 MB
Stars
9.8K
Age
9mo
Commits · 90 Days