Instructions to use Lightricks/LTX-2.5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusion Single File
How to use Lightricks/LTX-2.5 with Diffusion Single File:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- LTX-2
How to use Lightricks/LTX-2.5 with LTX-2:
# Install the LTX-2 pipelines git clone https://github.com/Lightricks/LTX-2.git cd LTX-2 uv sync --extra natten
# Download weights from this repo # Substitute filenames from this repo's "Files and versions" if they differ hf download Lightricks/LTX-2.5 \ diffusion_models/<distilled-transformer>.safetensors \ text_encoders/gemma4-12b-with-proj-ltx-2.5-bf16.safetensors \ vae/<video-vae>.safetensors \ vae/<audio-vae>.safetensors \ latent_upscale_models/<spatial-upsampler>.safetensors \ latent_upscale_models/<temporal-upsampler>.safetensors \ --local-dir models/LTX-2.5 # DFR requires the detailing IC-LoRA (separate repo; strength is fixed at 0.5) hf download Lightricks/LTX-2.5-22b-IC-LoRA-Pixel-Spatial-Upscaler --local-dir models/LTX-2.5-22b-IC-LoRA-Pixel-Spatial-Upscaler# Distilled LTX-2.5 pipeline (fast) uv run python -m ltx_pipelines.distilled \ --transformer-path models/LTX-2.5/diffusion_models/<distilled-transformer>.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/<video-vae>.safetensors \ --audio-vae-path models/LTX-2.5/vae/<audio-vae>.safetensors \ --spatial-upsampler-path models/LTX-2.5/latent_upscale_models/<spatial-upsampler>.safetensors \ --num-frames 121 \ --prompt "A beautiful sunset over the ocean" \ --output-path output.mp4 # For image-to-video, add: --image path/to/image.jpg 0 0.8# DFR pipeline (higher detail fidelity; optional temporal 2x/4x) uv run python -m ltx_pipelines.dfr_pipeline \ --transformer-path models/LTX-2.5/diffusion_models/<distilled-transformer>.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/<video-vae>.safetensors \ --audio-vae-path models/LTX-2.5/vae/<audio-vae>.safetensors \ --spatial-upsampler-path models/LTX-2.5/latent_upscale_models/<spatial-upsampler>.safetensors \ --temporal-upsampler-path models/LTX-2.5/latent_upscale_models/<temporal-upsampler>.safetensors \ --detailing-lora models/LTX-2.5-22b-IC-LoRA-Pixel-Spatial-Upscaler/ltx-2.5-22b-ic-lora-pixel-spatial-upscaler-x2-1.0.safetensors \ --spatial-upscalings 1 \ --temporal-upscalings 1 \ --height 1088 \ --width 1920 \ --num-frames 121 \ --prompt "A beautiful sunset over the ocean" \ --output-path output.mp4 # For 4K: --spatial-upscalings 2 --width 3840 --height 2176 # For image-to-video, add: --image path/to/image.jpg 0 0.8 - Notebooks
- Google Colab
- Kaggle
M5 VAE Errors
In ComfyUI on Mac M5 processors the VAEs error out on Float64. I switched to LTX 2.3 VAEs and it works.
Wow this runs super fast and really high quality, love it. Thanks.
Is there some VAE setting I can adjust to make this work on M5 processor and LTX 2.5 VAEs?
Thanks again for the great video model.
Same issue happening on M2 Ultra Mac Studio here with the 2.5 VAEs - will try the 2.3s
Found the exact cause β it's a hardcoded float64 in the VAE decoder's RoPE that MPS doesn't support.
In /comfy/ldm/lightricks/vae/na_diffusion_decoder.py, rope_inv_freqs() creates two tensors with dtype=torch.float64 directly on the device:
"""
def rope_inv_freqs(dim, base=10000.0, device=None):
exponents = torch.arange(0, dim, 2, dtype=torch.float64, device=device) / dim
return (1.0 / torch.pow(torch.tensor(float(base), dtype=torch.float64, device=device), exponents)).to(torch.float32)
"""
MPS has no float64 support at all, so both calls throw TypeError: Cannot convert a MPS Tensor to float64 dtype. Changing both to float32 fixes it with no visible quality loss (RoPE inverse-frequency math doesn't need double precision):
"""
def rope_inv_freqs(dim, base=10000.0, device=None):
exponents = torch.arange(0, dim, 2, dtype=torch.float32, device=device) / dim
return (1.0 / torch.pow(torch.tensor(float(base), dtype=torch.float32, device=device), exponents)).to(torch.float32)
"""
Confirmed working after patching this on an M5 β full quality video + audio VAE decode with no further errors. Thanks to Claude for helping me sort this, hopefully useful for others and can be fixed upstream at some point so others don't have to manually fix it. I honestly can't believe how fast this runs on M5 chip.
We passed this to the ComfyUI team and they already fixed the issue https://github.com/Comfy-Org/ComfyUI/commit/bd34f338ac505ea79e43968753968a464060e609.
Grab the latest ComfyUI version and you should be good to go.