TL;DR
This paper introduces a fully open-source pipeline for controlling image illumination using diffusion models. By creating a novel data engine that synthesizes training data from well-lit images, they enable diffusion models to perform text-guided relighting while preserving subject identity, outperforming existing methods significantly.
What Problem Does This Paper Address?
Achieving precise control over image lighting is crucial for creative image manipulation, but it's a complex task. While some closed-source models offer impressive relighting capabilities, they often lack transparency, reproducibility, and public access to their code and data. Existing open-source solutions either require cumbersome auxiliary inputs like depth maps or are not fully reproducible. This paper aims to bridge this gap by providing an accessible, reproducible, and effective method for learning illumination control within diffusion models.
Methods
The core of this work is a "data engine" designed to generate supervised training triplets for diffusion models. The process starts with a large collection of well-lit images, primarily from the FFHQ dataset.
- Illumination Filtering: CLIP is used to filter out images with poor lighting, ensuring a high-quality ground truth.
- Foreground Segmentation: SAM 3 is employed to isolate the subject from the background, preventing background interference.
- Albedo Extraction: A Retinex-based method (Multi-Scale Retinex) is used to extract a lighting-neutral albedo of the subject, removing existing illumination cues.
- Illumination Degradation: Synthetic lighting and shadows are applied to the albedo using a Lambertian shading model and procedural shadow patterns, creating a "poorly-lit" input image. This step is geometry-aware, using depth maps to simulate realistic shading.
- Instruction Generation: A multimodal vision-language model (Qwen3-VL) generates natural language descriptions of the target lighting conditions for each triplet.
These triplets (degraded input, lighting instruction, well-lit output) are then used to fine-tune a diffusion model (InstructPix2Pix architecture based on Stable Diffusion 1.5).
Datasets
- Training Data: Primarily derived from the Flickr-Faces-HQ (FFHQ) dataset. Approximately 12,000 well-lit images were selected and processed to create ~10,000 training triplets. Images were resized to 512x512 for training.
- Evaluation Data:
- A held-out test set of 1,000 images from FFHQ.
- A qualitative out-of-distribution test set of 64 images from the CelebA-HQ dataset, paired with diverse editing instructions.
Key Insights and Ideas
- Synthetic Supervision is Key: The paper demonstrates that carefully synthesized supervision signals can be as effective, if not more so, than real-world paired data for learning complex tasks like relighting. This circumvents the impracticality of collecting diverse real-world relighting datasets.
- Decomposition for Control: By separating the subject's albedo from its illumination and then applying synthetic degradations, the model learns to manipulate lighting independently of the subject's intrinsic appearance. This is crucial for preserving identity.
- Vision-Language Models for Instructions: Leveraging large multimodal models like Qwen3-VL to generate descriptive lighting instructions is an efficient way to create rich, text-based control signals for diffusion models.
- Identity Preservation is Achievable: The significant improvement in identity preservation highlights that generic diffusion models often struggle with this when performing edits. Task-specific supervision, as provided by their data engine, is essential for disentangling appearance from illumination.
Key Results
- Quantitative: The fine-tuned diffusion model significantly outperforms baselines (SD 1.5, SDXL, FLUX.1-dev) on perceptual similarity (LPIPS: 0.30 vs. 0.63-0.65), structural similarity (SSIM: 0.57 vs. 0.37-0.43), and identity preservation (Identity Score: 0.76 vs. 0.04-0.11). The identity preservation improvement is substantial, ranging from 7x to 17x.
- Qualitative: The model produces realistic relighting results that closely match the natural language instructions while maintaining facial identity. Baselines often fail to adhere to instructions or significantly alter the subject's appearance. The model also shows good generalization to out-of-distribution data (CelebA-HQ).
Limitations and Future Work
- Focus on Faces: The current pipeline is optimized for human faces due to the reliance on the FFHQ dataset. Extending the data engine to handle general scenes and diverse object categories is a key future direction.
- Diffusion Model Backbone: While they use SD 1.5 as a base, exploring more advanced diffusion model architectures could yield further improvements.
- Instruction Granularity: The authors suggest supporting more spatially localized or multi-light instructions for finer-grained control.
- Reproducibility: The paper emphasizes releasing their data engine, code, and model weights to facilitate reproducible research.
Summary updated