.internal/image_untile
Stitch an upscaled tile batch back into one seamless image
- tiles
- image
- help_text
The mirror image of the tiling step - literally. Where __y_i_u__image_tile cuts an image into a batch of overlapping tiles, __y_i_u__image_untile puts them back together, at whatever scale your upscaler applied, with the overlap zones blended so you don't get a quilt of visible seams.
It's an .internal node, hidden from the menu by the pack's front-end code, and it does its main work inside the yiuUpscaleLoopStart/END loop: END calls it on the upscaled tiles every iteration before recursing. When you open a loop workflow saved by this pack, this is the node sitting right before END, and it's the reason the final stitched image comes out clean.
How it works
It takes the tile batch and lays it back into a canvas sized round(orig_h × scale) × round(orig_w × scale). Each tile is placed at its scaled position using the same rows × cols grid and overlap layout that produced it. The overlap regions are blended with a linear weight ramp - a tile contributes fully at its core and fades toward its edges, so where two tiles overlap, the result is a weighted crossfade rather than a hard boundary. A weight buffer normalizes the accumulation, which is what makes the seams disappear.
scale matters: it's the factor your upscaler applied this pass, and it must match what the tiles were upscaled by. The loop feeds it from the current step's scale_this_time.
Inputs
- tiles - the upscaled IMAGE batch.
- scale - the upscale factor for this pass (default 1.0).
- orig_h / orig_w - the original image dimensions (required - the node errors if they're 0).
- rows / cols, overlap_x / overlap_y - the layout, from the same tiling_meta plan the tile step used.
Outputs
image - the merged full image, plus the pack's usual help_text string.
Installing it
Part of yiu_comfy_nodes by leizingyiu:
cd ComfyUI/custom_nodes
git clone https://github.com/leizingyiu/yiu_comfy_nodes
restart ComfyUI. No extra dependencies.
Where people get burned
- Layout must match the tile step, exactly. Same rows, cols, overlap - if you hand-typed numbers that differ from what tiling_meta computed, the tiles land in the wrong cells and you get a scrambled stitch. Feed both sides from the same plan.
- The batch size is validated. The node raises a clear error if the tile count isn't divisible by
rows × cols, so a dropped or duplicated tile doesn't silently corrupt the output. scaleis a real input, not a display. Set it to the actual factor your upscaler applied. Leave it at the default 1.0 when your upscaler was fixed-factor and it'll come out at the wrong size - which is precisely why the loop wiresscale_this_timeinto it.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| tiles | IMAGE | — | |
| scale | FLOAT | 1.0000.001–64 | — |
| orig_h | INT | 00–16384 | — |
| orig_w | INT | 00–16384 | — |
| rows | INT | 11–9999 | — |
| cols | INT | 11–9999 | — |
| overlap_x | INT | 00–16384 | — |
| overlap_y | INT | 00–16384 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| help_text | STRING | — |