.internal/image_tile
Cut one image into an overlapping tile batch (the loop's quiet helper)
- image
- tiles
- help_text
Splitting a big image into overlapping tiles is the standard trick for upscaling beyond your VRAM budget - the community calls it tiled diffusion, and it's the difference between "upscale to 10k" and "upscale to whatever fits on the card." __y_i_u__image_tile is this pack's implementation of that cut: it takes a full image and a layout (rows, cols, overlap) and returns a batch of tiles.
It's an .internal node - hidden from the menu by the pack's front-end code - and it does its real work inside the yiuUpscaleLoopStart/END loop, where START calls it internally on every iteration. You'll typically only see it in a saved workflow, wired between a tiling-meta node and your upscaler. Which is exactly what it's for: stand-alone tiling for custom pipelines.
How it works
Given the original height/width, it divides the image into a rows × cols grid of core rectangles. Interior edges are extended by the overlap amount on each side (edge tiles stay flush at the image border), so every tile except the edges overlaps its neighbours. All tiles get padded to the batch's max tile size so they form a clean rectangular batch tensor for your upscaler. Because the tiles overlap, when they come back from the upscaler and get stitched with matching overlap values, the seams crossfade instead of showing a line.
The layout inputs (rows, cols, overlap_x, overlap_y, orig_h, orig_w) are expected to come from __y_i_u__tiling_meta, which computes them consistently for both this node and the untile node.
Inputs
- image - the full image to cut.
- orig_h / orig_w - the original dimensions (matters if the image is already downscaled; 0 falls back to the image's own size).
- rows / cols - the grid, at least 1 each.
- overlap_x / overlap_y - seam width in px.
Outputs
tiles - the IMAGE batch, and 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, done. No extra dependencies.
Where people get burned
- It's hidden on purpose. You can't add it from the right-click menu. If you genuinely want it, the loop's saved workflows are where you'll find it in the wild - and the loop uses the same code internally, so you usually don't need to.
- Overlap on all four interior sides, not the outside. Edge tiles stay flush. That's correct behavior for stitching, but if you expected a uniform border everywhere, adjust your mental model.
- Layout numbers must match the untile side. Feed this node a
rows/colsplan from a different source than the one your untile uses, and the batch won't stitch. Use tiling_meta for both.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| 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 |
|---|---|---|
| tiles | IMAGE | — |
| help_text | STRING | — |