Visit ComfyUI Online for ready-to-use ComfyUI environment
Perform pixel-wise subtraction between mask images to isolate specific regions, refine areas of interest, and enhance precision in AI art projects.
The Masks Subtract node is designed to perform a pixel-wise subtraction between two mask images, effectively removing the areas of one mask from another. This operation is particularly useful in image processing tasks where you need to isolate or exclude specific regions from an image. By subtracting one mask from another, you can refine the areas of interest, enhance the precision of your masks, and achieve more accurate results in your AI art projects. The node ensures that the resulting mask values are clamped between 0 and 255, maintaining valid pixel intensity ranges.
This parameter represents the first mask image from which you want to subtract another mask. It is a required input and should be provided in the form of a mask tensor. The mask image typically contains pixel values that define the regions of interest. The subtraction operation will be performed on this mask, and the result will be influenced by the values in this input.
This parameter represents the second mask image that you want to subtract from the first mask. It is also a required input and should be provided in the form of a mask tensor. The pixel values in this mask will be subtracted from the corresponding pixel values in the first mask. The resulting mask will highlight the areas that are present in the first mask but not in the second mask.
The output parameter is a single mask tensor that represents the result of the subtraction operation. This mask will contain the pixel-wise difference between the two input masks, with values clamped between 0 and 255. The resulting mask can be used for further image processing tasks, such as refining regions of interest or excluding specific areas from an image.
masks_a
and masks_b
have different dimensions.masks_a
and masks_b
are provided as inputs to the node. Double-check the input connections in your node graph.© Copyright 2024 RunComfy. All Rights Reserved.