Visit ComfyUI Online for ready-to-use ComfyUI environment
Reverse mask values to invert areas of interest and background, essential for image manipulation.
The Mask Invert node is designed to reverse the values of a given mask, effectively inverting it. This operation is particularly useful in scenarios where you need to switch the areas of interest and the background in a mask. By inverting the mask, the node changes all the 1s (or white areas) to 0s (or black areas) and vice versa, making it easier to manipulate and process images in various creative ways. This node is essential for tasks that require the differentiation of foreground and background elements, providing a straightforward method to achieve this inversion.
The mask
parameter is the input mask that you want to invert. This mask is typically a binary image where the areas of interest are marked with 1s (or white) and the background with 0s (or black). The inversion process will swap these values, turning the areas of interest into the background and vice versa. This parameter does not have a default value as it requires an existing mask to function.
The output parameter MASK
is the inverted version of the input mask. After processing, the areas that were originally marked as 1s (or white) will be converted to 0s (or black), and the areas that were 0s (or black) will be converted to 1s (or white). This inverted mask can then be used in subsequent image processing tasks to achieve the desired effects.
© Copyright 2024 RunComfy. All Rights Reserved.