ComfyUI Node

Untile Image

Put the tiles back together without a visible seam

By einhorn13·Created about a year ago·Updated about a year ago· 1
Untile Image
  • tiles
  • IMAGE
rows2
cols2
overlap64
original_width0
original_height0

Untile Image (class ImageUntiler) is the glue of this pack's tiling pair, and honestly the harder half to get right. ImageTiler just slices pixels - trivial. Sticking a batch of overlapping tiles back into one seamless image, without a line down every boundary, is where most hand-rolled tiling workflows fall apart. This node exists to do that properly.

You use it as the mirror of ImageTiler: split a big image, run each tile through your sampler or upscaler, then feed the processed tiles here with the same rows, cols and overlap values. If you're doing the tiled-diffusion high-res dance on a card that can't fit the full canvas, this is what turns your tile soup back into a usable image.

How it works. The mechanism is a weighted alpha blend, which is the correct way to merge overlapping tiles. The node creates an output canvas plus a matching "weights" canvas, then for each tile it builds a mask that fades linearly from 0 to 1 across the overlap zones. Each tile is multiplied by its mask and accumulated; at the end it divides by the accumulated weights and crops off the overlap padding. The linear fade means no tile has hard priority over its neighbour - the blend is symmetric, so a seam only shows if the content genuinely diverges.

Two details are worth knowing. First, the fade masks are forced solid (value 1) at the final image edges, so the outside border of the image isn't faded at all. Second, if you pass original_width and original_height, it crops back to exactly those dimensions; leave them at 0 and you get the padded grid size instead (the padded canvas rounds up to multiples of the tile grid). Wire the two INT outputs from ImageTiler straight in and you never think about it.

The inputs that matter. tiles (the processed tile batch), then rows, cols, overlap - must match what the Tiler used. original_width and original_height are optional but you almost always want them. Output is a single IMAGE.

One genuinely nice property: the tile batch can hold multiple source images at once. The node groups tiles by rows × cols, so a batch of 24 tiles with 2×2 grouping reassembles 6 images in one pass. Handy for batch upscaling jobs.

Install. Same story as the rest of the pack - no dependencies, no model files, pure torch ops:

cd ComfyUI/custom_nodes
git clone https://github.com/einhorn13/ComfyUI-ImageProcessUtilities

Restart ComfyUI and you're done.

Common issues. The ValueError when tiles count isn't divisible by rows × cols - count your tiles, or just keep the Tiler and Untiler settings identical. Set overlap to 0 and you get hard seams, because there's no shared data to blend. And note it can't crop smaller than the assembled grid, so if original_width is bigger than the padded output, the crop does nothing.

Categoryimage/tiling

Inputs (6)

NameTypeDefaultDescription
tilesIMAGE
rowsINT21–256
colsINT21–256
overlapINT640–1024
original_widthoptINT0
original_heightoptINT0

Outputs (1)

NameTypeDescription
IMAGEIMAGE