ComfyUI Node

Tile Plan

Decide the tiles once, or your seams will crawl

By Code2Collapse·Created 8 months ago·Updated a day ago· 58
Tile Plan
  • image
  • tile_plan
  • info
◄modetile size►
◄tile_size1024►
◄rows2►
◄cols2►
◄overlap96►
◄blendcosine►

Why this node exists at all

Tiled refinement is the standard trick for "I want more resolution than my card can hold in one pass": cut the frame into overlapping pieces, run each piece through a model, blend them back. The KB's upscaling doc puts the tile-ControlNet lineage in the "more invented detail" bucket, and the corpus line that matters is the memory trade - one 3090 owner upscaling with tiling on and off called tiling "far slower, but used less than a third of my 24GB".

Here is the failure nobody warns you about until it has already happened: a seam that sits still disappears into the picture. A seam that moves is the most distracting artefact on screen. And it moves whenever the tile boundaries are recomputed per frame, because a different rounding puts the split in a different place. So this pack turns the plan into an object you compute once and hand to everything else. That is this node's entire reason to exist.

What it does

You feed it one image - any frame, at the size you intend to tile, because only the dimensions are read - and it returns a TILE_PLAN: a frozen geometry of equal-sized tiles with per-side fade lengths. It does not touch pixels. Plans work on latents just as happily as on pixels, since this is pure arithmetic.

mode gives you two ways in. tile size takes tile_size, which the author is careful to describe as a maximum, not a target: tiles have to cover the frame exactly, so the node picks the largest size at or below what you asked that divides evenly, and tells you in the report what it actually chose. tile count takes rows and cols (1–16 each) if you would rather think in a grid.

overlap is how many pixels neighbouring tiles share - 64–128 is the usual band, and the author's note is honest about why it cannot be tiny: the blend has to hide any difference between two tiles inside that band, so a narrow overlap shows a seam. blend is cosine, linear or none. Take cosine. It is not a preference: the fade-in and fade-out are complementary halves of a cosine over the overlap, so they sum to exactly 1 across it - no seam, no brightness dip. linear does not have that property, and none is for finding out where the boundaries are.

The edge case the code handles properly is the frame border. Fades are stored per side, so a tile on the left edge does not fade into nothing on its left - it carries full weight to the border. Get that wrong and your picture darkens at the rim.

Outputs

tile_plan goes into Tile Split (and the same plan into Tile Merge). info is a text report: the grid it settled on and how much redundant area the plan processes. Overlap is not free, and redundancy is the number that says how much extra work you just signed up for - worth reading before a render rather than inferring it from the clock.

Install

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

Manager → "CustomNodePacks" also works. Restart and check the console:

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

Tiling nodes are pure torch and need nothing beyond the pack's shared dependencies - installed deliberately, never by running the whole requirements file over ComfyUI's torch:

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

  • A plan is size-specific. Build it from a 1920×1080 frame and then wire a 1280×720 clip into Tile Split and you get a hard error naming both sizes. That is the node being kind - the alternative is every tile landing on the wrong part of the frame.
  • tile_size is a ceiling. Asking for 1024 and getting 960 is correct behaviour, not a bug. The info report says which value it picked; read it.
  • Small tiles multiply the batch. Ten tiles over an 81-frame clip is 810 images heading into a sampler. The split node warns when the batch exceeds 64 images, and it is right to.
  • blend = none in a final render. It exists so you can see your grid. Leave it there and you get the seams you were trying to avoid.
  • One plan for the whole clip, always. Recomputing per frame is exactly how you reintroduce a crawling seam, and it looks like a model problem until you stare at the motion. The plan is a value passed around, not something every node works out for itself - the author, a compositor who announced this pack on r/comfyui in May 2026, wrote the plumbing that way on purpose.
Category🐺 C2C/🧰 Core/Tiling

Inputs (7)

NameTypeDefaultDescription
imageIMAGEAny frame at the size you will be tiling. Only its dimensions are read.
modeCOMBOtile size2 options: tile size, tile count
tile_sizeINT1024128–8192A MAXIMUM, not a target. Tiles are equal-sized and must cover the frame exactly, so the size chosen is the largest at or below this that does. The report says what it picked.
rowsINT21–16—
colsINT21–16—
overlapINT960–512How far neighbouring tiles share pixels. The blend has to hide any difference between two tiles inside this band, so too narrow shows a seam. 64-128px is usual.
blendCOMBOcosinecosine is the right answer: the fade-in and fade-out sum to exactly 1 across the overlap, so there is no seam and no brightness dip. 'none' is for checking where the tiles are.

Outputs (2)

NameTypeDescription
tile_planTILE_PLAN—
infoSTRING—