Acly / comfyui-inpaint-nodes

Nodes for better inpainting with ComfyUI: Fooocus inpaint model for SDXL, LaMa, MAT, and various other tools for pre-filling inpaint & outpaint areas.
GNU General Public License v3.0
695 stars 44 forks source link

The high precision of the tensor on the mask tensor causes errors in the Expand Mask results #97

Open rubi-du opened 1 week ago

rubi-du commented 1 week ago

When there is a minimum value in the mask tensor, it can lead to incorrect Expand mask results and loss of mask calculation

image image

As shown in the above figure, directly converting the mask to an image can work normally, but the mask is lost after expanding it

Acly commented 6 days ago

Yes, "grow" only works for binary masks (all values 0 or 1).

A more general dilation for smooth mask is a lot more expensive I think (at least I can't think of a method to do it as a convolution).