Nodes/ComfyUI-YCNodes/YC Image Tile
ComfyUI Node

YC Image Tile

Split a big image into overlapping tiles — the cheap ticket to upscaling past VRAM

By yichengup·Created 2 years ago·Updated 4 months ago· 48
YC Image Tile
  • image
  • IMAGE
  • tile_width
  • tile_height
  • overlap_x
  • overlap_y
rows2
cols2
overlap0.00
overlap_x0
overlap_y0

If your GPU chokes on a 4K image but is perfectly happy with a 512² patch, tiling is how you cheat physics: split the frame, process each tile, stitch back. That's the entire trick behind tiled-diffusion upscaling, and this node is the "split" half of the split-and-stitch pair - the merge side is YCImageUntile, also in this pack.

What it's actually for

Tiled diffusion upscaling works because you don't sample the whole huge image at once - you denoise overlapping tiles and blend them, which lets an 8GB card do what a 24GB card does, at the cost of time. The other classic use is a detail pass: send each tile through a face-detailer or ControlNet-tile upscale and glue the results back. Either way, you start by cutting the image into a grid, and that's this node's one job.

How it works

You give it a grid size and it slices the image into rows × cols tiles, returned as a single batch (row-major: tile 0 is the top-left, tile 1 is one to the right, and so on). The subtle part is overlap:

  • overlap - a fraction (0 to 0.5) of each tile size
  • overlap_x / overlap_y - extra fixed pixels of overlap in each direction

The node clamps total overlap to half a tile, and if you ask for 1 row or 1 column it zeroes the overlap on that axis - otherwise a single tile would be padded with empty space. Neighboring tiles share the overlapped pixels, which is exactly what lets the upscaler see context past tile edges and stops the patchwork artifacts people hit when tiles diverge.

Inputs and outputs

Set these:

  • rows / cols - grid dimensions (1–256 each)
  • overlap - fraction of tile size
  • overlap_x / overlap_y - pixel overlap

The outputs are the real payload:

  • IMAGE - the tile batch
  • tile_width / tile_height - per-tile size
  • overlap_x / overlap_y - the actual overlap values it used

Those last four are the secret. YCImageUntile needs identical values to stitch correctly, so wire them straight across instead of retyping - it's the difference between a seamless composite and a jigsaw that doesn't fit.

Install

It's part of ComfyUI-YCNodes. ComfyUI Manager → search "ComfyUI-YCNodes" → install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/yichengup/ComfyUI-YCNodes

Restart, done. Dependencies: torch, numpy, pillow, opencv-python, scipy. No model downloads.

Where people get burned

  • Mismatched grid or overlap. If rows/cols or overlaps differ between this node and YCImageUntile, tiles get placed at the wrong offsets and you get scrambled or smeared output. Feed the tile/overlap outputs straight through.
  • Untile only feathers one side. The untile node blends overlap from the top and left only - good enough for most upscales, but you can see a directional seam in heavy-overlap work. If it shows, drop overlap to the minimum that keeps tiles from diverging.
  • Overlap trades against canvas size. More overlap means bigger tiles and slower sampling per pass. Start at 0.1–0.25 and only raise it if tiles diverge.

For a node with two parameters and a grid, it does exactly what tiled upscaling needs - and pairs with its sibling in the pack instead of making you hunt through a mega-pack for the matching untile.

CategoryYCNode/Image

Inputs (6)

NameTypeDefaultDescription
imageIMAGE
rowsINT21–256
colsINT21–256
overlapFLOAT0.000–0.5
overlap_xINT00–8192
overlap_yINT00–8192

Outputs (5)

NameTypeDescription
IMAGEIMAGE
tile_widthINT
tile_heightINT
overlap_xINT
overlap_yINT