Discover and explore top open-source AI tools and projects—updated daily.
Image relighting for seamless compositing
Top 79.5% on SourcePulse
DreamLight addresses the challenge of harmonizing subjects with new backgrounds in images, offering both image-based and text-based relighting. It targets users needing to seamlessly composite elements while maintaining consistent lighting and color, benefiting from aesthetic uniformity and the flexibility of text-to-image generation for backgrounds.
How It Works
DreamLight reorganizes input data and leverages semantic priors from pre-trained diffusion models to generate natural relighting effects. It introduces a Position-Guided Light Adapter (PGLA) to condense light information into query embeddings, modulating the foreground with direction-biased masked attention. A Spectral Foreground Fixer (SFF) module adaptively reorganizes frequency components for enhanced foreground-background consistency.
Quick Start & Requirements
pip install -r requirements.txt
diffusers
library (0.33.1 for FLUX, 0.30.3 for SD1.5), which are included in the repository. Pre-trained model weights and CLIP image encoder weights must be downloaded separately and placed in ckpt/FLUX/
and ckpt/SD15/
folders.FLUX/
or SD15/
directory and run python test.py
. Modify paths within test.py
as needed. Single image inference requires specifying foreground, background, save paths, and a prompt text file.Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The README indicates that the diffusers
library needs to be replaced with the versions provided within the repository, suggesting potential dependency management complexities. The project is presented as a research work, and its stability and long-term maintenance are not yet established.
2 months ago
Inactive