ComfyUI  >  Nodes  >  Masquerade Nodes

ComfyUI Extension: Masquerade Nodes

Repo Name

masquerade-nodes-comfyui

Author
BadCafeCode (Account age: 485 days)
Nodes
View all nodes (22)
Latest Updated
6/19/2024
Github Stars
0.3K

How to Install Masquerade Nodes

Install this extension via the ComfyUI Manager by searching for  Masquerade Nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Masquerade Nodes in the search bar
After installation, click the  Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Masquerade Nodes Description

Masquerade Nodes is a low-dependency node pack focused on handling masks. The author suggests using Impact-Pack for better functionality unless dependency issues arise.

Masquerade Nodes Introduction

The masquerade-nodes-comfyui extension is a powerful tool designed for AI artists using ComfyUI. This extension focuses on creating and manipulating masks within your image workflows. Masks are essential for tasks like inpainting, photobashing, and filtering images based on specific criteria. By using this extension, you can achieve fine control over image composition, enhance specific areas of an image, and automate complex image editing tasks.

How Masquerade Nodes Works

At its core, masquerade-nodes-comfyui uses a variety of nodes to create and manipulate masks. Masks are essentially black-and-white images where the white areas represent the parts of the image you want to keep or modify, and the black areas represent the parts you want to ignore. This extension leverages the power of ClipSeg, a model that generates masks based on text prompts, allowing you to dynamically create masks by simply describing what you want to mask out or keep in your image.

Masquerade Nodes Features

Mask By Text

  • Inputs:
  • image: The image to generate the mask for.
  • prompt: Text prompts to define what to mask.
  • negative_prompt: Text prompts to define what not to mask.
  • precision: The confidence level for the mask.
  • normalize: Whether to normalize the mask across the image.
  • Outputs:
  • Thresholded Mask: The final mask after applying precision and normalization.
  • Raw ClipSeg Results: The raw output from ClipSeg.
  • Tips:
  • Use multiple prompts for better results.
  • Normalize only if the model inconsistently recognizes the prompt.

Mask Morphology

  • Inputs:
  • image: The mask to modify.
  • distance: The distance for the operation.
  • op: The operation to perform (dilate, erode, open, close).
  • Outputs:
  • The modified mask.
  • Tips:
  • Use "open" to remove white specs and "close" to remove black specs.

Combine Masks

  • Inputs:
  • image1: The first mask.
  • image2: The second mask.
  • op: The operation to perform (union, intersection, difference, etc.).
  • clamp_result: Clamp results between 0 and 1.
  • round_result: Round results to 0 or 1.
  • Outputs:
  • The combined mask or image.
  • Tips:
  • Useful for combining masks in various ways, such as adding or subtracting masks.

Unary Mask Op

  • Inputs:
  • image: The mask to operate on.
  • op: The operation to perform (invert, average, round, clamp, abs).
  • Outputs:
  • The modified mask.
  • Tips:
  • "Average" can be useful for comparing the likelihood of two concepts.

Blur

  • Inputs:
  • image: The image to blur.
  • radius: The blur radius.
  • sigma_factor: Controls the falloff speed of the blur.
  • Outputs:
  • The blurred image or mask.
  • Tips:
  • Can be used on both images and masks.

Image To Mask

  • Inputs:
  • image: The image to convert.
  • method: The conversion method (intensity, alpha).
  • Outputs:
  • The resultant mask.
  • Tips:
  • Useful for converting images to masks for inpainting.

Mix Images By Mask

  • Inputs:
  • image1: The first image.
  • image2: The second image.
  • mask: The mask to use for mixing.
  • Outputs:
  • The mixed image.

Mask To Region

  • Inputs:
  • mask: The mask to calculate the region for.
  • padding: Padding around the mask.
  • constraints: Constraints for the region (keep_ratio, keep_ratio_divisible, etc.).
  • constraint_x, constraint_y: Constraints for width and height.
  • min_width, min_height: Minimum width and height.
  • batch_behavior: How to handle batches.
  • Outputs:
  • A mask of the resultant region.
  • Tips:
  • Useful for inpainting at full resolution.

Cut By Mask

  • Inputs:
  • image: The image or mask to cut.
  • mask: The mask specifying the area to cut.
  • force_resize_width, force_resize_height: Resize dimensions.
  • mask_mapping_optional: Mapping for variable masks.
  • Outputs:
  • The cut image or mask.
  • Tips:
  • Use with Mask To Region for precise inpainting targets.

Paste By Mask

  • Inputs:
  • image_base: The base image.
  • image_to_paste: The image to paste.
  • mask: The mask specifying where to paste.
  • resize_behavior: How to handle resizing.
  • mask_mapping_optional: Mapping for variable masks.
  • Outputs:
  • The resultant image.
  • Tips:
  • Modify the paste mask to alter size/position.

Troubleshooting Masquerade Nodes

Common Issues and Solutions

  1. Masks Not Appearing Correctly:
  • Ensure the prompts are accurate and relevant to the image content.
  • Adjust the precision and normalization settings.
  1. Unexpected Results with Combine Masks:
  • Verify the operations (union, intersection, etc.) are appropriate for your use case.
  • Check if clamping and rounding settings are correctly applied.
  1. Blurring Not Effective:
  • Increase the radius or adjust the sigma factor for a stronger blur effect.

Frequently Asked Questions

  • Q: How do I improve mask accuracy?
  • A: Use more specific prompts and adjust the precision setting.
  • Q: Can I use this extension for batch processing?
  • A: Yes, many nodes support batch operations.

Learn More about Masquerade Nodes

For additional resources, tutorials, and community support, you can explore the following:

  • : A tool to manage custom nodes in ComfyUI.
  • : Comprehensive information on various ComfyUI nodes.
  • : A feature-rich alternative for dealing with masks and segmentation. These resources will help you get the most out of masquerade-nodes-comfyui and enhance your AI art projects.

Masquerade Nodes Related Nodes

RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.