Nodes/IG Interpolation Nodes/🧩 IG Tile Image
ComfyUI Node

🧩 IG Tile Image

Slice a panorama into tiles without losing your VRAM

By IDGallagherΒ·Created 3 years agoΒ·Updated about a year agoΒ· 3
🧩 IG Tile Image
  • image
  • tiles
  • overlap_width
  • image_width
β—„tile_width512β–Ί
β—„min_overlap_width64β–Ί
β—„wrap_horizontalfalseβ–Ί

Some images are just too wide to feed through a sampler in one pass - a 4000px panorama, a stitched render that overflows your VRAM, a film strip you want to process frame-by-frame. IG Tile Image takes one wide image and slices it into fixed-width tiles, with a constant overlap between them, so you can process each tile separately and stitch the results back together.

It's an IO node under IG Nodes β†’ IO, and it pairs naturally with the pack's own stitchers (IG Stitch Images, IG Stitch Depth Tiles) and with the wider tiled-upscaling lineage - overlapping tiles plus a ControlNet Tile condition is the classic recipe for "upscale this to an arbitrary size on limited VRAM" without the tiles diverging into patchwork.

How it works

The math is deterministic and simple: stride = tile_width - min_overlap_width, so the actual overlap_width = tile_width - stride. Every tile is extracted by the same rule, which means anything downstream that needs the exact overlap can recompute it from (index, stride, tile_width, image_width) - that's why the node hands you overlap_width and image_width as outputs rather than making you guess.

Two extraction modes:

  • wrap_horizontal off (default): classic sliding-window tiling. Windows walk across the image at a constant stride.
  • wrap_horizontal on: windows slide past the right edge and wrap back to x=0, so the last tile may have a larger overlap than its neighbors. This is for panoramas that loop - the left and right edges get sewn together cleanly.

Two honest caveats. First, it tiles along the width only - you get one row of n tiles, each full height, not a 2D grid. This is a strip-tiler, not an Ultimate SD Upscale replacement. Second, there's a hard MAX_TILES = 2048 guardrail: if your tile count would exceed that it raises an error telling you to widen the tiles, increase the overlap, or resize - a blunt but welcome protection against an OOM that otherwise only shows up as a crash mid-graph.

The inputs that matter

  • tile_width (INT, default 512) - width of each tile. Match it to what your model handles comfortably.
  • min_overlap_width (INT, default 64) - how many pixels of overlap you want between neighbors. Zero gives you seamless, no-overlap slicing; some overlap is what lets a stitcher hide the seams.
  • wrap_horizontal (BOOLEAN, default off) - the panorama-loop mode above.

Outputs: tiles (an IMAGE batch, one entry per tile), overlap_width (the actual overlap, computed), and image_width (the original width, so a downstream stitcher knows the target). Feed tiles into your per-tile processing, then hand everything back to a stitcher with the two INTs.

Installing it

It ships in IDGallagher/ComfyUI-IG-Nodes ("IG Interpolation Nodes"). Use ComfyUI Manager and search "IG Interpolation Nodes", or:

cd ComfyUI/custom_nodes
git clone https://github.com/IDGallagher/ComfyUI-IG-Nodes

Restart and let ComfyUI install requirements.txt - this pack pulls in opencv-contrib-python, diffusers, matplotlib, and scikit-image, which is worth knowing because the stitchers need OpenCV even though this node itself is pure torch slicing. No model downloads.

One quirk to expect: this node is chatty. It prints a debug line for every tile (Tile 1/8:, start:, end:, stride:) straight to your ComfyUI console. Harmless, but if your log feels like a telemetry stream, that's this node. Also, the pack README is a literal smiley face and there's essentially no community discussion of this node by name - the source comments are the docs, and they're actually decent.

CategoryπŸ“ IG Nodes/IO

Inputs (4)

NameTypeDefaultDescription
imageIMAGEβ€”
tile_widthINT512β€”
min_overlap_widthINT64β€”
wrap_horizontalBOOLEANfalseβ€”

Outputs (3)

NameTypeDescription
tilesIMAGEβ€”
overlap_widthINTβ€”
image_widthINTβ€”