Image Upscale Tiled
Tile upscale without nuking your VRAM
- image
- IMAGE
There are two kinds of upscaling, and they are not the same job. One adds detail the image never had - that's the SeedVR2/SUPIR world. The other just adds pixels, cleanly and cheaply, which is what a 4x ESRGAN model does in milliseconds. This node is firmly in the second camp, and its whole reason for existing is that even a milliseconds-scale ESRGAN pass can blow up your VRAM when the input is 4K and the model is 4x. The fix is boring and effective: split the image into tiles, upscale each one, stitch them back with feathered seams.
How it works
ImageUpscaleTiled loads any model from your ComfyUI/models/upscale_models folder via spandrel (the same loader ComfyUI core uses), splits the image into rows × cols tiles, runs each tile through the model on the GPU, and reassembles the output. Two details make it work in practice:
- Overlap (0–0.5) makes each tile extend into its neighbors' territory before upscaling, so edge artifacts get blended instead of stitched. The code caps overlap at half a tile and uses gradient masks when merging, which is exactly the right instinct - without it you get visible tile seams on every uniform sky.
- Memory is managed explicitly. It computes the VRAM the model plus one upscaled tile needs and frees that headroom before running. On a 6 GB card that's the difference between upscaling a 1024² to 4K and getting an OOM crash at tile one.
A progress bar tracks tiles as they process, and the console logs where things land.
The inputs that matter
- model_name - pick from your
upscale_modelsfolder. Anything spandrel recognizes works: 4x-UltraSharp, RealESRGAN anime variants, Remacri, NMKD-Siax. Per the KB, ESRGAN-family models are the right call when the source already has the detail you want - they cannot hallucinate, which is a feature, not a bug. - rows / cols - grid density. 2×2 on a 1024² image is plenty for most cards; drop to 1×1 if you're not actually near the VRAM limit, because tiles cost you nothing on clean seams but they do cost time.
- overlap - default 0.1 is a sane starting point. Bump it if you see seams, not as a reflex.
Output is a single IMAGE, upscaled by the model's native scale factor (2x or 4x depending on the .pth you load).
Installing it
It's part of the ComfyUI-YCNodes pack. Install via ComfyUI Manager (search ComfyUI-YCNodes), or:
cd ComfyUI/custom_nodes
git clone https://github.com/yichengup/ComfyUI-YCNodes
then restart. One dependency quirk: the node imports spandrel, which is not in the pack's requirements.txt - it works because ComfyUI core already bundles spandrel for its own model loading. If your install somehow lacks it, pip install spandrel sorts it out.
Gotchas
Two things catch people. First, this node is for pixel upscalers only. Feed it a generative restorer and you're not getting tiled detail, you're getting a headache - the tiling exists to fit a big interpolation through a small VRAM budget, not to stop diffusion tiles diverging (that job belongs to ControlNet Tile + tiled sampling, a different graph entirely). Second, the input gets cropped to exact multiples of the tile grid before upscaling (the code floors h to tile_h * rows), so a non-multiple dimension loses a few pixels at the edge. With overlap that's usually invisible; if it bugs you, pre-pad to a clean multiple first.
Where this shines: a sharp 1024² source you want at 4096² for print, on a card that chokes on the naive version. It's not flashy - but the "adds no content" half of upscaling is still the correct default for most images, and this is the low-VRAM way to do it.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| model_name | COMBO | 0 options: | |
| rows | INT | 21–8 | — |
| cols | INT | 21–8 | — |
| overlap | FLOAT | 0.100–0.5 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |