Nodes/ComfyUI-YogurtNodes/Image Tile (Seam Mask) (Yogurt Nodes)
ComfyUI Node

Image Tile (Seam Mask) (Yogurt Nodes)

The crop-and-stitch upscale pipeline, minus the seams

By yogurt7771·Created 2 years ago·Updated 9 days ago· 1
Image Tile (Seam Mask) (Yogurt Nodes)
  • image
  • images
  • masks
  • tile_info
tile_size512
seam64
mask_blur0
mask_expand0

The dirty secret of big renders: models fall apart above native resolution, but nobody wants 512px images. The fix the community landed on is crop-and-stitch - cut the image into tiles, regenerate each tile at full quality, sew them back together. Image Tile (Seam Mask) is the "cut" stage, and it's built for the sewing part too: it hands back inpaint masks and a tile_info dict, so its sibling Image Untile (Seam Mask) can put everything back with feathered seams instead of visible tile boundaries.

This is one of the image nodes in the YogurtNodes pack (yogurt7771/ComfyUI-YogurtNodes). If you've ever fought with tile seams - the grid lines that show up after a tiled upscale - this pair is the fix.

How it works

You give it an image, a tile_size (default 512) and a seam overlap (default 64). It walks the image top-left to bottom-right, cropping out overlapping tile_size squares. Each tile gets an accompanying mask where white = inpaint and black = reference - meaning the mask tells the inpaint pass which parts of the tile are fair game to regenerate (the center) and which parts are context to preserve (the overlap edges). That's the seam-avoidance trick: the overlap carries the neighboring tile's pixels, so when the tiles are merged, the boundary isn't a cliff between two unrelated generations.

You get three outputs: images (the tiles), masks (one per tile), and tile_info - a dict recording tile positions, seam, blur/expand settings, and the original dimensions. Keep that dict; the untile node needs it to know where every tile goes.

Inputs that matter

  • tile_size - square tile edge. 512 is the sweet spot for SD-class models; go with your model's native resolution.
  • seam - overlap in pixels. More overlap = smoother merges but more tiles and more wasted re-generation. 64 is a reasonable starting point.
  • mask_blur / mask_expand - feather the inpaint mask edges (blur) or grow the region (dilate) before blur. Default 0 is fine until you see hard edges.

Outputs: images, masks, tile_info.

Install

Clone the pack once:

cd ComfyUI/custom_nodes
git clone https://github.com/yogurt7771/ComfyUI-YogurtNodes.git
cd ComfyUI-YogurtNodes
pip install -r requirements.txt

Or ComfyUI Manager → "YogurtNodes". It's under Yogurt Nodes / Image. Pure tensor math, no models to download.

Troubleshooting

  • "I get a weird single tile instead of a grid." If the image is smaller than tile_size, the node intentionally returns it as one tile with a full-white mask. That's a feature - the pipeline still works, it's just not tiling.
  • seam must be less than tile_size. The node raises if it isn't. A 512 tile with a 512 overlap is nonsense; lower one.
  • Tiles are cropped from the top-left. Edge tiles that don't reach tile_size get their mask/info adjusted, but if you resize tiles downstream, the tile_info becomes stale. Don't resize the tiles between tile and untile.
  • Not enough context for the inpaint. If your seams show artifacts, the model didn't have enough reference around the regenerated center - increase seam (and mask_expand a little) rather than cranking tile_size.

The full loop is: Tile → run each tile through your inpaint/regenerate (denoise ~0.4–0.6, or a model that respects masks) → Image Untile (Seam Mask) with the same tile_info. Done right, you get a big image with detail at native-model resolution and no grid.

CategoryYogurtNodes/Image

Inputs (5)

NameTypeDefaultDescription
imageIMAGEInput image. Output tiles are cropped from the top-left.
tile_sizeINT5128–16384
seamINT640–16384Overlap size in pixels.
mask_blurINT00–1024Gaussian blur kernel size (will be made odd).
mask_expandINT00–1024Grow (dilate) radius before blur.

Outputs (3)

NameTypeDescription
imagesIMAGE
masksMASK
tile_infoDICT