zsxkib / ic-light

✍️✨Prompts to auto-magically relights your images

  • Public
  • 201.9K runs
  • L40S
  • GitHub
  • License

Input

subject_image
*file

The main foreground image to be relighted

*string
Shift + Return to add a new line

A text description guiding the relighting and generation process

string
Shift + Return to add a new line

Additional text to be appended to the main prompt, enhancing image quality

Default: "best quality"

string
Shift + Return to add a new line

A text description of attributes to avoid in the generated images

Default: "lowres, bad anatomy, bad hands, cropped, worst quality"

integer

The width of the generated images in pixels

Default: 512

integer

The height of the generated images in pixels

Default: 640

integer
(minimum: 1, maximum: 100)

The number of diffusion steps to perform during generation (more steps generally improves image quality but increases processing time)

Default: 25

number
(minimum: 1, maximum: 32)

Classifier-Free Guidance scale - higher values encourage adherence to prompt, lower values encourage more creative interpretation

Default: 2

number
(minimum: 1, maximum: 3)

The multiplier for the final output resolution relative to the initial latent resolution

Default: 1.5

number
(minimum: 0.1, maximum: 1)

Controls the amount of denoising applied when refining the high resolution output (higher = more adherence to the upscaled latent, lower = more creative details added)

Default: 0.5

number
(minimum: 0.1, maximum: 1)

Controls the amount of denoising applied when generating the initial latent from the background image (higher = more adherence to the background, lower = more creative interpretation)

Default: 0.9

string

The type and position of lighting to apply to the initial background latent

Default: "None"

integer

A fixed random seed for reproducible results (omit this parameter for a randomized seed)

integer
(minimum: 1, maximum: 12)

The number of unique images to generate from the given input and settings

Default: 1

string

The image file format of the generated output images

Default: "webp"

integer
(minimum: 0, maximum: 100)

The image compression quality (for lossy formats like JPEG and WebP). 100 = best quality, 0 = lowest quality.

Default: 80

Output

output
Generated in

Run time and cost

This model costs approximately $0.0038 to run on Replicate, or 263 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker.

This model runs on Nvidia L40S GPU hardware. Predictions typically complete within 4 seconds.

Readme

IC-Light Text: Illuminate Portraits with Text-Guided Relighting 📝💡

Foreground (Subject) Image + Prompt → Subject in Prompted Location w/ Correct Lighting

Overview 🌈

IC-Light Text (short for “Imposing Consistent Light”) is an AI-powered tool that magically relights your portrait photos using text descriptions. Built upon cutting-edge deep learning techniques, IC-Light Text lets you create beautifully illuminated results with ease! 📸✨

Getting Started 🚀

To start relighting your portraits, simply:

  1. Upload your portrait image
  2. Describe the desired lighting using natural language
  3. Let IC-Light Text work its magic! ✨

Text-Conditioned Relighting ✍️💡

With text-conditioned relighting, you can describe the lighting you want using natural language. Want a warm, golden hour glow? Just type it in! IC-Light Text will interpret your description and relight your portrait accordingly. 🌅

Consistency is Key 🔑

IC-Light Text’s secret sauce is its ability to impose consistent lighting across your portrait. By training the model with a specialized loss function, IC-Light Text ensures that the relighting looks physically plausible and coherent, no matter how creative you get with your descriptions! 🧙‍♂️

Customization Galore 🎛️

IC-Light Text offers a wide range of parameters to fine-tune your relighting results. From adjusting the intensity of the lighting to controlling the output quality, you have the power to create the perfect look for your portraits. 🎚️

Powered by Science 🔬

Under the hood, IC-Light Text leverages state-of-the-art deep learning models, including Stable Diffusion v1.5, to work its relighting magic. With a powerful combination of text encoding, variational autoencoders, and U-Nets, IC-Light Text is at the forefront of AI-driven image manipulation. 🧠

Get Ready to Shine! ✨

With IC-Light Text, you can take your portrait photography to the next level. Say goodbye to flat, lifeless lighting and hello to stunning, perfectly illuminated portraits that will make your subjects shine! 🌟

Disclaimer 📜

While IC-Light Text is an incredibly powerful tool, please use it responsibly. Respect the privacy and rights of the individuals in your photos, and always obtain necessary permissions before sharing or publishing relit images. 🙏

Get ready to see your portraits in a whole new light with IC-Light Text! 🌈✨


For background-conditioned portrait relighting, check out the IC-Light Background model. 🖼️💡