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
image-to-video OSError
I ran the sample from https://huggingface.co/Lightricks/LTX-Video#for-image-to-video as is but it failed with OSError: Cannot load model Lightricks/LTX-Video-0.9.8-dev: model is not cached locally and an error occurred while trying to fetch metadata from the Hub. Please check out the root cause in the stacktrace above. Should I download something manually?
Hi, thanks for flagging this! The reason you’re seeing that error is because there’s no model called Lightricks/LTX-Video-0.9.8-dev on the Hub. Instead, you can use either:
• Lightricks/LTX-Video-0.9.7-dev
• Lightricks/LTX-Video-0.9.8-13B-distilled
Switching to one of these should resolve the issue.
If you run into any more trouble, let us know - we’re here to help.
Works after applying similar change to LTXLatentUpsamplePipeline.from_pretrained() as well. Thank you. You may want to update the README so I'll leave the discussion opened.