ComfyUI  >  Nodes  >  ComfyUI Easy Use >  imageSplitGrid

ComfyUI Node: imageSplitGrid

Class Name

easy imageSplitGrid

Category
EasyUse/Image
Author
yolain (Account age: 1341 days)
Extension
ComfyUI Easy Use
Latest Updated
6/25/2024
Github Stars
0.5K

How to Install ComfyUI Easy Use

Install this extension via the ComfyUI Manager by searching for  ComfyUI Easy Use
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI Easy Use 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

imageSplitGrid Description

Divide image into grid for segmentation, object detection, and manipulation with aspect ratio preservation.

imageSplitGrid:

The easy imageSplitGrid node is designed to divide an image into a grid of smaller sub-images based on specified row and column parameters. This node is particularly useful for tasks that require processing or analyzing different sections of an image independently, such as in image segmentation, object detection, or creating image tiles for further manipulation. By splitting an image into a grid, you can focus on smaller, more manageable parts of the image, which can enhance processing efficiency and accuracy. This node ensures that each sub-image retains the original image's aspect ratio and resolution, making it a powerful tool for detailed image analysis and manipulation.

imageSplitGrid Input Parameters:

images

This parameter expects an image tensor that you want to split into a grid. The image should be in a format that the node can process, typically a 4D tensor with dimensions representing batch size, height, width, and channels. The input image serves as the source from which the grid of sub-images will be generated.

row

This parameter specifies the number of rows into which the image will be divided. It determines the vertical segmentation of the image. The default value is 1, with a minimum value of 1 and a maximum value of 10. Adjusting this parameter allows you to control the number of horizontal slices in the grid.

column

This parameter specifies the number of columns into which the image will be divided. It determines the horizontal segmentation of the image. The default value is 1, with a minimum value of 1 and a maximum value of 10. Adjusting this parameter allows you to control the number of vertical slices in the grid.

imageSplitGrid Output Parameters:

images

This output parameter returns a tensor containing the sub-images generated from the original image. Each sub-image corresponds to a cell in the grid defined by the row and column parameters. The output tensor concatenates these sub-images along the batch dimension, allowing for easy further processing or analysis.

imageSplitGrid Usage Tips:

  • To achieve optimal results, ensure that the input image has a resolution that can be evenly divided by the specified row and column values.
  • Use this node to preprocess images for tasks that require analyzing specific regions, such as object detection or image segmentation.
  • Experiment with different row and column values to find the best grid configuration for your specific use case.

imageSplitGrid Common Errors and Solutions:

"IndexError: index out of range"

  • Explanation: This error occurs when the specified row and column values result in grid cells that exceed the image dimensions.
  • Solution: Ensure that the row and column values are within the valid range and that the image dimensions can be evenly divided by these values.

"TypeError: expected Tensor as input"

  • Explanation: This error occurs when the input image is not in the expected tensor format.
  • Solution: Convert the input image to a 4D tensor format with dimensions representing batch size, height, width, and channels before passing it to the node.

imageSplitGrid Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI Easy Use
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.