continue-revolution/sd-webui-segment-anything

[Feature]: Support negative mask expansion values. / [Bug]: Batch Mask Expansion shrinks mask size.

aaronn opened this issue · 0 comments

Expected behavior

Mask Expansion works as expected in Single Image mode: the mask gets larger and expands outwards. However, Batch Process mode has a Save background instead of foreground checkbox. When this is checked, increasing the mask expansion slider will actually cause the mask to get smaller and shrink inwards presumably due to some sort of inverted logic.

I think there are two options here:

  1. You could set it so that the slider increasing will increase the mask size in this "Save background instead of foreground".
  2. Or you could allow negative integers, which would give some flexibility.

I think option 1 seems clearer, though. You could also do both.