Visit ComfyUI Online for ready-to-use ComfyUI environment
Extract specific rectangular region from mask for focused processing, enabling precise isolation and detailed attention in image tasks.
The CropMask node is designed to allow you to extract a specific rectangular region from a given mask. This can be particularly useful when you need to focus on a particular area of an image or mask for further processing or analysis. By specifying the coordinates and dimensions of the desired region, the CropMask node enables precise control over the portion of the mask you want to isolate. This functionality is essential for tasks that require detailed attention to specific areas, such as image editing, object detection, or any scenario where you need to work with a subset of the original mask.
The mask parameter represents the input mask from which you want to crop a specific region. This is the primary data that the node will process to extract the desired area.
The x parameter specifies the horizontal coordinate of the top-left corner of the cropping rectangle. It determines where the cropping will start along the x-axis. The value must be an integer, with a default of 0, a minimum of 0, and a maximum defined by MAX_RESOLUTION.
The y parameter specifies the vertical coordinate of the top-left corner of the cropping rectangle. It determines where the cropping will start along the y-axis. The value must be an integer, with a default of 0, a minimum of 0, and a maximum defined by MAX_RESOLUTION.
The width parameter defines the width of the cropping rectangle. It determines how wide the cropped region will be. The value must be an integer, with a default of 512, a minimum of 1, and a maximum defined by MAX_RESOLUTION.
The height parameter defines the height of the cropping rectangle. It determines how tall the cropped region will be. The value must be an integer, with a default of 512, a minimum of 1, and a maximum defined by MAX_RESOLUTION.
The output parameter MASK represents the cropped region of the input mask. This is the extracted portion of the mask based on the specified coordinates and dimensions, and it can be used for further processing or analysis.
x and y parameters to the top-left corner of the region you want to crop.width and height parameters to match the size of the area you need. Ensure that the dimensions do not exceed the boundaries of the original mask to avoid errors.x, y, width, or height parameters exceed the dimensions of the input mask.x and y coordinates, along with the width and height, are within the bounds of the input mask's dimensions. Adjust the parameters accordingly to fit within the mask's size.width or height parameters are set to values less than 1.width and height parameters are set to at least 1. Adjust the values to meet the minimum requirement.RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.