Nodes/ComfyUI-SuperNodes/🐧 Stitch Tiles
ComfyUI Node

🐧 Stitch Tiles

Stitch processed tiles back with feathered seams β€” even after you upscaled them

By sonnyboxΒ·Created 11 months agoΒ·Updated 4 days agoΒ· 12
🐧 Stitch Tiles
  • tiles
  • stitch_info
  • IMAGE

🐧 Stitch Tiles is the second half of the pack's tiling pair: its sibling Create Tiles splits an image into an overlapping grid, you run whatever per-tile processing you're doing (upscaling, restoration, a second pass), and this node puts the pieces back together into a single image. The output is a clean reassembly with feathered blending across every seam, not a patchwork of visible rectangles.

Tiled processing exists because the models are the bottleneck, not the image. If you're running a generative upscaler like SeedVR2 on a big image, a single pass can exceed your VRAM; splitting into tiles that each fit in memory is the standard workaround (the "Tiled Diffusion / Ultimate SD Upscale" pattern from the upscaling playbook). This node is the reassembly half of that pattern, minus the parts that auto-do the splitting for you.

How it works

It reads its geometry from stitch_info - the metadata that Create Tiles emits alongside the tiles, containing each tile's coordinates and the original image dimensions. The two inputs are exactly that pair: tiles (the batch of processed tiles) and stitch_info.

The clever bit is that it detects scaling automatically. Compare the incoming tile size to the size recorded in the metadata, and if they differ - because you upscaled every tile before stitching - it scales all the coordinates and the final canvas to match. That means you can upscale each tile 2x, feed the results straight in, and get a 2x-larger stitched image out without telling it anything.

Blending works by weighted average: each tile gets a feather mask that fades to zero at its edges, all the tiles are summed into a canvas with a weight map, and the canvas is divided by that map. Overlapping regions blend smoothly instead of a hard cut. The feather radius is derived from the tile size, and it clamps itself so it can't go negative on small tiles. Output is a single IMAGE at the reassembled size, with the original batch restored.

Installing it

Part of ComfyUI-SuperNodes (GitHub: sonnybox/ComfyUI-SuperNodes) by SuperCC. ComfyUI Manager β†’ search SuperNodes β†’ install β†’ restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/sonnybox/ComfyUI-SuperNodes
# restart ComfyUI

Only dependency is matplotlib; needs a current ComfyUI (newer comfy_api API).

Where people get burned

The one hard error is a tile-count mismatch: if you drop or add tiles between Create and Stitch, it fails loudly with a "Mismatch: Info expects N tiles, but got M" message rather than silently producing a corrupted image - which is the good outcome. Keep tile count and order intact. The auto-scaling is tolerant of a uniform resize but assumes every tile scaled by the same factor, so upscale them all together. And if your tiled upscale is producing visible seams anyway, that's usually a processing-side problem (tiles not overlapping enough, or the model changing style per tile), not a stitching failure - overlap in Create Tiles is your lever, not the feather radius here.

CategorySuperNodes/Tiling

Inputs (2)

NameTypeDefaultDescription
tilesIMAGEThe batch of tiles to be stitched back together.
stitch_infoSTITCH_INFOMetadata generated by the CreateTiles node.

Outputs (1)

NameTypeDescription
IMAGEIMAGEβ€”