> ## Documentation Index
> Fetch the complete documentation index at: https://docs.m-star.org/llms.txt
> Use this file to discover all available pages before exploring further.

# LTX-2.5

> Generate an MP4 with synchronized stereo sound from a text prompt.

LTX-2.5 makes a video with synchronized 48 kHz stereo audio from a text prompt. The default recipe uses eight distilled denoising steps.

## Install and start

Accept the LTX-2.x Community License for the [gated checkpoint](https://huggingface.co/Lightricks/LTX-2.5-Diffusers). Put `ffmpeg` on the server’s path to mux audio and video. The video generation endpoint uses `ffprobe` to check a requested frame rate. The native API returns video and audio separately.

### `ltx2_5`

Text → video, audio. The default `ltx2_5.yaml` uses 2 GPUs. Beta. The [weights](https://huggingface.co/Lightricks/LTX-2.5-Diffusers) use LTX-2.x Community License.

```bash theme={null}
uv pip install --torch-backend=auto "mstar-ai[all]"
mstar serve ltx2_5
```

[Send the request](#generate-video).

## Send a request

Run either client example in a second terminal after `/health` returns 200.

### Generate a clip

The native response carries separate MP4 and PCM tracks. The SDK wraps PCM in a WAV file.

**Python SDK**

```python theme={null}
from pathlib import Path
from mstar import MStarClient

client = MStarClient("http://localhost:8000")
reply = client.generate(
    text='A train crosses a stone bridge in mountain fog.',
    output_modalities=('video', 'audio'),
    height=544,
    width=960,
    num_frames=121,
)
reply.audio.to_wav("reply.wav")
Path("clip.mp4").write_bytes(next(part["bytes"] for part in reply.raw if part["modality"] == "video"))
```

**curl**

```bash theme={null}
curl -fsS http://localhost:8000/generate \
  --form-string 'text=A train crosses a stone bridge in mountain fog.' \
  --form-string output_modalities=video,audio \
  --form-string streaming=false \
  --form-string 'model_kwargs={"height":544,"width":960,"num_frames":121}' \
  | python3 -c '
import base64, json, sys

outputs = json.load(sys.stdin)["outputs"]
with open("reply.pcm", "wb") as file:
    for chunk in outputs["audio"]:
        file.write(base64.b64decode(chunk["data"]))
with open("clip.mp4", "wb") as file:
    for chunk in outputs["video"]:
        file.write(base64.b64decode(chunk["data"]))
'
```

## Deployment configs

| File | GPUs | Parallelism | When to use |
| - | - | - | - |
| `configs/ltx2_5.yaml` | 2 | none | Default. The DiT alone on GPU 0; the text encoder and decoders on GPU 1, so one request's encode and decode overlap another's denoise. |
| `configs/ltx2_5_tp2.yaml` | 2 | `tp_size: 2` on the DiT | Captures both 544x960 and 1088x1920, so `two_stage` replays graphs in both stages. |
| `configs/ltx2_5_sp2.yaml` | 2 | `sp_size: 2` on the DiT | Each rank holds the whole DiT and half the video tokens. Captures 544x960 only. |

To use an alternative, pass `--config configs/<file>` after the launcher name. From a wheel installation, [copy the shipped YAML](https://docs.m-star.org/serving.md#custom-configs) and pass its local path.

## Settings and defaults

Choose the denoising `recipe` per request. Both recipes require `num_frames` of the form `8k + 1` and default to 121 frames at 24 fps.

| `recipe` | Default width × height | Denoising |
| - | - | - |
| `single` (default) | 960×544 | Eight steps at the requested size. Both dimensions must be multiples of 32. |
| `two_stage` | 1920×1088 | Eight steps at half width and height, then 2× latent upsampling and three steps at full size. Both output dimensions must be multiples of 64. |

Set the following deployment options under `model_kwargs` in the config.

| Knob | Default | Effect |
| - | - | - |
| `compile` | `true` | Compile the DiT. |
| `accelerator_graph` | `true` | Capture the denoise step for `capture_shapes` and `capture_batch_sizes`. |
| `capture_shapes` | `[[544, 960, 121, 24]]` | `[height, width, num_frames, fps]` shapes captured. Other shapes run compiled without a graph and pay a compile on first use. |
| `capture_batch_sizes` | `[1, 2]` | Batch sizes captured per shape. |
| `max_batch_size` | `4` | Requests per denoise step. |
| `vae_compile` | `false` | Compile the video VAE decoder for `vae_compile_shapes` (default: the capture shapes). The shipped configs turn it on; set `false` for bit-exact output. |
| `vae_tile_min_pixels` | `921600` (1280x720) | Frames larger than this area decode in tiles. |
| `max_video_tokens` | `65536` | Latent-token ceiling for one request. Larger requests are a 400. |
| `async_scheduling` | `true` | Build the next step while the current one runs. |

## Limits

* Input is text only. Image or video input returns HTTP 400. The native API can return audio, video or both.
* The full (non-distilled) transformer, image-to-video and the duration head are not ported.
* `backend: sdpa` on an attention resource that reads split keys is refused on SP ranks, so `ltx2_5_sp2.yaml` keeps the ragged resources.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.