Nodes/ComfyUI-Ardenius/Ard Latent Upscale By
ComfyUI Node

Ard Latent Upscale By

The latent upscaler that hands you the new size instead of making you guess

By ArdeniusAI·Created 2 years ago·Updated 2 years ago· 5
Ard Latent Upscale By
  • samples
  • latent
  • width
  • height
upscale_method
scale_by1.5000
divx8

Latent upscaling is the step you almost always want before a second sampling pass - the "hires fix" pattern where you blow up the latent, then run img2img at low denoise to add real detail instead of just stretching pixels. ComfyUI ships a node for that (LatentUpscaleBy), and Ard Latent Upscale By is basically that node with two extras bolted on: it outputs the new width and height as plain integers, and it rounds those dimensions up to a clean multiple of divx. If you've ever wired an upscaler and then had to compute the output size yourself to feed back into an empty latent, you can see the appeal.

Here's the mechanism, in case it matters: the latent tensor is a heavily compressed version of the image - the VAE squeezes it 8× per side, so a 1024×1024 image is a 128×128 latent. This node runs ComfyUI's common_upscale on that tensor, scaling width and height by scale_by, then rounds both up to the nearest multiple of divx (default 8) and fixes a couple of odd hardcoded sizes along the way (1648 → 1664, 1136 → 1152). That rounding is the quietly important part: models are trained on sizes divisible by 8, and a stray dimension can give you headaches downstream.

The inputs you'll actually touch:

  • scale_by - the factor, default 1.5, anything from 0.01 up to 8. 1.5–2× is the sane range for a detail pass; past ~2× a latent upscale starts inventing mush.
  • upscale_method - nearest-exact, bilinear, area, bicubic, bislerp. bislerp is the ComfyUI default and is fine for most things; area is a decent pick when downscaling.
  • divx - leave at 8 unless you know why you're changing it.
  • samples - the LATENT in from your KSampler (or VAE encode).

Outputs: latent goes back into a KSampler (with a lower denoise) or straight to VAE Decode. width and height are the real gift - wire them into an empty latent, a text widget, or this pack's Control Box so the second pass uses the exact upscaled dimensions.

Where people get burned: thinking this adds detail by itself. It doesn't - it just makes the latent bigger. The detail comes from re-sampling at low denoise afterward, which is why the pack pairs it with a second KSampler. Also, latent upscaling to extreme sizes eats VRAM fast (the tensor is 4 channels but every pixel costs memory); if you're going past ~2×, a pixel-space upscaler on the decoded image is usually the better road.

Install is the standard pack one: ComfyUI Manager → search ComfyUI-Ardenius, or:

cd ComfyUI/custom_nodes
git clone https://github.com/ArdeniusAI/ComfyUI-Ardenius

then restart ComfyUI. The pack pulls in civitai and moviepy as its dependencies even if you only use this node - that's the pack's requirement, not this node's doing. If the console prints one import error at startup, that's the Save Image node wanting comfyui_controlnet_aux; the rest of the pack (including this node) still loads.

Honest verdict: if you only need to upscale a latent, the built-in node does the job. You reach for this one when the workflow wants the resulting dimensions as numbers - which is exactly the four-tile workflows this pack is built around.

CategoryArdenius

Inputs (4)

NameTypeDefaultDescription
samplesLATENT
upscale_methodCOMBO5 options: nearest-exact, bilinear, area, bicubic, bislerp
scale_byFLOAT1.50000.01–8
divxINT88–4096

Outputs (3)

NameTypeDescription
latentLATENT
widthINT
heightINT