LightLab: Controlling Light Sources in Images with Diffusion Models
Nadav Magar, Amir Hertz, Eric Tabellion, Yael Pritch, Alex Rav-Acha, Ariel Shamir, Yedid Hoshen
TL;DR
LightLab tackles the challenge of enabling explicit, parametric relighting from a single image by fine-tuning a diffusion model on a compact set of real RAW image pairs augmented with large-scale synthetic renders. It leverages the linearity of light to synthesize paired data and defines a relit sequence $\mathbf{i}_{\text{relit}}(\alpha, \gamma, \mathbf{c}_{\text{t}}; \mathbf{i}_{\text{amb}}, \mathbf{i}_{\text{change}}) = \alpha \mathbf{i}_{\text{amb}} + \gamma \mathbf{i}_{\text{change}} \mathbf{c}$ with $\mathbf{c} = \mathbf{c}_{\text{t}} \odot \mathbf{c}_{\text{o}}^{-1}$ to control ambient, intensity, and color. A diffusion model is conditioned with spatial signals (input image, depth, and light-source masks) and global signals (ambient level and tone-mapping choice) to produce photorealistic relighting with plausible shadows and reflections. Empirical results show that a mixture of real and synthetic data yields the best generalization, and a user study favors LightLab over prior methods for precise, physically plausible lighting edits. The work demonstrates the practicality of physics-informed data generation combined with diffusion-based editing for controllable image illumination, with applications ranging from post-capture relighting to lighting-consistent animation.
Abstract
We present a simple, yet effective diffusion-based method for fine-grained, parametric control over light sources in an image. Existing relighting methods either rely on multiple input views to perform inverse rendering at inference time, or fail to provide explicit control over light changes. Our method fine-tunes a diffusion model on a small set of real raw photograph pairs, supplemented by synthetically rendered images at scale, to elicit its photorealistic prior for relighting. We leverage the linearity of light to synthesize image pairs depicting controlled light changes of either a target light source or ambient illumination. Using this data and an appropriate fine-tuning scheme, we train a model for precise illumination changes with explicit control over light intensity and color. Lastly, we show how our method can achieve compelling light editing results, and outperforms existing methods based on user preference.
