Uminosachi / sd-webui-inpaint-anything

Inpaint Anything extension performs stable diffusion inpainting on a browser UI using masks from Segment Anything.
Apache License 2.0
1.03k stars 93 forks source link

Replace the content of the mask with an image? #125

Open lunatico67 opened 6 months ago

lunatico67 commented 6 months ago

The normal way is to create a mask and write a prompt to modify its content. What I want is to modify the content of that mask with the content of an image, not with a prompt, for example, I create a mask of a woman's shirt and I want to change it for a texture of an image. I guess it is possible with ControlNet inpaint but I don't know how to do it.

Uminosachi commented 6 months ago

Please download the IP adapter model for ControlNet from the links below and save it in the 'extensions/sd-webui-controlnet/models/' folder. Then, restart the webUI. Doing so will enable the use of the IP adapter in the 'ControlNet options' found under the 'ControlNet Inpaint' tab. The IP adapter becomes active when you drag and drop a reference image into the 'Reference Image' area.

Before you begin, make sure to set 'Multi-ControlNet' to 2 or higher in the 'ControlNet' section of the webUI settings. Additionally, when using the 'Reference-Only' mode in the 'ControlNet options', you can use this feature without the need to download any models.

lunatico67 commented 6 months ago

Thanks for the help. inpaint

I must have misconfigured something because nothing comes out in the resulting image.

Uminosachi commented 6 months ago

Please select the SD 1.5 model from the 'Stable Diffusion checkpoint' list in the top left of the webUI. It does not support other models such as SDXL.

lunatico67 commented 6 months ago

Thanks! Works with Reference only, with IPAdapter the resulting shirt has nothing to do with the reference picture inpaint2