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
Update model names in config
#38
by a-r-r-o-w - opened
- model_index.json +2 -2
- transformer/config.json +1 -1
- vae/config.json +1 -1
model_index.json
CHANGED
|
@@ -15,10 +15,10 @@
|
|
| 15 |
],
|
| 16 |
"transformer": [
|
| 17 |
"diffusers",
|
| 18 |
-
"
|
| 19 |
],
|
| 20 |
"vae": [
|
| 21 |
"diffusers",
|
| 22 |
-
"
|
| 23 |
]
|
| 24 |
}
|
|
|
|
| 15 |
],
|
| 16 |
"transformer": [
|
| 17 |
"diffusers",
|
| 18 |
+
"LTXVideoTransformer3DModel"
|
| 19 |
],
|
| 20 |
"vae": [
|
| 21 |
"diffusers",
|
| 22 |
+
"AutoencoderKLLTXVideo"
|
| 23 |
]
|
| 24 |
}
|
transformer/config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_class_name": "
|
| 3 |
"_diffusers_version": "0.32.0.dev0",
|
| 4 |
"activation_fn": "gelu-approximate",
|
| 5 |
"attention_bias": true,
|
|
|
|
| 1 |
{
|
| 2 |
+
"_class_name": "LTXVideoTransformer3DModel",
|
| 3 |
"_diffusers_version": "0.32.0.dev0",
|
| 4 |
"activation_fn": "gelu-approximate",
|
| 5 |
"attention_bias": true,
|
vae/config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_class_name": "
|
| 3 |
"_diffusers_version": "0.32.0.dev0",
|
| 4 |
"block_out_channels": [
|
| 5 |
128,
|
|
|
|
| 1 |
{
|
| 2 |
+
"_class_name": "AutoencoderKLLTXVideo",
|
| 3 |
"_diffusers_version": "0.32.0.dev0",
|
| 4 |
"block_out_channels": [
|
| 5 |
128,
|