Visit ComfyUI Online for ready-to-use ComfyUI environment
Modify mask size by expanding/contracting, precise control, tapered corners for smoother transitions, manage coverage area effectively.
The GrowMask node is designed to modify the size of a given mask by either expanding or contracting it. This is particularly useful in image processing tasks where you need to adjust the boundaries of a mask to include or exclude more areas. The node allows for precise control over the expansion or contraction process, and it can also handle tapered corners to create smoother transitions. By using this node, you can effectively manage the mask's coverage area, which is essential for tasks like inpainting, segmentation, and other image manipulation operations.
The mask
parameter is the input mask that you want to modify. This mask is typically a binary or grayscale image where the areas of interest are marked. The node will process this mask to either expand or contract its boundaries based on the other parameters.
The expand
parameter determines the number of pixels by which the mask should be expanded or contracted. It accepts integer values, with a default of 0. Positive values will expand the mask, while negative values will contract it. The range for this parameter is from -MAX_RESOLUTION to MAX_RESOLUTION, allowing for significant flexibility in mask adjustment.
The tapered_corners
parameter is a boolean that specifies whether the corners of the mask should be tapered during the expansion or contraction process. When set to True
(the default value), the corners will be smoothed out, creating a more natural transition. If set to False
, the corners will remain sharp.
The output parameter MASK
is the modified mask after the expansion or contraction process. This mask will have its boundaries adjusted according to the expand
and tapered_corners
parameters, making it ready for further image processing tasks.
tapered_corners
parameter.expand
parameter to contract the mask, which can be useful for refining the area of interest.expand
values to achieve the desired mask size, especially when preparing masks for inpainting or segmentation tasks.expand
parameter is set to a value outside the allowed range.expand
parameter to be within the range of -MAX_RESOLUTION to MAX_RESOLUTION.© Copyright 2024 RunComfy. All Rights Reserved.