ComfyUI Node

Tile Split

Hand your clip to any model, one tile at a time

By Code2Collapse·Created 8 months ago·Updated a day ago· 58
Tile Split
  • image
  • tile_plan
  • tiles
  • tile_count
  • info

What it does

Takes an image batch, takes a TILE_PLAN from Tile Plan, and emits every tile of every frame as one big IMAGE batch. That is it. No sampler, no model, no magic - and that restraint is the whole design.

Every "tiled upscale" node in the ecosystem eventually welds itself to one sampler, one ComfyUI version, one model family, and ends up being a list of the four things it was tested against. This pack did the opposite: it turns the loop inside out, so you put whatever you want in the middle. A diffusion sampler, an upscale model, a LUT, three nodes in a row - the node does not care, because ComfyUI already knows how to push a batch through anything.

IMAGE ──> Tile Split ──> [ anything that takes and returns IMAGE ] ──┐
            │                                                        │
         TILE_PLAN ───────────────────────────────────────────────> Tile Merge

The one thing you must understand: batch order

The output is tile-major: every frame of tile 0, then every frame of tile 1, and so on. Not frame-major.

That is a deliberate choice and it is the difference between a video refiner working and not working. A model that reads its batch as a sequence sees one tile's entire time range contiguously, which is what lets it be temporally consistent within that tile. Feed it frame-major order and it sees a batch that jumps around the frame every frame, so it deflickers across tiles instead of across time. The node's own info output spells this out, which is nice, because you cannot tell tile-major from frame-major by looking at the images.

Inputs and outputs

Two required inputs: image and tile_plan. The plan must match the image's dimensions, or you get an explicit error rather than silently wrong tiles - a new plan is cheap, so build it from the footage you are actually tiling.

Three outputs:

  • tiles - the IMAGE batch, tile-major.
  • tile_count - the number of tiles (not images). Useful for asserting your graph is sane.
  • info - the report: tiles × frames = images out, the batch-order warning, and the rule for whatever you wire next.

That rule is the contract for the rest of the graph: whatever comes next must return the same number of images in the same order. It may change their size - as long as every tile changes by the same factor, because Tile Merge works out the scale from the tiles themselves.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/Code2Collapse/ComfyUI-CustomNodePacks.git

ComfyUI Manager → "CustomNodePacks" is the one-click version. Restart, then confirm:

[C2C] CustomNodePacks: 142 nodes loaded (...) - 0 failed

Tiling needs no models and no extra packages beyond the pack's shared three. Install those by hand so you do not clobber ComfyUI's own torch with a requirements file:

pip list | grep -i "opencv\|scipy\|safetensors"
pip install opencv-python>=4.7.0 scipy>=1.10.0 safetensors>=0.4.0

Where people get burned

  • Memory, and this is the big one. The batch is tiles × frames. A 10-tile plan over 81 frames is 810 images arriving at your sampler in one go, and most samplers will simply try to do it and die. The node warns above 64 images in the batch - treat that warning as real, and either use fewer tiles or feed a node that batches internally.
  • A refiner that changes the count. Anything that drops, duplicates or reorders frames breaks the merge. You will get a clear error about the count not dividing evenly, but you will have paid for the render first.
  • Non-uniform scale. A refiner that changes aspect ratio per tile cannot be undone - Tile Merge detects a non-uniform ratio between axes and tells you to set scale explicitly, but the right fix is a refiner that preserves aspect.
  • The plan must be the same object you built for that footage. Two "identical" plans built separately are fine; a plan from a different resolution is not.
  • Feeding a whole clip when you meant one frame. This node is happy to do it; if you wanted a single still, slice the batch first. The KB's own advice on tiled upscaling is that tiling costs time to save VRAM - know which one you are buying before you queue 800 images.
Category🐺 C2C/🧰 Core/Tiling

Inputs (2)

NameTypeDefaultDescription
imageIMAGE—
tile_planTILE_PLAN—

Outputs (3)

NameTypeDescription
tilesIMAGE—
tile_countINT—
infoSTRING—