sampler_DynamicTileMerge
Stitch processed tiles back into one image
- tiles
- stich
- image
This is the other half of the pack's tiled-diffusion pair - it takes whatever came out of sampler_DynamicTileSplit (and whatever your sampler or upscale model did to those tiles in between) and reassembles it into one image, blending the overlapping edges so the seams don't show. This is the exact pattern behind Ultimate SD Upscale and Tiled Diffusion + Tiled VAE: process each tile independently to keep VRAM sane and detail high, then depend entirely on the merge step to make it look like one continuous image again.
How it works
You can't use this node on its own - it needs the stich bundle that sampler_DynamicTileSplit produced, which carries the tiling metadata (where each tile sits, how much it overlaps its neighbors, the original image dimensions) that this node uses to figure out how to blend everything back together. Feed it your processed tiles (same batch shape as what the split node emitted, just run through whatever sampler or upscale pass happened in between) plus that same stich object, and it hands back one merged image.
The inputs and outputs that matter
tiles(required, IMAGE) - your tile batch, after whatever processing you did to each one.stich(required,STICH3) - the tiling metadata from the matchingsampler_DynamicTileSplitcall. This has to be the samestichobject from the split that produced the tiles you're feeding in - mixing metadata from a different split will misalign everything.padding(required, default 64, minimum 0) - extra blend margin around each tile's overlap region. Bigger padding gives the merge more room to feather the transition; too little and the overlap zone from the split isn't enough on its own to hide the seam.- Output:
image- the reassembled, full-resolution result.
How to install it
Search ComfyUI-Apt_Preset in ComfyUI Manager, or clone it manually:
cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git
install.bat covers Windows dependencies; on Linux or Mac, open it and run the pip installs it lists yourself, or let ComfyUI Manager pick up anything missing on first load. No model files needed for this node specifically - it's pure image reassembly.
Common issues & troubleshooting
Visible seams even with padding cranked up. Padding here only helps if the split node's own overlap_rate gave it something to work with in the first place - if the source tiles barely overlapped, no amount of merge-side padding invents extra shared content. Go back to sampler_DynamicTileSplit and raise overlap_rate, then re-run the whole tile pass.
Errors about mismatched tile counts or dimensions. This means the tiles batch you're feeding in doesn't match what stich expects - usually because something between split and merge dropped, reordered, or resized a tile (a batch-altering node inserted mid-pipeline, for instance). Keep the tile batch's order and count exactly as the split node produced it all the way through to this node.
Reusing a stich object from an earlier run on a different image. Don't - stich is tied to the specific split call that produced it, including that image's original dimensions. Always pair a merge with the split that generated its stich, not a cached one from a previous graph run.
Result looks softer at the tile boundaries than the tile interiors. That's the blend doing its job - some softening at the seam is the trade-off for no visible hard edge. If it's too soft, that's a padding value set higher than the actual overlap supports; bring it back down closer to what overlap_rate on the split side actually produced.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| tiles | IMAGE | — | |
| stich | STICH3 | — | |
| padding | INT | 64 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |