ComfyUI > Nodes > ComfyUI-AutoSplitGridImage > GridImageSplitter

ComfyUI Node: GridImageSplitter

Class Name

GridImageSplitter

Category
image/processing
Author
stormcenter (Account age: 4385days)
Extension
ComfyUI-AutoSplitGridImage
Latest Updated
2025-01-06
Github Stars
0.03K

How to Install ComfyUI-AutoSplitGridImage

Install this extension via the ComfyUI Manager by searching for ComfyUI-AutoSplitGridImage
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-AutoSplitGridImage in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

GridImageSplitter Description

Powerful node for dividing images into grids, aiding AI artists in detailed analysis and manipulation with edge-detection capabilities.

GridImageSplitter:

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.

GridImageSplitter Input Parameters:

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.

rows

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.

cols

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.

row_split_method

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.

col_split_method

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.

GridImageSplitter Output Parameters:

preview_img

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.

stacked_images

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.

GridImageSplitter Usage Tips:

  • To achieve the best results, choose the 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.
  • Ensure that the number of rows and cols is appropriate for the image size to avoid creating segments that are too small to be useful.

GridImageSplitter Common Errors and Solutions:

Image format not supported

  • Explanation: The input image is not in a supported format or is not a tensor.
  • Solution: Ensure that the image is provided as a PyTorch tensor in RGB format.

Invalid number of rows or columns

  • Explanation: The specified number of rows or columns is not suitable for the image size.
  • Solution: Adjust the rows and cols parameters to values that are appropriate for the dimensions of the image.

Split method not recognized

  • Explanation: The specified split method is not one of the recognized options.
  • Solution: Use either "uniform" or "edge" as the split method for both rows and columns.

GridImageSplitter Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-AutoSplitGridImage
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

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.