Nodes/yiu_comfy_nodes/.internal/tiling_meta
ComfyUI Node

.internal/tiling_meta

The hidden node that decides how to cut your image up

By leizingyiu·Created about a year ago·Updated 3 months ago· 1
.internal/tiling_meta
  • image
  • orig_h
  • orig_w
  • rows
  • cols
  • overlap_x
  • overlap_y
  • help_text
max_tile_size1024
min_tile_overlap_px64
tile_overlap_ratio0.10

This is one of the pack's hidden .internal nodes - the display name is literally .internal/tiling_meta, and it's stripped out of the node menu by the pack's own front-end code. You'll usually meet it inside a saved workflow rather than by adding it yourself, and it has one job: work out the tiling layout for an image. Given the image and your tiling constraints, it returns the row/column count and the pixel overlap to use.

It exists so that the tiling plan is computed once and shared: the plan it produces (rows, cols, overlap_x, overlap_y) is exactly what both the tile node and the untile node consume, so a tile/untile pair can never disagree about the layout. That consistency is the whole point - the tile side and the stitch side must use identical numbers or the seams don't line up.

How it works

The math is simple and predictable. rows = ceil(height / max_tile_size), cols = ceil(width / max_tile_size), and the overlap is the larger of two rules: your fixed min_tile_overlap_px, or round(tile_size × tile_overlap_ratio). The ratio rule scales the seam up as tiles grow, the pixel rule guarantees a sane minimum on small images. The one switch worth knowing: max_tile_size set to 0 disables tiling entirely - you get rows=1, cols=1, zero overlap, which is how the upscale loop runs "whole image per step."

Inputs

  • image - used to read height/width for the layout math.
  • max_tile_size (default 1024; 0 disables tiling)
  • min_tile_overlap_px (default 64)
  • tile_overlap_ratio (default 0.1, 0–1)

Outputs

orig_h, orig_w (the source dimensions), rows, cols (the grid), overlap_x, overlap_y (the seam widths - always equal here), plus the pack's help_text string. Wire these into an image_tile and image_untile pair.

Installing it

It ships in yiu_comfy_nodes by leizingyiu:

cd ComfyUI/custom_nodes
git clone https://github.com/leizingyiu/yiu_comfy_nodes

then restart ComfyUI (or find the pack in Manager). No dependencies beyond torch/numpy/Pillow.

Where people get burned

  • Don't hand-place it in the menu. The front-end hides all .internal nodes, so you can't add it from the menu - which is fine, because you're not supposed to. It appears in workflows saved by the upscale loop or anyone who explicitly enabled it.
  • The image input is read for size only. Feeding a different-resolution image than the one you'll actually tile gives you a layout for the wrong image. Keep the same source in.
  • Overlap clamps at tile size minus one. If your ratio plus minimum would make the overlap bigger than the tile itself, it's clamped so you can't create zero-sized cores. Don't push tile_overlap_ratio above ~0.25 expecting proportional behavior at the extreme; it caps out.
Category_yiu_nodes/internal

Inputs (4)

NameTypeDefaultDescription
imageIMAGE
max_tile_sizeINT10240–16384
min_tile_overlap_pxINT640–16384
tile_overlap_ratioFLOAT0.100–1

Outputs (7)

NameTypeDescription
orig_hINT
orig_wINT
rowsINT
colsINT
overlap_xINT
overlap_yINT
help_textSTRING