LightIt: Illumination Modeling and Control for Diffusion Models

Peter Kocsis, Julien Philip, Kalyan Sunkavalli, Matthias Nießner, Yannick Hold-GeoffroyCVPR 2024 · DOI

While text-to-image diffusion models have transformed creative workflows, they remain difficult to direct with precision. Achieving specific lighting effects, such as the exact placement of shadows or the direction of sunlight, often requires extensive prompt engineering that yields inconsistent results. Researchers from the Technical University of Munich and Adobe Research have addressed this limitation with LightIt, a framework that introduces explicit, physically-grounded illumination control to diffusion models.

The Challenge of Implicit Lighting

Current generative models lack direct "lighting handles." While tools like ControlNet provide guidance for geometry through depth maps or edges, lighting is typically treated as an implicit byproduct of the training data. This forces artists to rely on imprecise textual descriptions like "golden hour" or "cinematic lighting." The fundamental issue is that diffusion models do not explicitly model light transport—the physical interaction of light with surfaces to create shadows and highlights.

Methodology: Bridging Physics and Diffusion

The LightIt pipeline introduces a two-stage approach to incorporate physical lighting information without compromising the high-quality image priors of diffusion models.

The LightIt pipeline: Input lighting and surface normals are used to generate a direct shading map, which then guides the diffusion model to produce lighting-controlled images.

1. Shading Estimation Module

To provide the model with a clear lighting signal, the authors developed a lightweight module that predicts direct shading from a single image. Unlike simple 2D filters, this module predicts a 3D density field and employs volumetric ray-marching toward a specified light source. This process calculates where shadows should fall, generating "ground truth" shading maps that represent single-bounce illumination and cast shadows.

2. Lighting-Conditioned Diffusion

The framework utilizes a control network conditioned on these shading maps and surface normals. A key architectural innovation is the Residual Control Encoder/Decoder (RCE/RCD). Standard control networks can sometimes ignore control signals early in training; the RCE/RCD addresses this by adding a reconstruction loss, forcing the model to maintain the ability to reconstruct the shading map from its internal representations. This ensures the final image strictly adheres to the specified lighting.

Data and Evaluation

To train LightIt, the researchers curated a specialized dataset derived from the Outdoor Laval Dataset, which contains high-quality HDR panoramas. The resulting LightIt Dataset consists of 51,250 samples, each including an LDR image, a text prompt, estimated surface normals, and a shading map corresponding to the sun's position in the original panorama.

Key Insights and Results

A significant finding of the study is that complex global illumination is not necessary to guide a diffusion model effectively. Providing only direct shading and cast shadows provides sufficient "hints" for the model to synthesize photorealistic details. Furthermore, shading maps assist the model in understanding 3D structure better than normals alone, particularly in shadowed regions where normal maps may be noisy.

A high-quality image generated by LightIt, demonstrating realistic lighting and shadow placement consistent with the input control signals.

Performance Metrics

  • User Preference: In a user study, LightIt was preferred for lighting consistency by 95.57% of participants compared to standard Stable Diffusion.
  • Relighting Quality: Quantitatively, LightIt outperformed existing state-of-the-art relighting models (e.g., OutCast) in terms of PSNR (20.44 vs 19.79) and FID.
  • Zero-Shot Versatility: Despite being trained on outdoor data, the model generalizes well to diverse artistic styles, including impressionist paintings and low-resolution game aesthetics, while maintaining strict shadow control.

Conclusion

LightIt represents a significant step toward transforming diffusion models into professional-grade production tools. By providing explicit control over light direction and shadow placement, it allows lighting to become a deliberate creative choice rather than a stochastic outcome. Future work may expand this approach to handle complex indoor environments with multiple point lights and more intricate light transport.

Summary updated

BibTeX
@inproceedings{kocsis2024lightit,
  author = {Peter Kocsis and Julien Philip and Kalyan Sunkavalli and Matthias Nießner and Yannick Hold-Geoffroy},
  title = {{LightIt: Illumination Modeling and Control for Diffusion Models}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2024},
  doi = {10.1109/cvpr52733.2024.00894},
}
Figure