DreamLight: Towards Harmonious and Consistent Image Relighting

Yong Liu, Wenpeng Xiao, Qianqian Wang, Junlin Chen, Shiyin Wang, Yitong Wang, Xinglong Wu, Yansong Tang

Introduction

Image composition—the process of integrating a subject from one photograph into a new background—is a fundamental task in digital media editing. Despite the advancements in generative AI, achieving a seamless blend remains a significant challenge. The primary obstacle is the "universal image relighting" problem: ensuring that the lighting, shadows, and color tones of the subject naturally match the new environment. When these elements are mismatched, the composite image appears disjointed and unrealistic.

DreamLight introduces a unified diffusion-based framework designed to bridge this gap. By leveraging a position-aware light adapter and a spectral post-processing module, DreamLight enables harmonious relighting that preserves the subject's identity and intricate textures, whether the target environment is provided as an image or described via text.

The Limitations of Current Approaches

Existing relighting solutions generally fall into two categories, each with distinct drawbacks:

  1. Physics-based Methods: These techniques attempt to decompose images into intrinsic components like surface normals and albedo maps. While theoretically accurate, they often require specialized, high-dynamic-range (HDR) environment maps and expensive data that are difficult to acquire for diverse real-world scenarios.
  2. Generative Diffusion Models: While capable of producing highly realistic imagery, these models frequently suffer from "color bleeding"—where background colors unnaturally spill onto the subject—and "subject distortion," where the model alters the subject's fundamental features (such as facial identity) during the relighting process.

Furthermore, most existing models are specialized for either image-based or text-based relighting, rarely providing a unified architecture that handles both effectively.

Methodology: The DreamLight Framework

DreamLight is built upon the Stable Diffusion v1.5 architecture, enhanced by two novel components designed to manage the spatial and structural nuances of light.

Position-Guided Light Adapter (PGLA)

Standard diffusion models often treat background information as a global context, failing to account for the directional nature of light. The PGLA addresses this by initializing four sets of "light query embeddings" corresponding to the cardinal directions: left, right, top, and down. Using direction-biased masked attention, the model learns to inject light information from specific spatial regions of the background into the corresponding areas of the foreground subject. For instance, if a background features a bright light source on the right, the PGLA ensures the right side of the subject receives the appropriate highlights and warmth.

Spectral Foreground Fixer (SFF)

To combat the "hallucination" of details that often leads to identity loss in diffusion models, DreamLight employs the Spectral Foreground Fixer. This post-processing module utilizes the Wavelet Transform to decompose the image into high-frequency components (representing sharp textures and edges) and low-frequency components (representing broad colors and lighting). The SFF calibrates the original subject’s high-frequency details onto the newly relighted low-frequency base. This ensures that while the lighting environment changes, the subject's skin texture, fine features, and overall identity remain consistent with the source image.

Data and Training

The effectiveness of DreamLight is supported by a massive, curated dataset of approximately 1.05 million image pairs derived from three sources:

  • Bootstrapped Data (600k): Generated by training a specialized relighting LoRA on high-quality studio and time-lapse photography to synthesize diverse training pairs.
  • 3D Rendered Data (150k): Created using 3D assets and the Arnold Renderer to provide ground-truth consistency across varying light sources.
  • Filtered Synthetic Data (300k): High-quality outputs from existing models, filtered by aesthetic scores to ensure data quality.

Key Results and Insights

DreamLight demonstrates superior performance over previous state-of-the-art models, such as IC-Light, across both quantitative and qualitative benchmarks.

  • Quantitative Performance: In image-based relighting tasks, DreamLight achieved a PSNR of 22.15, significantly higher than IC-Light’s 20.27. It also showed marked improvements in Structural Similarity (SSIM) and Learned Perceptual Image Patch Similarity (LPIPS).
  • Qualitative Superiority: Visual evaluations indicate that DreamLight avoids the "washed out" or grayish appearance common in other models. It produces sharper details and more convincing "rim lighting"—the subtle glow around the edges of a subject that signifies a deep integration with the background.
  • Text-to-Image Versatility: In text-based scenarios, DreamLight achieved higher "Image Reward" scores, suggesting that human evaluators find its results more realistic and faithful to the provided prompts. Notably, the model exhibits emergent hybrid capabilities, allowing it to combine image and text prompts (e.g., using a sunny field image but applying a "nighttime" text prompt) successfully.

Conclusion and Future Work

DreamLight represents a significant step forward in image harmonization by treating relighting as a spatial and frequency-aware problem. By separating texture preservation from lighting modification, it maintains high identity consistency while achieving realistic environmental integration.

Current limitations include a dependency on external segmentation tools for subject masking and a localized focus for the SFF (primarily optimized for faces). Future research may extend this directional-aware approach to video relighting, where maintaining temporal consistency of light movement presents an even more complex challenge.

Summary updated

BibTeX
@inproceedings{liu2025dreamlight,
  author = {Yong Liu and Wenpeng Xiao and Qianqian Wang and Junlin Chen and Shiyin Wang and Yitong Wang and Xinglong Wu and Yansong Tang},
  title = {{DreamLight: Towards Harmonious and Consistent Image Relighting}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=y2wt5c1Uhu},
}
Figure