lllyasviel / IC-Light

More relighting!
Apache License 2.0
4.31k stars 281 forks source link

All images must be cutout before further processing. How can I skip the cutout step? #39

Open abpyu opened 2 months ago

abpyu commented 2 months ago

All images must be cutout before further processing. How can I skip the cutout step?

V1sionVerse commented 1 month ago

You can just comment out the line that says input_fg, matting = run_rmbg(input_fg) in the process_relight function in gradio_demo.py, so the function looks like this:

@torch.inference_mode()
def process_relight(input_fg, prompt, image_width, image_height, num_samples, seed, steps, a_prompt, n_prompt, cfg, highres_scale, highres_denoise, lowres_denoise, bg_source):
    #input_fg, matting = run_rmbg(input_fg)
    results = process(input_fg, prompt, image_width, image_height, num_samples, seed, steps, a_prompt, n_prompt, cfg, highres_scale, highres_denoise, lowres_denoise, bg_source)
    return input_fg, results