TL;DR
DreamLight is a unified diffusion-based framework for universal image relighting that seamlessly composites a subject into a new environment using either a target background image or a text prompt. By introducing a Position-Guided Light Adapter (PGLA) for realistic directional illumination and a Spectral Foreground Fixer (SFF) to preserve fine textures, DreamLight achieves highly harmonious relighting while avoiding the common pitfalls of color bleeding and identity distortion.
What Problem Does This Paper Address?
Image composition—inserting a foreground subject into a new background—is a core task in digital editing and virtual reality. However, creating a realistic composite requires the foreground subject's lighting and color tone to perfectly match the new environment.
Existing image relighting methods fall into two main traps:
- Expensive Physics-Based Priors: Many portrait relighting methods rely on complex pipelines that explicitly model surface normals and albedo maps, requiring costly training data captured in specialized light stages or relying on high-dynamic-range (HDR) environment maps that aren't available in real-world scenarios.
- Identity Distortion and Color Bleeding: Newer data-driven methods treat relighting as an image-to-image translation problem using generative diffusion models. While they produce decent harmonization, they often struggle with realistic light interactions, cause severe color bleeding, or distort fine details (like human faces or text) because the latent space of large pre-trained models tends to alter the subject's identity.
Furthermore, text-based relighting (e.g., "a portrait under strong afternoon light") remains heavily under-explored compared to image-based relighting. DreamLight addresses these challenges by offering a single, unified model capable of handling both image- and text-guided relighting without requiring external HDR maps.
Methods
DreamLight is built upon a pre-trained Stable Diffusion v1.5 architecture. The authors introduce two novel components to handle directional lighting and texture preservation:
1. Position-Guided Light Adapter (PGLA)
To capture how light interacts with a subject from different angles, PGLA extracts background features using a CLIP image encoder. It applies a low-frequency enhancement operation via Fourier Transform to filter out high-frequency texture noise, isolating the core illumination and color tones.
Crucially, instead of treating the background as a uniform light source, PGLA assumes light can be split into four primary directions: left, right, top, and down. It uses four sets of learnable query embeddings alongside a direction-biased masked attention mechanism. This applies spatial decay maps (e.g., left-to-right decay for left-side light) to ensure that different regions of the foreground object respond strongly and naturally to nearby light sources.
2. Spectral Foreground Fixer (SFF)
To solve the problem of foreground distortion and identity loss during the diffusion process, the authors propose SFF as a post-processing module. SFF uses a Wavelet Transform to split both the input subject and the initial relighted output into high-frequency components (structural details, sharp boundaries) and low-frequency components (rough colors and tones).
A self-supervised trained Modulator then takes the high-frequency details of the original input and the low-frequency lighting of the relighted output to dynamically predict calibration coefficients ($\alpha, \beta$). This adaptively recombines the features, ensuring the final image retains pristine subject details while adopting the new environment's lighting.
Datasets
To train DreamLight effectively, the authors constructed a diverse dataset totaling over 1 million image pairs from three distinct sources:
- LoRA Bootstrapping (600k pairs): An initial set of 100 high-quality time-lapse photography pairs was used to train a relighting OmniControl LoRA, which iteratively generated more training data in a bootstrapped loop.
- 3D Rendered Data (150k pairs): Using 3D assets from Objaverse, the authors built an automated rendering pipeline via Arnold Renderer to generate consistent images under randomized light sources and HDR maps.
- Synthetic Data Filtering (300k pairs): Vanilla images were processed using existing tools (like IC-Light) and filtered using aesthetic scoring models. Prompts were generated via a two-step GPT-4 and LLaVA pipeline.
Evaluation Benchmark: The authors created a dedicated evaluation benchmark consisting of 600 high-quality image pairs rendered from real objects using the Arnold Renderer.
Key Insights and Ideas
- Emergent Dual-Conditioning: Because the model unifies text and image conditions into a single training format, it exhibits an emergent ability to handle both simultaneously. For instance, it can take a background image and additionally modify it via a text prompt (e.g., adding "at night"), even though it wasn't explicitly trained for joint conditioning.
- Frequency-Domain Identity Preservation: Rather than forcing the diffusion model's latent space to perfectly preserve identity—which restricts its ability to modify colors and lighting—disentangling the problem into high- and low-frequency components via wavelets post-diffusion provides a robust, elegant fix for facial and textual distortions.
- Simplifying 3D Light to 2D Quadrants: Instead of requiring full 3D environment maps, mapping 2D background images into four directional quadrants with spatial decay maps is highly effective for generating realistic 2D light interactions.
Key Results
Image-Based Relighting
DreamLight significantly outperforms state-of-the-art image harmonization and relighting methods (including INR, PCT, and IC-Light) across standard metrics on the rendered benchmark:
- PSNR: Achieved 22.15 (compared to IC-Light's 20.27).
- LPIPS: Reduced perceptual error to 0.158 (compared to IC-Light's 0.181).
- CLIP-IS: Improved image similarity to 0.908.
Text-Based Relighting
When evaluated against prompt-guided inpainting methods like PowerPaint and BrushNet, DreamLight scored higher across text-vision compatibility and human preference metrics:
- Image Reward (IR) Score: Reached 3.47, substantially higher than IC-Light (2.25) and BrushNet (1.96), demonstrating a clear preference for its realistic lighting adjustments over simple background replacement.
Limitations and Future Work
The authors do not explicitly detail failure modes in the text, but the framework inherits standard limitations common to diffusion models based on Stable Diffusion v1.5, such as operating at a native $512 \times 512$ resolution. Additionally, while the model's ability to combine text and image prompts simultaneously is a powerful emergent property, it is not explicitly optimized during training. Future work could focus on scaling the architecture to higher native resolutions and deliberately training the network to leverage joint text-image environmental controls.
Summary updated