High Resolution Tile Split & VAE Encode
Tiled diffusion without the patchwork
- image
- vae
- model
- depth_map
- tile images
- tile latents
- tile layout
- model
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_sizemode usestile_width/tile_height(both default 1024) to size each tile.gridmode usesrows/columnsinstead. 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.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| vae | VAE | — | |
| tile_mode | COMBO | tile_size | tile_size uses tile width and height. grid uses rows and columns. Controls for the other mode are ignored. |
| tile_width | INT | 102464–16384 | Processed tile width in tile_size mode. |
| tile_height | INT | 102464–16384 | Processed tile height in tile_size mode. |
| rows | INT | 21–256 | Number of tile rows in grid mode. |
| columns | INT | 21–256 | Number of tile columns in grid mode. |
| overlap | INT | 1280–8192 | Actual shared pixels between neighboring tiles in both tiling modes. |
| mask_profile | COMBO | cosine | Transition profile used for overlap denoising and reconstruction. |
| feather_width | FLOAT | 1.000–1 | Fraction of each overlap occupied by the mask transition. |
| mask_strength | FLOAT | 1.000–1 | Overlap edge protection. 0 leaves the mask flat; 1 reaches zero at protected internal tile edges. |
| differential_diffusion_mode | COMBO | off | off leaves the model unchanged. core applies ComfyUI Core Differential Diffusion. advanced uses the threshold multiplier control. |
| differential_diffusion_value | FLOAT | 1.000-10–10 | Mode-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_influence | FLOAT | 1.00-1–1 | Signed 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. |
| modelopt | MODEL | Optional diffusion model. Required only when a Differential Diffusion mode is enabled. | |
| depth_mapopt | IMAGE | Optional 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)
| Name | Type | Description |
|---|---|---|
| tile images | IMAGE | The exact padded image tensors sent to VAE encoding, for spatially matched list-mapped visual conditioning. |
| tile latents | LATENT | Matching VAE latents with Core-compatible noise masks. |
| tile layout | UC_HIGH_RES_TILE_LAYOUT | Coordinate and overlap metadata for the tile accumulator. |
| model | MODEL | Differential Diffusion model for the sampler guider, or the unchanged connected model when mode is off. |