--- title: LTX-2.3 Turbo emoji: ⚡ colorFrom: purple colorTo: blue sdk: gradio sdk_version: 5.23.0 python_version: '3.12' app_file: app.py pinned: false license: other license_name: ltx-2-community-license-agreement license_link: https://github.com/Lightricks/LTX-2/blob/main/LICENSE short_description: LTX-2.3 video+audio generation on free ZeroGPU --- # LTX-2.3 Turbo (ZeroGPU) Generate synchronized **video + audio** from text or images using [Lightricks/LTX-2.3](https://huggingface.co/Lightricks/LTX-2.3) — a 22B parameter DiT-based audio-video foundation model — running on **free ZeroGPU** hardware. ## How it works This Space uses a **vendored packages + pre-loaded models** strategy (inspired by [alexnasa/ltx-2-TURBO](https://huggingface.co/spaces/alexnasa/ltx-2-TURBO)) to run the massive 22B model on ZeroGPU: 1. **Startup**: Downloads model files, constructs `ModelLedger`, loads the Gemma-3 12B text encoder, and pre-loads the FP8-quantized transformer + video encoder into the pipeline cache. 2. **Text Encoding** (`@spaces.GPU`): Uses the pre-loaded text encoder to encode the prompt into video/audio context tensors, returned to CPU. 3. **Video Generation** (`@spaces.GPU`): Runs the two-stage distilled denoising pipeline (8 steps low-res + 4 steps high-res with 2x spatial upscaling) using pre-encoded contexts, then decodes video and audio. ### Key optimizations for ZeroGPU - **Vendored packages**: `ltx-core` and `ltx-pipelines` are vendored directly in the repo for faster builds and customized ZeroGPU compatibility. - **FP8 quantization**: Transformer weights are cast to `float8_e4m3fn`, halving VRAM usage with minimal quality impact. - **Pre-loaded models**: Text encoder, transformer, and video encoder are loaded once at startup and kept in memory across requests. - **Distilled pipeline**: Only 8+4 denoising steps (vs 30+ for the full model), dramatically reducing inference time. ## Parameters | Parameter | Range | Default | Notes | |-----------|-------|---------|-------| | Mode | Text to Video / Image to Video | Text to Video | | | Prompt | Free text | — | Describe scene, motion, and audio | | Resolution | 768x512, 512x512, 512x768 | 768x512 | Upscaled 2x by spatial upscaler | | Duration | 1–5 seconds | 2s | Shorter = more reliable on ZeroGPU | | Enhance prompt | On/Off | On | Uses Gemma to enhance the prompt | | Seed | 0–2^31 | Random | For reproducibility | ## Limitations - **ZeroGPU time limits**: Longer videos may exceed the GPU lease duration. Keep duration at 3 seconds or less for best reliability. - **VRAM constraints**: Even with FP8 quantization, very high resolutions are not possible. The preset resolutions are tuned for ZeroGPU. - **No audio conditioning**: This simplified interface doesn't support custom audio input (the full model does). ## Credits - Model: [Lightricks/LTX-2.3](https://huggingface.co/Lightricks/LTX-2.3) - Codebase: [Lightricks/LTX-2](https://github.com/Lightricks/LTX-2) - ZeroGPU architecture inspired by [alexnasa/ltx-2-TURBO](https://huggingface.co/spaces/alexnasa/ltx-2-TURBO)