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

Add ability to output multiple different masks in a single NxN tensor #55

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

jloveric
Copy link

@jloveric jloveric commented Mar 5, 2024

SAM generates masks for each detection, however the current comfyUI mask combines all these into a single mask. This adds all the masks (assuming there is no overlap) into a single image where each mask has a different grayscale "color" similar to what is done in the grounding sam demos. The user can then post process from there.

A new field is added "mask" which defaults to "single" which is the current implementation. To output multiple the user can change single to "multiple". In the future, if there are other mask types those can be added. Also added a MultiMaskToImage node and added an image of things working.

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

Successfully merging this pull request may close these issues.

1 participant