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

Impossible to make good txt2mask composites #234

Open
3 tasks done
Primatt opened this issue Feb 21, 2024 · 0 comments
Open
3 tasks done

Impossible to make good txt2mask composites #234

Primatt opened this issue Feb 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Primatt
Copy link

Primatt commented Feb 21, 2024

Due diligence

  • I checked for similar issues and couldn't find any.
  • My WebUI and Unprompted are both up-to-date.
  • 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

2d4a184

WebUI version

v1.7.0

Other comments

No response

@Primatt Primatt added the bug Something isn't working label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant