Nodes/MKRShift_Nodes/Image Combine Grid
ComfyUI Node

Image Combine Grid

Stitch tiled image batches back into one image — seams optional, metadata required

By criskb·Created 7 months ago·Updated 5 months ago· 0
Image Combine Grid
  • tiles
  • image
  • combine_info_json
  • summary
split_info_json
columns2
rows2
size_modepad
overlap_px32
canvas_width0
canvas_height0
original_width0
original_height0
content_x0
content_y0
blend_modefeather

This is the second half of the pack's tiling pair. MKRImageSplitGrid cut your big image into overlapping tiles so a model could chew on them; this node puts them back together into a full image, with seam-aware blending in the overlap regions. The two are designed to be used together, and the split node's split_info_json output is the connective tissue that makes the reassembly exact.

How it works

Give it the processed tiles batch and the split_info_json from the split node, and it reconstructs each source image by placing every tile at its grid position and blending the overlap regions. The blend strategy is controlled by blend_mode:

  • feather (default) - softens seams with a weight ramp across each tile's overlap. The choice for detail passes where a hard boundary would show.
  • average - flat averaging in overlaps. Simpler, faster, can leave a slightly muddy seam if neighboring tiles disagree.
  • center_crop - keeps only each tile's core and discards the overlap entirely. No blending at all; useful when tiles have been processed and you trust the cores.

The combine reads every relevant number from split_info_json - columns, rows, tile size, overlap, canvas size, content window, source batch count - so the manual fallback fields (columns, rows, canvas_width, original_width, content_x, etc.) only come into play when you don't have metadata. The pack's own docs are explicit: leave the manual size fields at defaults when split_info_json is connected.

Validation is strict, on purpose

This node does real bookkeeping, and it will not silently produce garbage. It raises clear errors when:

  • the tile batch size isn't divisible by rows × columns,
  • the actual tile dimensions don't match the split metadata,
  • source_batch from the metadata doesn't match the incoming tile count.

That last check means a batch-level mismatch - process 3 images through split but only hand 2 back - is caught instead of producing a corrupt half-stitched image. For a node in this pack, that level of rigor is the exception and it's welcome; most utility nodes just blend whatever they're given.

Outputs

  • image - the reconstructed image batch.
  • combine_info_json - summary of the stitched canvas and output size, for logging or a text node.
  • summary - one line about what was stitched.

Installing it

Part of the pack:

# ComfyUI Manager: search "MKRShift Nodes", install, restart.
# or:
cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes
# restart ComfyUI

No extra dependencies.

The round-trip and its one caveat

MKRImageSplitGrid → tiles → [upscale/detail/stylize] → MKRImageCombineGrid

Keep the middle stage honest: don't let it change tile dimensions or batch count. If it must resize, MKRImageSplitGrid's crop mode with center_crop blending on the way out is the more forgiving route, since overlap is discarded. For pad mode with feather blending - the default path - tile sizes must survive the middle stage or you get the loud validation error.

The one thing to remember: pad mode on the splitter pads the canvas so nothing is lost, and the combine (in pad mode) re-crops back to the original content window using the metadata. So if your combined output looks slightly larger than the input, that's the padded canvas - check the metadata, don't panic. Wire split_info_json straight across and the whole round-trip is lossless.

CategoryMKRShift Nodes/Utility/Layout

Inputs (13)

NameTypeDefaultDescription
tilesIMAGE
split_info_jsonSTRING
columnsINT21–64
rowsINT21–64
size_modeCOMBOpad2 options: pad, crop
overlap_pxINT320–2048
canvas_widthINT00–65535
canvas_heightINT00–65535
original_widthINT00–65535
original_heightINT00–65535
content_xINT00–65535
content_yINT00–65535
blend_modeCOMBOfeather3 options: feather, average, center_crop

Outputs (3)

NameTypeDescription
imageIMAGE
combine_info_jsonSTRING
summarySTRING