Digital Product Studio

Forget Photoshop, Add Next-Level Relighting to Your Images for Free With IC-Light

Have you ever wanted to relight images with just a click? Now, you can with IC-Light, an open-source tool that lets you impose new lighting conditions on portraits and other images. In this article, we will explore the incredible capabilities of IC-Light and how you can use it in relighting your images.

Forget Photoshop, Add Next-Level Relighting to Your Images With IC-Light Open-Source Tool

What is IC-Light?

IC-Light stands for Imposing Consistent Light. It is a GitHub project developed by Lvmin Zhang to manipulate the illumination of images through state-of-the-art AI models. The goal is to produce relightings that are consistent with physical illumination so different relightings can be merged seamlessly.

Relighting Models of IC-Light Tool

IC-Light currently provides two main types of relighting models – a text-conditioned model and a background-conditioned model. Both take a foreground image as input and output a relit version based on additional conditioning. So, let’s explore each model and how they work under the hood.

1. Text-Conditioned Relighting

The default text-conditioned model is based on Stable Diffusion 1.5, one of the most powerful generative image models available. It allows relighting an input image simply by providing a text prompt describing the desired lighting conditions. For example, prompts like “sunny outdoor lighting”, “bedroom at night”, or “noir film lighting” will relight the image to match that mood and scene. 

Under the hood, the SD model encodes the input image and prompts into a latent space. It then modifies the latent code based on its text understanding to arrive at the relit version, all while maintaining photo-realistic details. The whole process takes just seconds on a GPU.

Forget Photoshop, Add Next-Level Relighting to Your Images With IC-Light Open-Source Tool

2. Background-Conditioned Relighting

For even more control, IC-Light provides a background-conditioned model. This variant takes both a foreground and background image as input. It analyzes the background to understand its implicit lighting, then relights the foreground to be consistent with that scene.

The background-conditioned model is powered by BriaRMBG, a domain adaptation technique that harmonizes people into photographs. It works by matching statistical distributions between foreground and background at multiple scales. This produces relightings that seamlessly composite figures into new environments.  It also uses SD 1.5.

Forget Photoshop, Add Next-Level Relighting to Your Images With IC-Light Open-Source Tool

Key Benefits of IC-Light Models

The two IC-Light models offer different benefits for image relighting:

  • Text-conditioned is ideal when you only have the foreground and know the desired style in words. It’s very flexible and easy to use.
  • Background-conditioned produces the most photorealistic results by exploiting extra context. It ensures lighting matches between foreground and background pixels.

Both approaches produce highly consistent relights thanks to how they were trained. Different conditions can be blended seamlessly, allowing novel manipulations.

IC-Light HuggingFace Demo

Below are the step-by-step instructions to use the HuggingFace demo for IC-Light’s text-conditioned relighting model:

1. Visit the IC-Light HuggingFace Demo Space

To access the HuggingFace demo for IC-Light’s text-conditioned relighting model at https://huggingface.co/spaces/lllyasviel/IC-Light.

2. Upload an Image

Either drag and drop an image file into the designated area or click the “Click to Upload” button to browse your local files and select an image. Additionally, you have the option to choose from the given images. The preview will update to show the uploaded image.

3. Choose a Prompt

From the provided subject and lighting quick lists, select terms that best describe the scene and style you want for the relit image. You can also type a custom prompt.

4. Select Initial Latent

The initial latent refers to the starting point in latent space – choosing different ones can influence the lighting style. Options include None, Left Light, Right Light, etc.

5. Adjust Settings

Tweak the number of diffusion steps, scale and denoise values as desired. You can also add or remove terms from the prompt for refinements.

6. Generate Relit Image

Now, click on the “Relight” button to run the model. It will automatically preprocess the input and return the relit output within seconds.

7. Save or Continue Editing

The results will appear side by side for comparison. You can save the images or continue refining the settings and re-generate as needed till satisfied.

Potential Applications of IC-Light Tool for Creators

IC-Light gives photographers, graphic designers and visual artists a powerful new capability. With just one click, they can completely change the lighting, mood and style of an image to suit their vision.

Moreover, some key use cases include portrait retouching, background removal, composite editing, and non-photorealistic relighting for art, comics or video games. It automates a task that previously required intensive manual work in Photoshop with masks and layers.

How to Get Started With IC-Light

To start using the IC-Light tool, simply visit the GitHub repository at https://github.com/lllyasviel/IC-Light. There, you will find all the necessary information and resources to run demo scripts to start experimenting with both the text-conditioned and background-conditioned relighting models. 

The IC-Light tool provides three main trained models to choose from for relighting tasks:

1. iclight_sd15_fc.safetensors – This is the default text-conditioned model that takes a foreground image and prompts as input. It offers the most flexibility by allowing the initial latent to influence results.

2. iclight_sd15_fcon.safetensors – A variant of the above model that is trained with offset noise. Based on a user study, the default model without noise performs slightly better.

3. iclight_sd15_fbc.safetensors – This background-conditioned model considers both a foreground and background image. It matches lighting between the inputs for realistic composite relighting.

Final Verdict

With its intuitive interface and ability to enhance any image at scale, IC-Light is an invaluable tool for visual content creators and anyone who loves exploring new relighting possibilities. So, give it a try today to see its magic for yourself! Do let us know your experience with this tool in the comments section below.

| Also Read Latest From Us

SUBSCRIBE TO OUR NEWSLETTER

Stay updated with the latest news and exclusive offers!


* indicates required
Picture of Faizan Ali Naqvi
Faizan Ali Naqvi

Research is my hobby and I love to learn new skills. I make sure that every piece of content that you read on this blog is easy to understand and fact checked!

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

Don't Miss Out on AI Breakthroughs!

Advanced futuristic humanoid robot

*No spam, no sharing, no selling. Just AI updates.