TokenLight: Precise Lighting Control in Images using Attribute Tokens

Sumit Chaturvedi, Yannick Hold-Geoffroy, Mengwei Ren, Jingyuan Liu, He Zhang, Yiqun Mei, Julie Dorsey, Zhixin Shu

TL;DR

TokenLight is a diffusion-based image relighting framework that introduces physically meaningful "attribute tokens" to achieve precise, continuous control over illumination factors like intensity, color, 3D position, and diffuseness. Operating directly in the 2D image domain, it bypasses the need for explicit 3D reconstruction while producing highly realistic, geometry-aware lighting edits.

What Problem Does This Paper Address?

Controlling the lighting in an already-captured photograph is a notoriously difficult problem in computer vision and graphics. Existing methods generally fall into three categories, each with distinct trade-offs:

  1. Text-driven relighting: Intuitive but highly imprecise and unpredictable.
  2. Environment maps: Excellent at capturing distant, global illumination but incapable of modeling near-field or localized lighting effects (e.g., placing a light source right next to an object).
  3. Inverse rendering: Attempts to decompose the image into 3D geometry and material properties. While physically grounded, these pipelines frequently fail when encountering complex geometries (like hair or fur), occlusions, or semi-transparent materials.

TokenLight addresses this gap by creating a unified representation that bridges the intuitive flexibility of 3D lighting tools with the accessibility of 2D image editing, allowing for localized, fine-grained adjustments without explicit 3D reconstruction.

Methods

The authors formulate relighting as an end-to-end conditional image generation task using a latent diffusion transformer. Instead of relying on text prompts, the model is conditioned on the input image and a set of attribute tokens that explicitly encode physical lighting changes ($\Delta L$):

  • Global ambient scaling ($a$): Adjusts overall background illumination intensity.
  • Global diffuse-level ($d_g$): Controls shadow softness and highlight roll-off.
  • Additional light sources ($\Delta L_{add}$): Adds virtual point lights defined by 3D coordinates, color, intensity, and a per-light diffuse control.
  • In-scene light sources ($\Delta L_{in}$): Controls existing fixtures using a 2D spatial mask, color, intensity, and a binary on/off toggle.
Architecture overview of TokenLight showing how image and lighting attribute tokens are concatenated and processed by a Diffusion Transformer.

To handle 3D coordinates without a pre-existing 3D model of the scene, TokenLight defines a camera-relative reference volume, making the coordinate system entirely scene-agnostic. Scalar attributes are mapped using Gaussian Fourier features, while vector attributes (like 3D position and color) are flattened into a uniform token sequence. The entire sequence is processed jointly via full self-attention within the diffusion transformer, which is trained using a flow-matching objective.

Datasets

Because training such a model requires precise ground-truth lighting annotations that are exceptionally difficult to capture in the real world, the authors constructed a large-scale hybrid dataset:

  • Synthetic Data: Procedural scenes built from a subset of Objaverse and 3D human models, rendered using Blender’s Cycles path tracer. This dataset features 64 sampled point-light positions and ~600 HDRis from PolyHaven.
  • In-Scene Lighting Data: 83 artist-authored indoor scenes with annotated visible fixtures, generating roughly 100,000 images.
  • Real-World Data: Approximately 600 real indoor photographs with controlled on/off lighting changes to enhance cross-domain realism.
  • VisibleFixture-60: A newly introduced real-world evaluation benchmark consisting of 60 captured on/off image pairs with corresponding light fixture masks.

Key Insights and Ideas

  • Emergent Geometric Reasoning: Despite receiving no explicit inverse rendering or 3D geometry supervision during training, TokenLight inherently learns how light interacts with complex shapes, occlusions, and materials. It successfully handles traditionally challenging scenarios, such as casting plausible shadows through transparent glass or placing a virtual light inside a hollow object (like a jack-o'-lantern).
  • Unified Token Space: Concatenating lighting attributes as tokens alongside image patches allows the transformer architecture to reason about spatial content and physical illumination changes simultaneously.
  • Disentangled Control: The tokenized parameterization ensures that modifying one attribute (e.g., changing the color of a specific lamp) does not inadvertently alter other unrelated lighting factors or scene details.

Key Results

TokenLight achieves state-of-the-art quantitative and qualitative performance across multiple tasks:

  • Synthetic Benchmarks: When evaluated against environment-map-based baselines on point-light targets, TokenLight achieves a PSNR of 21.97, drastically outperforming Neural Gaffer (16.76) and DiffusionRenderer (13.53).
  • Real-World Benchmarks: On the VisibleFixture-60 dataset, TokenLight achieves a PSNR of 20.08 (compared to ScribbleLight's 14.64), demonstrating highly accurate shadow removal and reflection generation when toggling fixtures.
Qualitative results on the VisibleFixture-60 dataset demonstrating accurate reflection and shadow control when toggling in-scene lights.
  • User Study: In a perceptual user study on spatial lighting control, TokenLight's relighting quality was preferred over GenLit 77.5% of the time and over Careaga et al. 89.2% of the time.

Limitations and Future Work

Not discussed in detail in the main text (the authors defer the comprehensive discussion of limitations and future work to the supplementary material).

Summary updated

BibTeX
@inproceedings{chaturvedi2026tokenlight,
  author = {Sumit Chaturvedi and Yannick Hold-Geoffroy and Mengwei Ren and Jingyuan Liu and He Zhang and Yiqun Mei and Julie Dorsey and Zhixin Shu},
  title = {{TokenLight: Precise Lighting Control in Images using Attribute Tokens}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=5xaPlRVViF},
}
Figure