Nodes/was-node-suite-comfyui/Tiled Image Upscale (With Model)
ComfyUI Node Runs on cloud

Tiled Image Upscale (With Model)

4x a 4K frame on a 12GB card

By WASasquatch·Created 4 years ago·Updated a day ago· 1,864
Tiled Image Upscale (With Model)
  • upscale_model
  • image
  • IMAGE
◄upscale_factor4.0►
◄tile_size512►
◄overlap32►
◄feather0►
◄resample_methodlanczos►
◄clear_comfy_memoryfalse►
◄precisionauto►

A 4x upscale model on a 3000-pixel render will kill a 12GB card. It's one of the least glamorous, most reliable failure modes in ComfyUI: works fine on a test image, out-of-memory the moment you point it at the real one. This node is the fix. It runs the model over one overlapping tile at a time and cross-fades the overlaps, so peak memory is set by the tile size instead of by how big your picture is.

That's the difference between pixel upscalers and the diffusion-based tiled workflows. Tiled Diffusion needs a ControlNet Tile pass to stop tiles drifting apart, because each tile is being generated and can invent different things. A model upscaler isn't generating anything - it's deterministic, tile in, pixels out - so the only artefact to worry about is the join, and a cross-fade handles that.

What's on the node

upscale_model from Load Upscale Model, image, and upscale_factor are all you need to get moving. The factor is independent of the model's own scale: a 4x ESRGAN can produce a 2x result, because the tiles get resampled afterwards by resample_method. lanczos keeps the most detail, area is the gentlest when you're actually shrinking, and nearest-exact keeps hard pixel edges - that last one is what you want on pixel art, where Lanczos will invent in-between colours you then have to clean up.

tile_size (default 512) and overlap (default 32) are the memory/complexity pair. 256 and 512 both suit most cards and run at roughly the same speed - a bigger tile needs more VRAM without being faster, which surprises people. overlap is the raw material for the cross-fade; 0 gives you a hard grid of joins. feather is the cross-fade width in output pixels, and 0 means "work it out from the overlap", which is right almost always. Raise it only when a faint grid survives on flat areas like sky, where there's no texture to hide the seam.

Two more worth knowing: clear_comfy_memory unloads every other model and empties the caches before upscaling, at the cost of reloading them afterwards - reach for it when a big upscale dies next to a checkpoint that's still resident. And the optional precision runs the model in half precision where the model declares that safe, which is roughly twice the speed; leave it on auto unless you have a reason.

Single output: IMAGE, at input size × upscale_factor, clamped to displayable range.

It degrades instead of dying

The part I actually like: when the upscale hits an out-of-memory error, the node halves tile_size and retries. Down to 64 pixels, and only then does it give up. So the failure mode is a slower run, not a crash, and the log tells you which tile size it settled on.

The model is moved off the GPU and back to float32 afterwards, so it isn't left squatting on your VRAM for the rest of the session.

Install

ComfyUI Manager → WAS Node Suite v3 → install → restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui.git

Nothing is installed or downloaded by the pack itself; ComfyUI 0.14.0+ and Python 3.10+. Your upscale model files (ESRGAN, SwinIR, whatever you run) go in ComfyUI/models/upscale_models as usual - that part is core ComfyUI, not the pack, and the pack does not fetch them.

The node lives in the extras feature group, which is on by default. If it's missing from the menu, someone has set extras: false in config.yaml to run the standalone WAS Extras pack instead.

Where people get burned

A faint grid on flat backgrounds. Raise feather a little, or raise overlap to 64. Ninety percent of tile seams are one of those two.

It's slower than the core node, and it should be: the core one-pass upscale is faster right up to the point it doesn't fit. Use this when the one-pass version is dying, not by default.

Titanium expectations about detail. This is a pixel upscaler - it sharpens and smooths and adds no new content. If your source is soft or damaged, no tile size will fix that; that's the SeedVR2 / SUPIR end of the upscaling tree, and it rewrites faces. See the upscaling notes on which kind of tool fixes which kind of soft.

Memorising the wrong numbers. You don't need to tune tile_size for each image. Set 512, set overlap 32, and only touch them when something visibly goes wrong. The auto-halving means it'll find its own way out of memory pressure.

CategoryWAS Suite/Image/Upscaling

Inputs (9)

NameTypeDefaultDescription
upscale_modelUPSCALE_MODELThe upscale model to run, from a Load Upscale Model node. Its own scale does not have to match upscale_factor: a 4x model can produce a 2x result.
imageIMAGEThe pictures to enlarge, one frame at a time. A result too large for free memory is kept in a temporary file in ComfyUI's temp folder, or in the folder paths.scratch names in config.yaml.
upscale_factorFLOAT4.01–16Final size relative to the input. 2.0 doubles both sides, 4.0 quadruples them, 1.0 keeps the original size while still passing the picture through the model.
tile_sizeINT51264–4096Tile edge in input pixels. `256` and `512` both suit most cards and run at much the same speed; a larger tile needs more video memory without being faster. If the card runs out, the tile is halved and the run retried.
overlapINT320–1024How far neighbouring tiles overlap, in input pixels. This is the material the cross-fade is made from, so 0 puts a hard join between tiles; 32 to 64 hides it on most models.
featherINT00–4096Width of the cross-fade in output pixels. 0 works it out from the overlap, which is the right answer almost always; raise it only when a faint grid still shows on flat areas such as sky.
resample_methodCOMBOlanczosHow a tile is resized when the model's own scale does not match upscale_factor. `lanczos` keeps the most detail, `area` is the gentlest when shrinking, `nearest-exact` keeps hard pixel edges for pixel art.
clear_comfy_memoryBOOLEANfalseWhether to unload every other model and empty the caches before upscaling. Turn this on when a large upscale runs out of memory next to a checkpoint that is still resident; it costs the time to reload those models afterwards.
precisionoptCOMBOautoWhat the model runs in. `auto` = half precision where the model declares it safe, which is about twice as fast; `32 bit float` = every model's safest; `16 bit float` and `bfloat16` force one, whatever the model says.

Outputs (1)

NameTypeDescription
IMAGEIMAGEThe enlarged pictures, at roughly the input size times upscale_factor, clamped to the displayable range.