--- title: LTX-2.3 Relight (Video Relighting IC-LoRA) emoji: 💡 colorFrom: blue colorTo: yellow sdk: gradio sdk_version: 5.49.1 app_file: app.py pinned: false short_description: Relight exterior video clips with a light-direction ball python_version: "3.10" startup_duration_timeout: 3h models: - Lightricks/LTX-2.3 - Lightricks/LTX-2.3-22b-IC-LoRA-Relight --- # LTX-2.3 Relight — Video Relighting with a Light-Direction Ball Relight any exterior video clip by choosing a **light direction** (azimuth / elevation / hardness) and a **lighting look** (12 trained styles, e.g. "hard directional sunlight", "warm golden low front sun"). The demo renders a light-direction sphere, composites it into the top-right corner of every frame, and feeds the result as in-context conditioning to [LTX-2.3-22B](https://huggingface.co/Lightricks/LTX-2.3) with the [Relight IC-LoRA](https://huggingface.co/Lightricks/LTX-2.3-22b-IC-LoRA-Relight). ## How it works This Space is a faithful port of the author's ComfyUI single-stage distilled V2V IC-LoRA workflow (`LTX-2.3_Relight_ICLoRA_SingleStage_Distilled.json`) to the official `ltx_pipelines` / `ltx_core` Python packages: 1. **Sphere render** — a pure-Python ray-tracer replicates the ComfyUI `SphereLightNode` Three.js scene (camera, unit sphere on a ground plane, directional light from the chosen azimuth/elevation/hardness). 2. **Composite** — the rendered sphere is resized to 143×143 px and composited into the top-right corner (22 px margin) of every frame, which is then scaled to 1280×704 and re-encoded at 24 fps. 3. **Conditioning** — the composited clip is passed as a `VideoConditionByReferenceLatent` (the IC-LoRA reference-latent stream), not as a first-frame image condition. 4. **Denoise** — a single distilled diffusion stage (`ICLoraPipeline`, `skip_stage_2=True`, 8-step distilled sigma schedule) denoises a fresh video latent guided by the reference and the text prompt. 5. **Decode** — the video latent is decoded with the video VAE; the output is a relit version of the source clip. The 22B transformer is loaded with FP8 casting to fit the ZeroGPU memory budget. > First launch downloads ~70 GB of weights (LTX-2.3 distilled checkpoint + > Gemma-3-12B text encoder), so the initial boot is slow; subsequent runs use > the cache. ## Tips - **The sphere drives the light direction.** The model was trained to steer lighting based on the rendered ball in the top-right corner — without it, the model will not relight. - **The lighting look is in the prompt.** Each of the 12 trained looks (e.g. "hard directional sunlight", "warm golden low front sun") is combined with the trigger phrase `relight the video to match the light-direction ball.` to form the text prompt. - **Exterior clips work best.** The LoRA was trained on exterior scenes. - **Keep clips short** (3–5 seconds). Longer clips need more VRAM and time.