Instructions to use Lightricks/LTX-2.5-Diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Lightricks/LTX-2.5-Diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Lightricks/LTX-2.5-Diffusers", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Add Prompt Enhancer and Processor
This PR adds prompt_enhancer and processor components to the Lightricks/LTX-2.5-Diffusers repo based on the google/gemma-4-E2B-it repo, following the diffusers docs. The changes can be tested by loading with the revision corresponding to this PR:
import torch
from diffusers import LTX2Pipeline
pipe = LTX2Pipeline.from_pretrained("Lightricks/LTX-2.5-Diffusers", revision="refs/pr/13", torch_dtype=torch.bfloat16)
...
or for the modular pipeline:
import torch
from diffusers import ComponentsManager, ModularPipeline
cm = ComponentsManager()
pipe = ModularPipeline.from_pretrained("Lightricks/LTX-2.5-Diffusers", components_manager=cm)
pipe.load_components(revision="refs/pr/13", dtype=torch.bfloat16)
...
Saving the modular pipeline with new prompt_enhancer and processor components using save_pretrained changes the modular_model_config.json config file with respect to main by adding library and class info for all components (not just the new ones). I don't think these changes should break anything; as far as I can tell, loading and performing inference on the revised checkpoint should work as expected.
Saving the modular pipeline with new prompt_enhancer and processor components using save_pretrained changes the modular_model_config.json config file with respect to main by adding library and class info for all components (not just the new ones). I don't think these changes should break anything; as far as I can tell, loading and performing inference on the revised checkpoint should work as expected.