Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fill masked area is actually smaller than the input mask #39

Closed
whmc76 opened this issue Apr 30, 2024 · 2 comments
Closed

fill masked area is actually smaller than the input mask #39

whmc76 opened this issue Apr 30, 2024 · 2 comments

Comments

@whmc76
Copy link

whmc76 commented Apr 30, 2024

Especially when I use the fill method, which will keep the pixels on the edge of the original image, it is difficult for me to change the color of a piece of clothing through this method. White clothes will always be filled with white pixels.
9fa5343ffda9d0ffa9949be15229e54

falloff should at least support negative input to offset the result of shrinking the mask range inward. If I want to fill the background color to change the image, this would be more reasonable.
In most cases, neutral will produce a relatively obvious boundary with the background edge.

i make a mask like this
image
but i got this
4a44996499057a0fe279c6254179d03
and this
cd999e2fea688601f8d849284ed2c0e

i have to grow the mask to get expect result
1b405f48572db6d4cf267fbc6a01cd4

@Acly
Copy link
Owner

Acly commented Apr 30, 2024

You always get the fill where the mask is perfectly white. Outside of the area there is optional blending according to the falloff parameter.

So there is no shrinking, and negative falloff doesn't make sense. What you're seeing is that your mask has some smoothing and mask areas that aren't 100% white are not filled. This is intentional, to avoid any grey areas getting less than 100% denoise strength (it results in color skew and visible borders).

Using mask grow is a solution, or make sure your mask fully covers the area (without blur!) in the first place.

@whmc76
Copy link
Author

whmc76 commented May 1, 2024

Ok, thanks for your reply. This is reasonable. I'll take a look and optimize the pre-steps.

@whmc76 whmc76 closed this as completed May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants