Visit ComfyUI Online for ready-to-use ComfyUI environment
Convert PNG rectangles to masks with intensity, blur settings, and overlapping mask handling for precise AI art masking.
The PngRectanglesToMask
node is designed to convert a list of PNG rectangles into a mask with specified intensity and blur settings. This node is particularly useful for AI artists who need to create masks directly from rectangle data, allowing for precise control over the mask's appearance. The node can handle overlapping masks by combining previous or next masks into the current one, providing flexibility in mask creation. This functionality is essential for tasks that require detailed and customizable masking, such as image editing, compositing, and regional conditioning in AI-generated art.
This parameter takes a list of PNG rectangles, which are used to define the areas that will be converted into a mask. The list should be generated from the Create PNG Mask
function. Each rectangle in the list specifies a region in the image that will be masked.
This parameter controls the intensity of the mask. It is a floating-point value ranging from 0.0 to 1.0, where 1.0 represents a solid mask. The default value is 1.0. Adjusting the intensity allows you to create masks with varying levels of opacity.
This parameter determines the amount of blur applied to the mask. It is a floating-point value with a minimum of 0.0, where 0.0 means no blur (solid mask). The default value is 0.0. Increasing the blur value will soften the edges of the mask, creating a more gradual transition.
This parameter specifies the starting index of the rectangle list from which the mask creation should begin. It is an integer value with a default of 0. This allows you to control which part of the rectangle list is used for mask generation.
This parameter defines whether to combine the current mask with previous or next masks. It accepts three options: Previous
, Next
, or None
. Choosing Previous
or Next
will combine the respective masks into the current one, while None
will disable overlapping.
This parameter specifies the number of previous or next masks to combine with the current mask. It is an integer value that works in conjunction with the Overlap
parameter to determine the extent of mask combination.
The output is a mask generated from the specified PNG rectangles, with the applied intensity and blur settings. This mask can be used in various image processing tasks, providing a precise and customizable masking solution.
Intenisity
to 1.0 and Blur
to 0.0.Start_At_Index
parameter to focus on specific parts of the rectangle list, allowing for targeted mask creation.Overlap
and Overlap_Count
parameters to achieve seamless transitions between masks, especially when working with complex images.Start_At_Index
or Overlap_Count
parameters reference an index outside the bounds of the PngRectangles
list.Start_At_Index
and Overlap_Count
values are within the valid range of the PngRectangles
list.Start_At_Index
or Overlap_Count
parameters.Start_At_Index
and Overlap_Count
parameters are set to valid integer values.PngRectangles
parameter is not properly initialized or is set to None
.PngRectangles
parameter is correctly populated with a valid list of rectangles before running the node.© Copyright 2024 RunComfy. All Rights Reserved.