Image-to-Video
Diffusers
Diffusion Single File
LTX-2
text-to-video
video-to-video
image-text-to-video
audio-to-video
text-to-audio
video-to-audio
audio-to-audio
text-to-audio-video
image-to-audio-video
image-text-to-audio-video
ltx-video
lightricks
comfyui
ltx-2.5
Instructions to use tiny-random/ltx-2-5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use tiny-random/ltx-2-5 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("tiny-random/ltx-2-5", 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") - Diffusion Single File
How to use tiny-random/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 tiny-random/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 tiny-random/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
Download config.json from tiny-random/ltx-2-5: direct link, hf CLI and curl.
- Browser
- Download file 2.61 kB
-
https://huggingface.co/tiny-random/ltx-2-5/resolve/main/config.json
- Command line
-
hf download hf://tiny-random/ltx-2-5/config.json
-
curl -L -o config.json https://huggingface.co/tiny-random/ltx-2-5/resolve/main/config.json
2.61 kB
| { | |
| "transformer": { | |
| "in_channels": 128, | |
| "out_channels": 128, | |
| "audio_in_channels": 8, | |
| "audio_out_channels": 8, | |
| "num_layers": 4, | |
| "num_attention_heads": 2, | |
| "attention_head_dim": 32, | |
| "audio_num_attention_heads": 2, | |
| "audio_attention_head_dim": 32, | |
| "cross_attention_dim": 64, | |
| "audio_cross_attention_dim": 64, | |
| "caption_channels": 8, | |
| "use_prompt_embeddings": false, | |
| "cross_attn_mod": true, | |
| "audio_cross_attn_mod": true, | |
| "use_prompt_adaln_single": false, | |
| "use_keyframes_abs_pos_embedding": true | |
| }, | |
| "connectors": { | |
| "caption_channels": 8, | |
| "text_proj_in_factor": 3, | |
| "video_connector_num_attention_heads": 2, | |
| "video_connector_attention_head_dim": 32, | |
| "video_connector_num_layers": 2, | |
| "video_connector_num_learnable_registers": 4, | |
| "audio_connector_num_attention_heads": 2, | |
| "audio_connector_attention_head_dim": 32, | |
| "audio_connector_num_layers": 2, | |
| "audio_connector_num_learnable_registers": 4, | |
| "video_hidden_dim": 64, | |
| "audio_hidden_dim": 64, | |
| "per_modality_projections": true | |
| }, | |
| "vae": { | |
| "in_channels": 3, | |
| "out_channels": 3, | |
| "latent_channels": 128, | |
| "block_out_channels": [ | |
| 16, | |
| 32 | |
| ], | |
| "decoder_block_out_channels": [ | |
| 16 | |
| ], | |
| "layers_per_block": [ | |
| 1, | |
| 1, | |
| 1 | |
| ], | |
| "decoder_layers_per_block": [ | |
| 1, | |
| 1 | |
| ], | |
| "spatio_temporal_scaling": [ | |
| true, | |
| true | |
| ], | |
| "decoder_spatio_temporal_scaling": [ | |
| true | |
| ], | |
| "downsample_type": [ | |
| "spatiotemporal", | |
| "spatiotemporal" | |
| ], | |
| "upsample_type": [ | |
| "spatiotemporal" | |
| ], | |
| "upsample_residual": [ | |
| true | |
| ], | |
| "upsample_factor": [ | |
| 2 | |
| ], | |
| "patch_size": 4, | |
| "patch_size_t": 1 | |
| }, | |
| "audio_vae": { | |
| "base_channels": 8, | |
| "output_channels": 2, | |
| "ch_mult": [ | |
| 1, | |
| 2 | |
| ], | |
| "num_res_blocks": 1, | |
| "in_channels": 2, | |
| "resolution": 64, | |
| "latent_channels": 8, | |
| "mel_bins": 4 | |
| }, | |
| "vocoder": { | |
| "in_channels": 8, | |
| "hidden_channels": 32, | |
| "out_channels": 2, | |
| "upsample_kernel_sizes": [ | |
| 8, | |
| 8 | |
| ], | |
| "upsample_factors": [ | |
| 4, | |
| 4 | |
| ], | |
| "resnet_kernel_sizes": [ | |
| 3 | |
| ], | |
| "resnet_dilations": [ | |
| [ | |
| 1, | |
| 1, | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "text_encoder": { | |
| "vocab_size": 262144, | |
| "hidden_size": 8, | |
| "intermediate_size": 16, | |
| "num_hidden_layers": 2, | |
| "num_attention_heads": 1, | |
| "num_key_value_heads": 1, | |
| "head_dim": 32, | |
| "max_position_embeddings": 4096, | |
| "tie_word_embeddings": true | |
| } | |
| } | |