Nodes/ComfyTV/Grid Split
ComfyUI Node

Grid Split

Slice one image into tiles without touching the queue

By jtydhr88·Created 3 months ago·Updated about 16 hours ago· 725
Grid Split
  • image
  • images
  • image
force_run_token0
project_id
parent_output_id0
rows2
cols2
border0
outer_borderfalse
selected_index1

Nine-panel storyboard grid. A comic page. A spritesheet you need to carve up. Splitting an image into a grid is a boring, instant job - the kind of thing that should never cost a queue slot or a GPU. That's Grid Split's whole personality: it's one of ComfyTV's "instant browser-side tools," like Crop and Rotate, meaning the split happens on the frontend and you don't even need to Run anything. Slice it, pick a tile, move on.

ComfyTV is jtydhr88's canvas app (~190 stages, each its own node), and Grid Split lives under ComfyTV → Image alongside the other quick image tools.

How it works

You set how many rows and cols (each 1–10, default 2×2) and the node cuts the image along those lines. Two extras make it more useful than a blunt crop tool:

  • border (in source pixels) - a gutter cut out between cells. 0 is a plain split; a few pixels gives you clean separation for contact sheets or storyboard panels, like a real grid divider.
  • outer_border - whether that same border is also cut from the outer edges, turning the border into a margin around the whole grid.

The node outputs both images (the full batch of tiles, a COMFYTV_IMAGES) and a single image - the selected_index cell, 1-indexed, which you set by clicking a thumbnail in the node's output grid. So you can grab one tile for a detail pass and still have the whole batch for assembly.

The tooltips deserve a mention here: rows, cols, border, and outer_border are all marked "Hidden - driven by the Vue panel," and selected_index is marked "Internal - driven by clicking a thumbnail." That's the ComfyTV pattern: the widgets exist for the frontend UI to manage, and you operate the node through the panel, not by typing numbers into a box.

The hidden inputs, explained once

Every ComfyTV stage carries force_run_token, project_id, and parent_output_id - all marked "Internal" in the schema and populated by the frontend's projectStore for per-node Run. You never set them by hand.

Installing it

Same pack, same steps:

cd ComfyUI/custom_nodes
git clone https://github.com/jtydhr88/ComfyTV

or ComfyUI Manager ("ComfyTV"), full backend restart, then ComfyTV → Image. The one gotcha that bites people: on ComfyUI Desktop, macOS, or multiple installs, clone into the running instance by absolute path and confirm custom_nodes/ComfyTV/__init__.py exists (not nested), then fully restart. The pack declares no pip deps, and since this is a browser-side tool it won't hit the PyAV wall some video stages do.

Common issues

  • The split looks like it shaved pixels off the cells - that's border doing its job. Set it to 0 for a pure cut.
  • You want a 4×4 but the panel shows 2×2 - the rows/cols widgets are driven by the Vue panel; set them there, not in the node's widget list.
  • The output batch is right but the single image is the wrong tile - that's selected_index. Click the tile you want in the output grid.
CategoryComfyTV/Image

Inputs (9)

NameTypeDefaultDescription
force_run_tokenINT00–2147483647Internal — bumped on Run to invalidate ComfyUI's input cache.
project_idSTRINGInternal — populated by the projectStore on the frontend.
parent_output_idINT00–2147483647Internal — lineage parent set by spawn handlers on the frontend.
rowsINT21–10Number of grid rows. Hidden — driven by the Vue panel.
colsINT21–10Number of grid columns. Hidden — driven by the Vue panel.
borderINT00–4096Width (in source px) of the dividing border cut out between cells. 0 = plain split. Hidden — driven by the Vue panel.
outer_borderBOOLEANfalseWhether the border is also cut from the outer edges of the image (a margin around the whole grid). Hidden — driven by the Vue panel.
selected_indexINT11–999Internal — 1-indexed cell pick for image-batch stages. Driven by clicking a thumbnail in the node's output grid.
imageoptCOMFYTV_IMAGE

Outputs (2)

NameTypeDescription
imagesCOMFYTV_IMAGES
imageCOMFYTV_IMAGE