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
490 stars 35 forks source link

Inpaint (Using Model) Node is Not Functioning Properly #32

Closed inferno46n2 closed 3 months ago

inferno46n2 commented 3 months ago

If I use the built in mask editor in the Load Image node I get a vastly superior output versus using a mask that I load from an external source.

This basically makes this tool unusable for a large quantity of frames.

image

Acly commented 3 months ago

There's no technical difference. Maybe your input mask is degraded due to jpg compression so values that should be fully transparent are only 98% transparent or similar. Try using png or some other losless format.

inferno46n2 commented 3 months ago

There's no technical difference. Maybe your input mask is degraded due to jpg compression so values that should be fully transparent are only 98% transparent or similar. Try using png or some other losless format.

You are correct.

For anyone else that experiences this problem there is an easy fix. Kijai developed a node called "roundmask" which will round to the nearest int. E.g. if a part of your mask is only 98% transparent it will round that pixel area to 100%

You can find the node here https://github.com/kijai/ComfyUI-KJNodes

image