General Introduction
IC-Light is a project for image lighting control that aims to manipulate the lighting effects of images through advanced AI models. The project, developed by Lvmin Zhang et al, provides two main models: a text-conditional relighting model and a background-conditional model. Users can adjust the illumination of the foreground image to match the background ambient lighting with simple text prompts or background images to achieve high-quality image compositing and lighting effects.
IC-Light V2 (demo) It is a series based on Flux The IC-Light model of the SD1.5 benefits from a 16-channel VAE, native high resolution and better training methods for far greater detail retention than the SD1.5.
Function List
- Textual Conditional Relighting Model: Control the lighting effect of an image by entering a text prompt.
- background conditions model: Automatically adjusts the illumination of the foreground image based on the background image.
- Automatic Model Download: There is no need to download the model manually, the system will handle it automatically.
- Multiple light preference settings: Users can choose different light directions and intensities.
- High Resolution Support: Supports high-resolution image processing, preserving image detail.
- uniform light: Ensures consistent blending of different light sources for HDR spaces.
Using Help
Installation process
- cloning project::
git clone https://github.com/lllyasviel/IC-Light.git cd IC-Light
- Create and activate a virtual environment::
conda create -n iclight python=3.10 conda activate iclight
- Installation of dependencies::
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121 pip install -r requirements.txt
Relighting models using text conditions
- Run the sample script::
python gradio_demo.py
- input prompt: Enter text prompts in the Gradio interface, such as "beautiful woman, detailed face, warm atmosphere, at home, bedroom".
- Selecting Light Preferences: Select the direction of light as required, e.g. "Left".
- Generating images: Click the Generate button to view the effect of the adjusted image.
Use of background condition models
- Run the sample script::
python gradio_demo_bg.py
- Upload background image: Upload a background image in the Gradio interface.
- Input foreground prompts: Enter a description of the foreground image, e.g. "handsome man, cinematic lighting".
- Generating images: Click the Generate button to view the effect of the adjusted image.
Advanced Features
- photometric uniformity: IC-Light ensures consistency of light in the HDR space, resulting in a natural blend of different light sources.
- Detail retention: Maintains high detail and resolution of images using 16-channel VAE models.
- style: Support for processing stylized images, maintaining the original artistic style.
common problems
- How do you handle low light images? Using the background condition model, enter a description of the low-light image and the system will automatically adjust the lighting.
- Does it support commercial use? The current version is for non-commercial use only. For commercial use, please contact the development team for a license.
IC-Light one-click installer unpacking password and colab deployment: