Nodes/SimpleTiles/TileMerge (Dynamic)
ComfyUI Node

TileMerge (Dynamic)

Stitch tiles back together without touching a calculator

By kinfolk0117·Created 3 years ago·Updated 2 years ago· 60
TileMerge (Dynamic)
  • images
  • tile_calc
  • IMAGE
blend64

TileMerge (Dynamic) is the other half of the SimpleTiles tiled-inference loop, and the reason the "Dynamic" pair beats the legacy nodes: it doesn't make you do any math. DynamicTileSplit hands it a TILE_CALC object, and the merge figures out the final image size, the tile layout, and the seam blending all by itself. If you're running the split → sampler → merge pattern that made this pack famous, this is the node on the far end of the wire.

The setup it belongs in is the standard tiled-upscale chain: DynamicTileSplit chops your huge image into overlapping tiles, a KSampler (optionally gated by ControlNet Tile so the tiles don't diverge, or IP-Adapter for style) denoises each one, and TileMerge (Dynamic) puts them back. The whole job of this node is to make that last step invisible - no seams, no patchwork.

How it works

The merge reads (overlap, image_height, image_width, offset) from the TILE_CALC input and rebuilds the exact same grid the split used, in the same center-last order. It starts with a blank canvas and lays tiles down one at a time. Each new tile is feathered over a blend-pixel band: the edge pixels fade linearly from 0 to 1, so where a new tile overlaps an already-placed one, the new one blends into the old instead of hard-cutting.

The clever bit is that the blend ramp only applies where a previous tile already sits. The first tile goes down at full weight (nothing to blend against), and overlaps get feathered. Because tiles are laid center-last, the center tile ends up on top at full strength - which is why the middle of the image stays the most detailed.

The inputs

Just three, and the tile_calc does most of the work:

  • images: the tile stack, straight from DynamicTileSplit (via your sampler).
  • tile_calc: the object DynamicTileSplit output. This is where the final dimensions come from - don't mix it up with a split from a different image.
  • blend (default 64): how many pixels the feather spans. The rule from the README, and it's a real one: blend must be less than overlap. If it's not, the ramp never reaches full weight inside the overlap zone and you get a visible seam. Defaults are safe together (64 blend, 128 overlap), so only think about this if you're tuning.

Output

A single IMAGE at the original resolution - wire it to a Save Image / Preview and you're done. That's the whole output story, and honestly the whole appeal: one wire out, no final_height / final_width ports to fill like the legacy TileMerge needs.

Installing it

Same as the rest of the pack - you already installed it if you can see DynamicTileSplit. ComfyUI Manager → search SimpleTiles, or:

cd ComfyUI/custom_nodes
git clone https://github.com/kinfolk0117/ComfyUI_SimpleTiles

Restart ComfyUI. No extra dependencies, no models, just PyTorch.

Common issues

  • Seams down the seams of the image. Almost always blend ≥ overlap. Lower blend or raise overlap.
  • Tile dimensions changed between split and merge. The merge infers tile size from the images tensor itself, not from the tile_calc. If you resized or rebatched the tiles in between (rebatching to smaller batches for very large images is a common move), the merge recomputes positions from the new tile size and the layout silently goes wrong.
  • Wrong image dimensions out. You passed a tile_calc from a different split. The TILE_CALC is just a small tuple under the hood, so it's easy to grab the wrong one in a busy workflow. Keep the split and merge pair visually paired.
Categoryutils

Inputs (3)

NameTypeDefaultDescription
imagesIMAGE
blendINT640–4096
tile_calcTILE_CALC

Outputs (1)

NameTypeDescription
IMAGEIMAGE