Impact Pack

2322
By Dr.Lt.Data
Updated 11 days ago
View on GitHub →See Common Issues →

This extension offers various detector nodes and detailer nodes that allow you to configure a workflow that automatically enhances facial details. And provide iterative upscaler.

Available Nodes

AddMask

AddMask Node Documentation

Overview

The AddMask node is part of the ComfyUI-Impact-Pack, designed to manipulate image masks by performing pixel-wise operations. This particular node enables the combination of two masks through an additive operation, creating a new mask that represents the union of the areas covered by the input masks.

Functionality

The AddMask node specifically performs a pixel-wise addition between two mask inputs. In simple terms, it combines the input masks such that the resulting output mask incorporates the features or areas from both inputs. This can be useful in image processing workflows where you want to merge certain areas of an image defined by separate masks.

Inputs

The AddMask node accepts the following inputs:

  1. Mask 1: The first input mask to be combined. This mask defines the initial regions of interest in the image.

  2. Mask 2: The second input mask to be combined. This mask defines additional regions of interest that will be added to the regions defined by Mask 1.

Both of these inputs should be binary masks, where pixel values typically denote areas of interest (often with 0 representing areas to ignore and 1 representing areas to focus on).

Outputs

The AddMask node produces the following output:

  • Combined Mask: A new mask resulting from the pixel-wise addition of Mask 1 and Mask 2. This mask encompasses all the regions defined in both input masks. The output mask is binary, ensuring that all overlapping areas are appropriately merged.

Usage in ComfyUI Workflows

In ComfyUI, workflows often involve a sequence of nodes that process images in various ways to achieve desired visual effects or to prepare data for machine learning models. The AddMask node can be a critical component in such workflows, particularly in situations where multiple masks need to be unified to encompass larger or more complex areas of an image.

Here’s how the AddMask node might be utilized:

  • Image Enhancement: When enhancing specific parts of an image, different masks targeting different features or areas can be combined with the AddMask node to apply uniform processing across the combined area.

  • Segmentation Tasks: In tasks where you need to segment various parts of an image for further processing (e.g., inpainting or detail enhancement), the AddMask node helps in merging mask outputs from different detectors to create a comprehensive mask of the areas requiring attention.

  • Compositional Image Manipulation: For projects involving the composite creation of images where multiple features need to be targeted at once, the AddMask node provides a simple means to unify disparate mask regions.

Special Features or Considerations

  • Binary Masking: The AddMask node assumes that both input masks are binary. Inputs should be pre-processed to ensure they adhere to this format for optimal operation.

  • Batch Processing: Although the node processes binary masks, it can be integrated into larger workflows that deal with batches of images and masks, allowing for scalable operations across multiple datasets.

  • Seamless Integration: The AddMask node is designed to integrate smoothly with other nodes within the ComfyUI-Impact-Pack, supporting complex image processing tasks that require mask manipulation as part of the process.

By understanding and effectively using the AddMask node, users can perform advanced mask operations within ComfyUI, enhancing their capability to process and manipulate images for various applications.