Nodes/ComfyUI-UtilsCollection/High Resolution Tile Split & VAE Encode
ComfyUI Node

High Resolution Tile Split & VAE Encode

Tiled diffusion without the patchwork

By silveroxides·Created 2 months ago·Updated about 7 hours ago· 24
High Resolution Tile Split & VAE Encode
  • image
  • vae
  • model
  • depth_map
  • tile images
  • tile latents
  • tile layout
  • model
tile_modetile_size
tile_width1024
tile_height1024
rows2
columns2
overlap128
mask_profilecosine
feather_width1.00
mask_strength1.00
differential_diffusion_modeoff
differential_diffusion_value1.000
depth_influence1.00

Tiled diffusion is how you do detail-focused high-res work on a GPU that can't see the whole canvas: you slice the image into overlapping chunks, sample each one, and stitch them back. This node is the front half of that pipeline - it takes one pre-upscaled image, splits it into overlapping tiles, and VAE-encodes every tile sequentially so the sampler can work on them one at a time. Its partner, UC_HighResolutionTileAccumulator, does the stitching.

The reason this whole approach exists is VRAM. A 4K upscale is not a thing a 12 GB card does in one pass, but four 1024px tiles it can handle. The catch - and it's the classic tiled-diffusion failure mode - is seams: tiles diverge and you get patchwork. That's what the overlap and mask machinery here is for.

How it works

You give it an image and a VAE. It builds a tile grid in one of two modes:

  • tile_size mode uses tile_width/tile_height (both default 1024) to size each tile.
  • grid mode uses rows/columns instead. Controls for the mode you're not using are ignored.

Every neighboring pair of tiles shares overlap pixels (default 128). The overlap region is where the magic happens: each tile gets a soft mask - mask_profile defaults to cosine - so the shared zone is weighted rather than hard-cut, and feather_width/mask_strength control how gradual and how protected that transition is. Tile latents come out with Core-compatible noise masks, which is how the sampler knows to denoise the overlap gently.

If you're doing guided tiled upscaling, there's a bonus: optional Differential Diffusion via model + differential_diffusion_mode (off/core/advanced), and an optional depth_map whose depth_influence steers structure preservation across the feathered zones. Skip all of it and the node still works fine - those are depth-of-field extras, not requirements.

The inputs that matter

The ones a beginner actually sets: image, vae, tile_width/tile_height (or rows/columns), and overlap. Bump overlap for bigger transitions (slower, fewer seams); drop it for speed. mask_profile of cosine is a safe default.

Outputs

  • tile images - the exact padded tensors sent to VAE encode, for spatially matched visual conditioning.
  • tile latents - matching VAE latents with the noise masks.
  • tile layout - the coordinate/overlap metadata that the accumulator needs to put it back together.
  • model - the Differential Diffusion model for the sampler guider, or your unchanged model when diff-diff is off.

Installing it

ComfyUI Manager → search "ComfyUI-UtilsCollection", or:

cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection

Restart. Requirements are just opencv-python and typing-extensions - no model downloads. Newer-API pack, so keep ComfyUI updated.

Where people get burned: forgetting that the sampler must run in list-mapped mode so each tile gets its own encode/decode, and dialing overlap to zero for speed, which guarantees seams. Keep some overlap. And unlike old tiled-upscale stacks, there's no ControlNet Tile preprocessor wired in by default - this is a straight split/sample/accumulate pipeline, so the model's own prompt carries the detail work.

Categoryimage/tiling

Inputs (16)

NameTypeDefaultDescription
imageIMAGE
vaeVAE
tile_modeCOMBOtile_sizetile_size uses tile width and height. grid uses rows and columns. Controls for the other mode are ignored.
tile_widthINT102464–16384Processed tile width in tile_size mode.
tile_heightINT102464–16384Processed tile height in tile_size mode.
rowsINT21–256Number of tile rows in grid mode.
columnsINT21–256Number of tile columns in grid mode.
overlapINT1280–8192Actual shared pixels between neighboring tiles in both tiling modes.
mask_profileCOMBOcosineTransition profile used for overlap denoising and reconstruction.
feather_widthFLOAT1.000–1Fraction of each overlap occupied by the mask transition.
mask_strengthFLOAT1.000–1Overlap edge protection. 0 leaves the mask flat; 1 reaches zero at protected internal tile edges.
differential_diffusion_modeCOMBOoffoff leaves the model unchanged. core applies ComfyUI Core Differential Diffusion. advanced uses the threshold multiplier control.
differential_diffusion_valueFLOAT1.000-10–10Mode-dependent value. Core: strength from 0 to 1, blending its progressive binary mask with the soft mask. Advanced: nonzero threshold divisor from -10 to 10, matching KJNodes Differential Diffusion Advanced.
depth_influenceFLOAT1.00-1–1Signed depth-mask influence. Positive values use the map as supplied, negative values use its inverse, and the magnitude controls the effect. 0 disables depth modulation.
modeloptMODELOptional diffusion model. Required only when a Differential Diffusion mode is enabled.
depth_mapoptIMAGEOptional grayscale depth image used to preserve structure across solid and feathered denoise-mask regions. It is converted to luminance and resized to the source image.

Outputs (4)

NameTypeDescription
tile imagesIMAGEThe exact padded image tensors sent to VAE encoding, for spatially matched list-mapped visual conditioning.
tile latentsLATENTMatching VAE latents with Core-compatible noise masks.
tile layoutUC_HIGH_RES_TILE_LAYOUTCoordinate and overlap metadata for the tile accumulator.
modelMODELDifferential Diffusion model for the sampler guider, or the unchanged connected model when mode is off.