A powerful set of mask-related nodes for ComfyUI
Package profile
README
This node pack was created as a dependency-free library before the ComfyUI Manager made installing dependencies easy for end-users.
Unless you specifically need a library without dependencies, I recommend using Impact Pack instead. It's a more feature-rich and well-maintained alternative for dealing with masks and segmentation.
Related resources
12 connectionsSources
3 sourcesVerified Jul 15
Source excerpts
1 excerptSource context: Repo BadCafeCode/masquerade-nodes-comfyui
This is a node pack for ComfyUI, primarily dealing with masks. Some example workflows this pack enables are:
(Note that all examples use the default 1.5 and 1.5-inpainting models. Results are generally better with fine-tuned models.)
examples/composition-by-photobashing.json)
CompositionExampleexamples/inpaint-faces.json)
FaceInpaintingExampleexamples/inpaint-with-lora.json)
LoRAInpaintingExampleexamples/filter-by-season.json)
FilterImagesExampleThe lynchpin of these workflows is the Mask by Text node. This node makes use of ClipSeg to dynamically create masks from images via text prompts.
image - The image to use to calculate the mask for.prompt - One or more prompts to select, separated by the | symbol.negative_prompt - Zero or more prompts to select, separated by the | symbol.precision - How sure to be about the mask created.normalize - Whether results should be normalized across the image.
Combine Masks -> Union and Combine Masks -> Difference.image - The mask to perform the operation on.distance - The distance across which to perform the operation.op - The operation to perform.
dilate - Expand the size of the mask.erode - Contract the size of the mask.open - Erode and then dilate. Useful to remove white specs in the mask.close - Dilate and then erode. Useful to remove black specs in the mask.image1 - The first mask to use.image2 - The second mask to use.op - The operation to perform.
union (max) - The maximum value between the two masks.intersection (min) - The minimum, value between the two masks.difference - The pixels that are white in the firNodes in this pack
22 nodesVerified Jul 30