Visit ComfyUI Online for ready-to-use ComfyUI environment
Create image masks from specific regions for targeted image processing tasks like compositing and filtering.
The FS: Image Region To Mask node is designed to create a mask from a specific region of an image. This node is particularly useful for isolating and manipulating specific parts of an image, allowing you to focus on particular areas for further processing or analysis. By dividing the image into a grid of rows and columns, you can select a specific cell within this grid to generate a mask. This mask can then be used in various image processing tasks, such as compositing, filtering, or applying effects to only the masked region. The main goal of this node is to provide a flexible and efficient way to target and work with specific regions within an image, enhancing your ability to create detailed and precise AI-generated art.
This parameter represents the input image from which the mask will be generated. The image should be in a format that the node can process, typically a tensor representation of the image.
This parameter specifies the number of rows into which the image will be divided. The default value is 3, with a minimum of 1 and a maximum of 32. Adjusting this value changes the granularity of the grid, affecting how finely the image is divided.
This parameter determines the number of columns into which the image will be divided. The default value is 1, with a minimum of 1 and a maximum of 32. Similar to the rows parameter, changing this value alters the grid's granularity.
This parameter indicates the specific row of the grid that you want to select for masking. The default value is 0, with a minimum of 0 and a maximum of 32. This value should be within the range of the total number of rows specified.
This parameter specifies the particular column of the grid to be selected for masking. The default value is 0, with a minimum of 0 and a maximum of 32. This value should be within the range of the total number of columns specified.
The output is a mask that corresponds to the selected region of the image. This mask is a binary tensor where the selected region is marked with ones (1) and the rest of the image is marked with zeros (0). This mask can be used in subsequent image processing tasks to isolate and manipulate the selected region.
rows
and columns
parameters to create a grid that best fits the area you want to mask. Then, use the chosen_row
and chosen_column
parameters to select the exact cell.ImageCompositeMasked
to apply effects or transformations only to the masked region, enhancing your creative control over the image.chosen_row
or chosen_column
value exceeds the number of rows or columns specified.chosen_row
and chosen_column
values are within the range of the total number of rows and columns defined by the rows
and columns
parameters.rows
or columns
parameter is set to a value less than 1.rows
and columns
parameters to a value of at least 1 to avoid this error.© Copyright 2024 RunComfy. All Rights Reserved.