Instructions to use Lightricks/LTX-Video with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Lightricks/LTX-Video with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image, export_to_video # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Lightricks/LTX-Video", dtype=torch.bfloat16, device_map="cuda") pipe.to("cuda") prompt = "A man with short gray hair plays a red electric guitar." image = load_image( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/guitar-man.png" ) output = pipe(image=image, prompt=prompt).frames[0] export_to_video(output, "output.mp4") - Inference
- Notebooks
- Google Colab
- Kaggle
Critical Compatibility Fix for LTX Video Nodes on ComfyUI v0.6.0
Issue: The current ComfyUI-LTXVideo node (latest commit) fails to load on ComfyUI v0.6.0 due to deprecated imports. The node attempts to import apply_rotary_emb from comfy.ldm.lightricks.model. This file path is no longer valid or accessible in the new ComfyUI core structure, causing a persistent ImportError and preventing the node from initializing.
The Fix: I restored functionality by manually editing custom_nodes/ComfyUI-LTXVideo/tricks/modules/ltx_model.py to redirect imports to the standard diffusers library and explicitly define missing base classes.
File: tricks/modules/ltx_model.py
Change: I replaced the failing local import block (approx. lines 6-10) with the following explicit imports:
Replaced 'from comfy.ldm.lightricks.model import ...' (line 6) with:
from diffusers.models.embeddings import apply_rotary_emb
from diffusers.models.transformers.transformer_2d import BasicTransformerBlock
from comfy.ldm.lightricks.model import LTXVModel
Environment Tested:
- ComfyUI Core: v0.6.0
- Frontend: v1.36.9
- OS: Linux (Pop!_OS)
Hope this helps!!