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

[Feature Request]: Composite masking: subtract one mask from another #637

Closed
Shmeda opened this issue Jun 12, 2024 · 1 comment
Closed
Labels
enhancement New feature or request good first issue Good for newcomers Stale

Comments

@Shmeda
Copy link

Shmeda commented Jun 12, 2024

Is your feature request related to a problem? Please describe.

It is often useful to identify an object in the foreground (a person, hand, flower, etc.) create a mask of that object, then subtract that object's mask from another mask of an object behind it. The photography scenarios are pretty common just for faces; a wine glass in front of a person's face, a sniper looking down the barrel of a gun, a helmet with half visor down. In these kind of cases it is very useful to use different models in the foreground and background objects, but often sequential sep masks just mix too much and one step screws up the next.

Describe the solution you'd like

I can imagine this working in two different ways. The first would be with one type of detection; person seg for example. The first detection would be subtracted from the second, or vis versa. There could be multiple options here, but basically the idea would be to identify a mask that would be the negative and subtract that from one or all of the other masks.

The second way would be more complex technically, but more useful. The user would be able to select more than one type of detection in one adetailer tab and choose which one is the negative. This way one could subtract the foreground glass mask from the background face mask to get an appropriate portion of the face to be modified.

Describe alternatives you've considered

Sep masks work in some cases, inverting masks work in some cases. Too often one mask will over or under detect, destroying the object I was intending to target in the next step.

Additional context

I work in video post production and design, this kind of feature is common in adobe suite, figma, etc.

@Shmeda Shmeda added the enhancement New feature or request label Jun 12, 2024
@Shmeda Shmeda changed the title [Feature Request]: [Feature Request]: Composite masking: subtract one mask from another Jun 12, 2024
@Bing-su Bing-su added the good first issue Good for newcomers label Jun 13, 2024
@Bing-su
Copy link
Owner

Bing-su commented Jun 13, 2024

I was aware of this functionality from ddetailer before.

I just... I didn't hear user demand for the feature, my UI drawing skills sucked, and I had no experience with it.

If you don't mind, there are other extensions that have this feature.

https://github.com/portu-sim/sd-webui-bmab
https://github.com/wkpark/uddetailer

@github-actions github-actions bot added the Stale label Jul 1, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers Stale
Projects
None yet
Development

No branches or pull requests

2 participants