This is an Extension for the Automatic1111 Webui, which automatically generates a mask for Inpainting, from the edges of the specified image.
When you remove the background of a subject and place it on another image, the edge of the subject may still contain some blending artifacts or inconsistency. This can easily be sovlved by doing an Inpaint pass. However, manually drawing a mask around the edge can be a chore. Therefore, use this Extension to automatically generate one for you!
See also layerdiffusion for cleaner images with no background
Images
- Background: Background to place the subject on
- Foreground: The subject to place
- Requires alpha channel (transparency)
- Mask Thickness: The thickness of the generated mask
- Adjust this based on the image resolution
- Low/High Threshold: Parameters for the Canny edge detection
- Default values should be fine for the most cases
Movements
- X Offset: Move the subject horizontally
- Y Offset: Move the subject vertically
- Rotation: Rotate the subject
- Scale: Scale the subject
Spamming this would generate a lot of images in the temporary Gradio directory. I recommend you to pre-place the subject instead of using these
wackysliders...
2. Remove background using rembg
4. Place subject onto the background
Notice the grey outline around the subject