geekyutao / Inpaint-Anything

Inpaint anything using Segment Anything and inpainting models.
Apache License 2.0
6.4k stars 525 forks source link

Removing an Object Using Stable Diffusion #149

Open hungnh1125 opened 6 months ago

hungnh1125 commented 6 months ago

I want to use stable diffusion to attempt to remove an object. The original image, the mask image of the object I wish to delete, and an empty prompt serve as the input for the Stable Diffusion model in my configuration. But I encountered the following circumstance.

  1. In certain cases, stable diffusion can remove an object if it is small in size. In certain instances, it is substituted by an identical object of a different colour or shape. For instance, Stable Diffusion uses a different bulb in place of one.
  2. In the event that the object is large, Stable Diffusion is substituted with a new, unrelated entity.

Could you provide some guidance on how to utilise an appropriate cue to take an object out of an image without having it replaced with another object? Moreover, are there any techniques you are aware of to regulate the stable diffusion's output? I want the item I describe in the text prompt to be created using Stable Diffusion. For example, I might want to swap out a car for the identical model with a different colour. Is it feasible?

I really appreciate it.