Visit ComfyUI Online for ready-to-use ComfyUI environment
Create uniform mask with constant value for image processing and AI art tasks, offering flexibility and consistency in masking.
The Constant Mask node is designed to create a mask filled with a constant value, which can be particularly useful in various image processing and AI art tasks. This node allows you to generate a mask of a specified size or to match the size of an existing image, providing flexibility in its application. By setting a constant value across the entire mask, you can create uniform areas that can be used for masking, blending, or other operations in your workflow. This node is essential for tasks that require a consistent mask pattern, ensuring that the mask's value remains uniform across the entire area.
This parameter sets the constant value that will fill the entire mask. It is a floating-point number, allowing for precise control over the mask's intensity. The default value is 0.0, with a minimum of -8.0 and a maximum of 8.0. Adjusting this value will directly impact the mask's appearance, making it lighter or darker depending on the chosen value.
This parameter defines the height of the mask in pixels. It is an integer value, with a default of 0, which means that if no specific height is provided, a default small size will be used. The minimum value is 0, and the maximum is determined by the system's capabilities (VERY_BIG_SIZE). Setting this parameter allows you to control the vertical dimension of the mask explicitly.
This parameter specifies the width of the mask in pixels. Similar to explicit_height, it is an integer value with a default of 0. The minimum value is 0, and the maximum is determined by the system's capabilities (VERY_BIG_SIZE). This parameter lets you define the horizontal dimension of the mask explicitly.
This optional parameter allows you to copy the size of an existing image to determine the mask's dimensions. If provided, the explicit_height and explicit_width parameters are ignored, and the mask will match the size of the given image. This is useful for ensuring that the mask aligns perfectly with an existing image, simplifying the workflow.
The output of the Constant Mask node is an image tensor filled with the specified constant value. This output can be used in subsequent nodes for various image processing tasks, such as masking, blending, or other operations that require a uniform mask. The dimensions of the output image are determined by the input parameters or the size of the provided image.
value
parameter to control the intensity of the mask, setting it to a higher value for a brighter mask or a lower value for a darker mask.copy_image_size
parameter to ensure the mask matches the image dimensions, avoiding the need for manual size adjustments.explicit_height
and explicit_width
to 0 to generate a small default mask that can be resized later in the workflow.explicit_height
and explicit_width
parameters are within the valid range, with a minimum of 0 and a maximum determined by the system's capabilities.copy_image_size
parameter must be an image tensor.copy_image_size
parameter to ensure the mask dimensions match the image size.value
parameter is set outside the allowed range of -8.0 to 8.0.value
parameter to be within the specified range to ensure proper mask creation.© Copyright 2024 RunComfy. All Rights Reserved.