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
+
license_name: ltx-2-community-license-agreement
|
| 15 |
+
license_link: https://github.com/Lightricks/LTX-2/blob/main/LICENSE
|
| 16 |
+
pipeline_tag: image-to-video
|
| 17 |
+
arxiv: 2601.03233
|
| 18 |
+
tags:
|
| 19 |
+
- image-to-video
|
| 20 |
+
- text-to-video
|
| 21 |
+
- video-to-video
|
| 22 |
+
- image-text-to-video
|
| 23 |
+
- audio-to-video
|
| 24 |
+
- text-to-audio
|
| 25 |
+
- video-to-audio
|
| 26 |
+
- audio-to-audio
|
| 27 |
+
- text-to-audio-video
|
| 28 |
+
- image-to-audio-video
|
| 29 |
+
- image-text-to-audio-video
|
| 30 |
+
- ltx-2
|
| 31 |
+
- ltx-video
|
| 32 |
+
- ltxv
|
| 33 |
+
- lightricks
|
| 34 |
+
- mlx
|
| 35 |
+
pinned: true
|
| 36 |
+
---
|
| 37 |
+
|
| 38 |
+
# mlx-community/LTX-2-dev-bf16
|
| 39 |
+
|
| 40 |
+
This model was converted to MLX format from [`Lightricks/LTX-2`](https://huggingface.co/Lightricks/LTX-2) using mlx-video version **0.0.1**.
|
| 41 |
+
|
| 42 |
+
Refer to the [original model card](https://huggingface.co/Lightricks/LTX-2) for more details on the model.
|
| 43 |
+
|
| 44 |
+
## Use with mlx-video
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
## Installation
|
| 48 |
+
|
| 49 |
+
Install from source:
|
| 50 |
+
|
| 51 |
+
### Option 1: Install with pip (requires git):
|
| 52 |
+
```bash
|
| 53 |
+
pip install git+https://github.com/Blaizzy/mlx-video.git
|
| 54 |
+
```
|
| 55 |
+
|
| 56 |
+
### Option 2: Install with uv (ultra-fast package manager, optional):
|
| 57 |
+
```bash
|
| 58 |
+
uv pip install git+https://github.com/Blaizzy/mlx-video.git
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
## Quick Start
|
| 63 |
+
|
| 64 |
+
### Text-to-Video (T2V) Generation
|
| 65 |
+
|
| 66 |
+
```bash
|
| 67 |
+
python -m mlx_video.generate_dev \
|
| 68 |
+
--prompt "Two dogs of the poodle breed wearing sunglasses, close up, cinematic, sunset" \
|
| 69 |
+
--num-frames 100 \
|
| 70 |
+
--width 768 \
|
| 71 |
+
--model-repo mlx-community/LTX-2-dev-bf16
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
## Image-to-Video (I2V) Conditioning
|
| 76 |
+
|
| 77 |
+
Condition video generation on an input image:
|
| 78 |
+
|
| 79 |
+
```bash
|
| 80 |
+
# First frame conditioning
|
| 81 |
+
python -m mlx_video.generate_dev \
|
| 82 |
+
--prompt "A cat walking across a sunny garden" \
|
| 83 |
+
--image cat.jpg \
|
| 84 |
+
--image-strength 1.0 \
|
| 85 |
+
--image-frame-idx 0 \
|
| 86 |
+
--model-repo mlx-community/LTX-2-dev-bf16
|
| 87 |
+
```
|
| 88 |
+
```bash
|
| 89 |
+
# Middle frame conditioning
|
| 90 |
+
python -m mlx_video.generate_dev \
|
| 91 |
+
--prompt "A person turning around" \
|
| 92 |
+
--image person.jpg \
|
| 93 |
+
--image-frame-idx 16 \
|
| 94 |
+
--num-frames 33 \
|
| 95 |
+
--model-repo mlx-community/LTX-2-dev-bf16
|
| 96 |
+
```
|
| 97 |
+
|
| 98 |
+
## Audio-Video Generation
|
| 99 |
+
|
| 100 |
+
Generates synchronized video and audio.
|
| 101 |
+
|
| 102 |
+
```bash
|
| 103 |
+
python -m mlx_video.generate_dev \
|
| 104 |
+
--prompt "Ocean waves crashing on rocks, seagulls calling" \
|
| 105 |
+
--height 512 \
|
| 106 |
+
--width 512 \
|
| 107 |
+
--num-frames 65 \
|
| 108 |
+
--output-path output_av.mp4 \
|
| 109 |
+
--output-audio output.wav \
|
| 110 |
+
--model-repo mlx-community/LTX-2-dev-bf16
|
| 111 |
+
```
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
## Python API
|
| 115 |
+
|
| 116 |
+
### Basic Video Generation
|
| 117 |
+
|
| 118 |
+
```python
|
| 119 |
+
from mlx_video.generate_dev import generate_video_dev
|
| 120 |
+
|
| 121 |
+
# Generate a video
|
| 122 |
+
generate_video_dev(
|
| 123 |
+
model_repo="mlx-community/LTX-2-dev-bf16",
|
| 124 |
+
prompt="A beautiful sunset over the ocean",
|
| 125 |
+
height=512,
|
| 126 |
+
width=768,
|
| 127 |
+
num_frames=65,
|
| 128 |
+
seed=42,
|
| 129 |
+
fps=24,
|
| 130 |
+
output_path="output.mp4",
|
| 131 |
+
)
|
| 132 |
+
```
|