unprompted icon indicating copy to clipboard operation
unprompted copied to clipboard

Impossible to make good txt2mask composites

Open Primatt opened this issue 1 year ago • 0 comments

Due diligence

  • [X] I checked for similar issues and couldn't find any.
  • [X] My WebUI and Unprompted are both up-to-date.
  • [X] I disabled my other extensions but the problem persists.

Describe the bug

Goal: Creating a consistent way to select face skin without other features (eyes, mouth) for retouching pictures (removing acne, blemishes, etc.) without modifying the original face structure. Issue: Impossible to do composites (add/substract/intersect/etc...) and proper selection


Hi there !

I've been trying to use the negative_prompts / substract & discard modes to better create masks, I found that clip_surgery works best for specifics, but still no luck there. Here are some examples of the prompts I've been trying:

Don't know if I'm using it wrong, but it seems to works to select positively, just no luck adding a negative.

Tried another extension (Segment Anything with GroundingDino) that is a bit better at selecting precisely, but is worse for complex stuff (add/substract/etc...) and really isn't good for Batch Processing.

Any help ?

Here's the picture I'm working with: b (46)

Thanks a lot !


Some examples, with this layout: Each try was done with a model unload everytime

PICTURE txt2mask prompt with negative mask ==> Result / Result switching from clipseg to clip_surgery // Results after switching from one txt2mask with negative to two txt2mask prompts (one "add" and the other "substract/discard", didn't see any change between the two ?)


Capture d'écran 2024-02-21 203724

[txt2mask method="clipseg" mode="add" sketch_alpha=0.0 show unload_model precision=100.0 padding=0.0 smoothing=20.0 negative_mask="eyes" neg_precision=100.0 neg_padding=0.0 neg_smoothing=20.0]face[/txt2mask]

==> Makes a mask that does leave out part the eyes, but very roughly, like some circles on them, making it impossible to use to remove dark circles for example (tried modifying the neg smoothing to 0, it's less round, but still unusable) / Makes a mask that is like a contour of all the skin on the picture. // Makes the same rough mask, but inverted, only selecting the eyes


2

[txt2mask method="clipseg" mode="add" sketch_alpha=0.0 show unload_model precision=100.0 padding=0.0 smoothing=20.0 negative_mask="mouth" neg_precision=100.0 neg_padding=0.0 neg_smoothing=0.0]head[/txt2mask]

==> Makes a mask properly on the face, but leaves out the nose + some seemingly random ? / Makes a ask selecting the background (??) // Same as the other, simply inverts the selection


3

[txt2mask method="clipseg" mode="add" sketch_alpha=0.0 show unload_model precision=100.0 padding=0.0 smoothing=20.0 negative_mask="eyes, mouth, arms, hands, eyebrows" neg_precision=100.0 neg_padding=0.0 neg_smoothing=0.0]face skin[/txt2mask]

==> Selects the whole face / Makes a mask selecting the background (??) // Makes a mask on whole the skin (including arms)


Also tried including a negative tone in the positive prompt ("without")

4

[txt2mask method="clipseg" mode="add" sketch_alpha=0.0 show unload_model precision=100.0 padding=0.0 smoothing=20.0]face without eyes and mouth[/txt2mask]

==> Selects the whole face / Whole skin including arm // N/A

Prompt

No response

Log output

No response

Unprompted version

2d4a1845

WebUI version

v1.7.0

Other comments

No response

Primatt avatar Feb 21 '24 19:02 Primatt