Visit ComfyUI Online for ready-to-use ComfyUI environment
Powerful node for dividing images into grids, aiding AI artists in detailed analysis and manipulation with edge-detection capabilities.
The GridImageSplitter
is a powerful node designed to facilitate the division of images into smaller, manageable sections or grids. This node is particularly beneficial for AI artists who need to process large images by breaking them down into smaller parts for detailed analysis or manipulation. The primary function of the GridImageSplitter
is to split an image into a specified number of rows and columns, allowing for both uniform and edge-detection-based splitting methods. This flexibility ensures that the node can handle a variety of image types and complexities, making it an essential tool for tasks that require precise image segmentation. By leveraging advanced techniques such as edge detection and border adjustment, the node ensures that the resulting image segments are clean and free from unwanted borders, thus maintaining the integrity and quality of the original image.
The image
parameter is the input image that you want to split into a grid. It should be provided as a tensor, typically in a format that the node can process, such as a PyTorch tensor. The image is expected to be in RGB format, and the node will handle the conversion to a suitable format for processing. There are no specific minimum or maximum values for this parameter, but the image should be of a reasonable size to ensure effective splitting.
The rows
parameter specifies the number of horizontal divisions you want to create in the image. This determines how many rows the image will be split into. The minimum value is 1, which means no horizontal split, and there is no strict maximum, but it should be a reasonable number based on the image size to avoid overly small segments.
The cols
parameter defines the number of vertical divisions in the image, determining how many columns the image will be split into. Similar to the rows
parameter, the minimum value is 1, and there is no strict maximum, but it should be chosen based on the image size to ensure the segments are of practical size.
The row_split_method
parameter allows you to choose the method for splitting the image into rows. Options typically include "uniform" for equal-sized splits and "edge" for edge-detection-based splits. The choice of method affects how the image is divided and can impact the precision of the segmentation.
The col_split_method
parameter functions similarly to row_split_method
, but it applies to the vertical splits. You can choose between "uniform" and "edge" methods, depending on whether you want equal-sized columns or columns based on detected edges.
The preview_img
output provides a visual representation of the original image with the split lines overlaid. This helps you verify the accuracy and placement of the splits before proceeding with further processing. It is useful for ensuring that the image has been divided as intended.
The stacked_images
output is a collection of the individual image segments resulting from the split operation. Each segment is resized to maintain the original aspect ratio and is returned as a tensor. This output is crucial for further processing or analysis of the individual image parts.
row_split_method
and col_split_method
based on the image content. Use "edge" for images with distinct features and "uniform" for more homogeneous images.rows
and cols
is appropriate for the image size to avoid creating segments that are too small to be useful.rows
and cols
parameters to values that are appropriate for the dimensions of the image.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.