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

Feature: Add Slider for "Expand Mask" Iteration Count #101

Closed Sj-Si closed 9 months ago

Sj-Si commented 9 months ago

Brief

This PR adds a simple slider below the Expand Mask button which allows the user to specify the number of iterations to use for the mask expansion operation.

Motivation for Change

Often times, dilating the mask region a single time is not enough to really impact the result in inpainting/cleaning. I often found myself having to spam the Expand Mask button which was slow since every time you press the button you have to wait for the image to reload before you can press again. This PR aims to make everyone's life a bit easier by just allowing them to set the number of iterations (dilation steps) for the Expand Mask operation.

Additional Changes

Tests

image

Uminosachi commented 9 months ago

Thanks for your contribution. I believe this is a valuable feature, as it fits well within the available space in the UI. I'll merge this pull request.