ComfyTV/Imagegenerated

Grid Split(GridSplitStage)

Grid Split (GridSplitStage) divides a ComfyTV image into a grid of cells based on the configured number of rows and columns.

Grid Split Stage

image
images
image
rows
2
cols
2
border
0
outer_border
ComfyTV

Description

Grid Split (GridSplitStage) divides a ComfyTV image into a grid of cells based on the configured number of rows and columns. It is part of the ComfyTV/Image category.

The node can split the image with no gutter, with cut-out dividers between cells, or with an additional cut-out margin around the entire grid. It provides both a plural COMFYTV_IMAGES output for image collections and a singular COMFYTV_IMAGE output for workflows that need a single image connection.

The main grid controls are hidden from the standard node widget area and are driven by the Vue panel.

Inputs

NameTypeRequiredDefaultRangeDescription
rowsINTYes21 to 10, step 1Number of grid rows. Hidden and driven by the Vue panel. The default produces two rows.
colsINTYes21 to 10, step 1Number of grid columns. Hidden and driven by the Vue panel. The default produces two columns, so the default layout is a 2x2 grid.
borderINTYes00 to 4096, step 1Width, in source pixels, of the dividing border cut out between cells. 0 means a plain split with no divider. Hidden and driven by the Vue panel.
outer_borderBOOLEANYesfalsetrue or falseWhether the border is also cut from the outer edges of the image, creating a margin around the whole grid. Hidden and driven by the Vue panel.
imageCOMFYTV_IMAGENoNoneNot applicableThe source image to split. Connect a ComfyTV image here. If no image is connected, there is no source image for the grid split.

The border value is measured in source-image pixels. The border is cut out of the image rather than drawn on top, so increasing it removes pixels from between cells instead of adding a visible grid line.

Outputs

TypeDescription
COMFYTV_IMAGESPlural ComfyTV image output carrying the split result as an image collection. Use this output when the downstream node expects multiple images or a ComfyTV image collection.
COMFYTV_IMAGESingular ComfyTV image output. Use this output when the downstream node expects one image rather than a collection.

Both outputs use ComfyTV image types rather than the standard ComfyUI IMAGE type. Connect them only to inputs that accept the corresponding COMFYTV_IMAGES or COMFYTV_IMAGE type.

Usage Notes

  • Use rows and cols to define the grid layout. The default is a 2x2 split, and each dimension can be set from 1 to 10.
  • Keep border at 0 for a plain split where the cells meet directly with no cut-out divider.
  • Set border to a positive value to cut a divider between cells. The value is in source pixels and can be up to 4096.
  • Leave outer_border disabled to keep the outer edges of the grid flush with the image boundary.
  • Enable outer_border when you want the border width to also be removed from the outer edges, producing a margin around the complete grid.
  • The grid controls are hidden in the node and driven by the Vue panel, so adjust the layout through the panel rather than expecting standard visible row and column widgets.
  • A 1x1 grid with border set to 0 represents the smallest grid configuration and does not require any between-cell dividers.
  • Connect a COMFYTV_IMAGE to the optional image input before using the node as part of a ComfyTV image workflow.

Comments

Sign in with GitHub to join the discussion.

Loading comments…