WASasquatch / was-node-suite-comfyui

An extensive node suite for ComfyUI with over 210 new nodes
MIT License
1.19k stars 178 forks source link

add WAS_Mask_Batch (pack multiple individual masks to batch) #112

Closed lcolok closed 1 year ago

lcolok commented 1 year ago

Hi there,

Similar to the WAS_Image_Batch class, the purpose of WAS_Mask_Batch is to pack multiple individual masks with consistent tensor shapes into a batch. It can be understood as the reverse process of WAS_Mask_Batch_to_Single_Mask and is very useful in specific scenarios.

image

You need to review the function names and node names, and you can redefine them according to the project's conventions.

Thanks!

WASasquatch commented 1 year ago

Thought I already had one? Combine batch and Mask Batch?

WASasquatch commented 1 year ago

I must have been thinking of combine region for some reason. Huh. Lol

lcolok commented 1 year ago

I have seen that you are developing nodes related to Lang-SAM in the project. I have also been experimenting in this area. However, the biggest obstacle at the moment is the installation of GroundingDINO, which is not straightforward and requires recompilation on different devices. Once this functionality is implemented, it will increase the demand for mask processing. For example, if we use the "face" prompt to perform object recognition on an image, it will generate multiple batches of masks. Each mask corresponds to a partition, and if we merge the masks for processing, the effect will be compromised. It would be much better to handle the masks separately.

20230708-172554

WASasquatch commented 1 year ago

I thought that's what the labels are for, multiple outputs, it for single masking of isolations.

And yeah, I have given up on GroundDINO, it's a novelty and they don't seem to care about actually making it useful, in that it's dependencies can be used with common tools, and also that it isn't a chore to even install.