mcmonkeyprojects / SwarmUI

SwarmUI (formerly StableSwarmUI), A Modular Stable Diffusion Web-User-Interface, with an emphasis on making powertools easily accessible, high performance, and extensibility.
MIT License
1.32k stars 95 forks source link

Yolo masking face vs default segment face masking has huge huge difference #292

Closed FurkanGozukara closed 1 month ago

FurkanGozukara commented 1 month ago

There can be masked are difference but where is coming this inpainting difference? Same model same seed

First image default face masking

a photo of ohwx man wearing an amazing white suit and a red shirt, wearing eyeglasses, wearing a black tie and has red hair color and very long thick blue beard and he is in a luxury coffee shop in paris<segment:face-1,0.6,0.5>photo of ohwx man with very long thick blue beard

image

second image is yolo masking

a photo of ohwx man wearing an amazing white suit and a red shirt, wearing eyeglasses, wearing a black tie and has red hair color and very long thick blue beard and he is in a luxury coffee shop in paris<segment:face-1,0.6,0.5>photo of ohwx man with very long thick blue beard

image

mcmonkey4eva commented 1 month ago

different masks yield different results lol. You can fiddle the advanced settings under regional prompting to improve issues from if the segment model yielded weak results, particularly lowering the value of Segment Threshold Max might help

FurkanGozukara commented 1 month ago

different masks yield different results lol. You can fiddle the advanced settings under regional prompting to improve issues from if the segment model yielded weak results, particularly lowering the value of Segment Threshold Max might help

isnt mask only position of pixels or i am understanding wrong?

any more info available what Segment Threshold Max do exactly?

mcmonkey4eva commented 1 month ago

Mask is the pixels of the strength per each pixel. White is fully masked, black is fully unmasked, and there's a whole grayscale range in between for partial masks. Setting the max value compresses that range - eg if you set it to 0.5, then any partial mask that's at least 0.5 (middle gray) is treated as a full match (pure white).

A lot of "my results look ugly with automasking" complaints come down to unexpectedly low-strength matches leading to very small changes to the source image

FurkanGozukara commented 1 month ago

Mask is the pixels of the strength per each pixel. White is fully masked, black is fully unmasked, and there's a whole grayscale range in between for partial masks. Setting the max value compresses that range - eg if you set it to 0.5, then any partial mask that's at least 0.5 (middle gray) is treated as a full match (pure white).

A lot of "my results look ugly with automasking" complaints come down to unexpectedly low-strength matches leading to very small changes to the source image

Thank you so much for answer

So

<segment:face-1,0.6,0.5>

Vs

<segment:face-1,0.6,0.1>

That 0.1 will change more right have stronger, will be more white stronger masked?

mcmonkey4eva commented 1 month ago

The value inside the prompt syntax is the minimum.

Maximum is controlled by the max parameter as I mentioned earlier image

FurkanGozukara commented 1 month ago

The value inside the prompt syntax is the minimum.

Maximum is controlled by the max parameter as I mentioned earlier image

thank you so much so we need to reduce segment threshold max - by the way it is impossible to understand what it does from description alone :D