Nodes/ComfyUI 1hewNodes/Image Tile Merge
ComfyUI Node

Image Tile Merge

The other half of the tiling duo — feather-blend your tiles back into one image

By 1hew·Created about a year ago·Updated 8 days ago· 33
Image Tile Merge
  • tile
  • tile_meta
  • image
blend_strength1.00

If you've ever tiled an image for upscaling or tile-diffusion and then stared at a wall of visible seams when you tried to stitch it back together, this is the node that fixes that. It takes the tiles produced by the pack's Image Tile Split and blends them back into a single full-resolution image - with feathered, overlapping seams instead of hard cut lines.

The tile → process → merge loop is a core move in ComfyUI: split something big into pieces small enough for your VRAM, run your diffusion or upscale per-tile, then reassemble (the same idea behind Ultimate SD Upscale and ControlNet-Tile pipelines). The merge is where naive implementations fall apart, because tiles processed independently never match perfectly along their shared edges. This node handles the overlap properly rather than just pasting tiles side by side.

How it works

The key is that it doesn't work standalone - it needs the tile_meta dictionary that Image Tile Split emits. That dict carries the full layout: the original image size, the grid dimensions (rows × columns), the overlap width/height, and per-tile metadata (where each tile sits, its crop region, its actual size). The merge node reads that and reconstructs the original canvas.

For each tile it builds a per-pixel weight mask, then does a weighted average in the overlap regions. In the overlap band it uses cosine-gradient weights, which ramp the contribution of each tile smoothly from "not mine" to "mine" - that's what kills the seam. A blend_strength float (0 to 1, default 1) controls how wide that feathering band is; crank it down and the seams sharpen back up, crank it up for maximum blending.

It also quietly tolerates tile-count mismatches: if you give it more tiles than the grid expects it trims the tail, and if you give it fewer it pads with copies of the last tile rather than crashing. That's a nice resilience touch when a downstream node silently drops a frame.

The inputs that matter

  • tile - the IMAGE batch of tiles (one per grid cell, row-major).
  • tile_meta - the DICT output from Image Tile Split. This is the gotcha: it must come from a matching 1hew split node, because the format (keys like tile_metas, grid_size, overlap_width) is pack-specific. You can't feed it any random dict.
  • blend_strength - the seam softness dial. Leave at 1 to start.

Output is a single image at the original size. There's no mask output and no list handling - batch in, one image out.

Installing it

Same pack as the splitter: 1hewNodes. Install via ComfyUI Manager (search "ComfyUI 1hewNodes") or clone:

cd ComfyUI/custom_nodes
git clone https://github.com/1hew/ComfyUI-1hewNodes

Restart ComfyUI. No model downloads, no extra dependencies beyond what the pack already pulls (numpy, Pillow, scipy).

Common issues

The classic failure is wiring the wrong thing into tile_meta - if you connect an empty dict or a dict from a different node, you get a black image or a crash, not a helpful error. Keep the split and merge as a pair. Second gotcha: tile_meta is tied to the exact split layout, so if you change overlap, grid, or image size after splitting, the merge will misalign - re-split or the tiles won't line up. And remember this merges processed tiles fine as long as they stayed the same size; if your per-tile pass changed dimensions, crop them back before merging.

Category1hewNodes/image/tile

Inputs (3)

NameTypeDefaultDescription
tileIMAGE
tile_metaDICT
blend_strengthFLOAT1.000–1

Outputs (1)

NameTypeDescription
imageIMAGE