ComfyUI > Nodes > ComfyUI-Kie-API > KIE Grid Slice

ComfyUI Node: KIE Grid Slice

Class Name

KIE_GridSlice

Category
kie/helpers
Author
gateway (Account age: 5593days)
Extension
ComfyUI-Kie-API
Latest Updated
2026-04-05
Github Stars
0.02K

How to Install ComfyUI-Kie-API

Install this extension via the ComfyUI Manager by searching for ComfyUI-Kie-API
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-Kie-API 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

KIE Grid Slice Description

KIE_GridSlice divides grid images into equal tiles, offering flexible layouts and clean cropping.

KIE Grid Slice:

The KIE_GridSlice node is designed to efficiently divide a grid image into smaller, equal-sized tiles. This functionality is particularly useful for AI artists who need to process or analyze individual sections of a larger image. By slicing the image into tiles, you can focus on specific areas without altering the entire image. The node offers flexibility in terms of grid layout, allowing you to choose from predefined configurations such as 2x2, 2x3, or 3x3. Additionally, it provides options to crop borders and remove gutters, ensuring that the resulting tiles are clean and ready for further processing. This node is essential for tasks that require detailed examination or manipulation of image segments, enhancing your workflow by providing precise control over image slicing.

KIE Grid Slice Input Parameters:

image

This parameter represents the grid image batch that you want to slice. It should be a tensor with a shape of [B, H, W, 3], where B is the batch size, H is the height, W is the width, and 3 represents the RGB color channels. The image should be in float32 format with values ranging from 0 to 1.

grid

The grid parameter determines the layout of the tiles. You can choose from "2x2", "2x3", or "3x3" configurations. This choice affects how the image is divided into tiles, with each option resulting in a different number of tiles per image.

outer_crop_px

This parameter specifies the number of pixels to trim from each side of the image before slicing. It allows you to remove unwanted borders, ensuring that the tiles contain only the desired content. The value must be an integer between 0 and 8192, with a default of 0.

gutter_px

Gutter pixels are the spaces between tiles within the grid. This parameter lets you specify how many pixels to remove from these spaces, helping to create clean, distinct tiles. The value must be an integer between 0 and 8192, with a default of 0.

order

The order parameter determines the sequence in which tiles are arranged. You can choose between "row-major" and "column-major" ordering. This affects how the tiles are processed and can be important for maintaining the correct sequence in subsequent operations.

process_batch

This parameter controls whether the node processes only the first image in the batch or all images. You can select "first" to process just the initial image or "all" to process every image in the batch. This flexibility allows you to manage processing time and resources effectively.

log

The log parameter is a boolean that enables or disables console logging. When set to True, the node will output log messages to the console, which can be useful for debugging and monitoring the slicing process.

KIE Grid Slice Output Parameters:

tiles

The output of the KIE_GridSlice node is a batch of image tiles. Depending on the grid configuration chosen, each processed image will yield 4, 6, or 9 tiles. These tiles are stacked along the batch dimension, allowing for easy access and further processing. The tiles retain the original image's color information and are ready for any subsequent operations you may wish to perform.

KIE Grid Slice Usage Tips:

  • To ensure clean and precise tiles, adjust the outer_crop_px and gutter_px parameters according to the specific needs of your image. This can help remove unwanted borders and spaces between tiles.
  • Use the process_batch parameter to manage processing time effectively. If you only need to slice the first image in a batch, set this parameter to "first" to save resources.

KIE Grid Slice Common Errors and Solutions:

Unsupported grid '<grid>'

  • Explanation: This error occurs when an invalid grid configuration is specified.
  • Solution: Ensure that the grid parameter is set to one of the supported options: "2x2", "2x3", or "3x3".

IMAGE input must have shape [B, H, W, 3]

  • Explanation: The input image does not have the correct shape or number of channels.
  • Solution: Verify that your input image is a tensor with the shape [B, H, W, 3] and that it contains RGB color channels.

outer_crop_px must be >= 0

  • Explanation: The outer_crop_px parameter has been set to a negative value.
  • Solution: Adjust the outer_crop_px parameter to a non-negative integer.

gutter_px must be >= 0

  • Explanation: The gutter_px parameter has been set to a negative value.
  • Solution: Adjust the gutter_px parameter to a non-negative integer.

KIE Grid Slice Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Kie-API
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 Models, enabling artists to harness the latest AI tools to create incredible art.

KIE Grid Slice