Spaces:
Running on Zero
Download README.md from Lightricks/ltx2-relight-lora-demo: direct link, hf CLI and curl.
- Browser
- Download file 2.95 kB
-
https://huggingface.co/spaces/Lightricks/ltx2-relight-lora-demo/resolve/main/README.md
- Command line
-
hf download hf://spaces/Lightricks/ltx2-relight-lora-demo/README.md
-
curl -L -o README.md https://huggingface.co/spaces/Lightricks/ltx2-relight-lora-demo/resolve/main/README.md
A newer version of the Gradio SDK is available: 6.30.0
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 with the Relight IC-LoRA.
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:
- Sphere render β a pure-Python ray-tracer replicates the ComfyUI
SphereLightNodeThree.js scene (camera, unit sphere on a ground plane, directional light from the chosen azimuth/elevation/hardness). - 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.
- Conditioning β the composited clip is passed as a
VideoConditionByReferenceLatent(the IC-LoRA reference-latent stream), not as a first-frame image condition. - 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. - 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.