Spaces:
Running on Zero
Running on Zero
File size: 2,760 Bytes
8d2a699 ee2e0d2 3c49438 8d2a699 3c49438 8d2a699 3c49438 8d2a699 3c49438 ee2e0d2 3c49438 8d2a699 3c49438 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | ---
title: LTX-2.5
emoji: ⚗️
colorFrom: green
colorTo: blue
sdk: gradio
sdk_version: 6.13.0
app_file: app.py
python_version: "3.12"
pinned: false
private: true
short_description: LTX-2.5 distilled two-stage
models:
- Lightricks/LTX-2.5-Diffusers
---
# LTX-2.5 · distilled two-stage · **diffusers**
LTX-2.5 distilled, run end to end through **upstream `diffusers`** (merged in
[PR #14447](https://github.com/huggingface/diffusers/pull/14447); this Space pins the merge commit).
The recipe follows the code snippets on
[`Lightricks/LTX-2.5-Diffusers`](https://huggingface.co/Lightricks/LTX-2.5-Diffusers), which are the
source of truth for this demo.
## What it runs
| | |
|---|---|
| **Weights** | [`Lightricks/LTX-2.5-Diffusers`](https://huggingface.co/Lightricks/LTX-2.5-Diffusers) — LTX-2.5 distilled in diffusers format. `transformer/` is the distilled DiT (`transformer_full/` in the same repo is SFT and excluded from the snapshot). Override with the `LTX25_MODEL_ID` variable |
| **Code** | `diffusers` main @ `7564fb01` (the PR #14447 merge commit). Not a PyPI release |
| **Video decoder** | conv VAE decoder by default; switchable to LTX-2.5's own diffusion decoder (`LTX2VideoDiffusionDecodePipeline` + the Hub-fetched NATTEN kernel, tiled) |
| **Upsampler** | `ltx-2.3-spatial-upscaler-x2-1.1`, in the model repo's `latent_upsampler/` subfolder |
| **Prompt enhancer** | the shared [`LTX-2.4-Prompt-Enhancer`](https://huggingface.co/spaces/diffusers-internal-dev/LTX-2.4-Prompt-Enhancer) Space over `gradio_client`, keeping the 12B enhancer off this Space's memory budget |
## The recipe
Two-stage distilled generation, exactly as on the model card:
1. **Stage 1** — `LTX2Pipeline` at **half** the target resolution, 8 steps on
`DISTILLED_SIGMA_VALUES`, unguided, `output_type="latent"`.
2. **Upsample** — `LTX2LatentUpsamplePipeline`, ×2 spatial, no temporal.
3. **Stage 2** — 3 steps on `STAGE_2_DISTILLED_SIGMA_VALUES`, seeded from the upsampled video latent
*and* the stage-1 audio latent at `noise_scale = STAGE_2_DISTILLED_SIGMA_VALUES[0]`; size taken
from the latents.
4. **Decode** — conv VAE (tiled) by default, or `LTX2VideoDiffusionDecodePipeline(denormalize=False)`
plus a by-hand `audio_vae` + `vocoder` audio finish.
Unguided throughout (`guidance_scale = audio_guidance_scale = 1.0`): distillation folds guidance into
the weights. One `torch.Generator` threads through both stages so stage 2 continues the noise stream.
Image conditioning is center-cropped to the target aspect (smaller side 832) and re-compressed by the
pipeline's built-in `image_crf` (18 for LTX-2.5). Auto length uses the merged `num_frames=None` +
`max_seconds` duration-head API, capped at 15 s for ZeroGPU quota reasons.
|