Nodes/SDVN_Comfy_node/↗️ Upscale Latent
ComfyUI Node

↗️ Upscale Latent

Resize in latent space with an optional upscale model

By StableDiffusionVN·Created 2 years ago·Updated about a month ago· 118
↗️ Upscale Latent
  • latent
  • vae
  • LATENT
  • VAE
mode
model_nameNone
scale2.00
width1024
height1024

This node resizes an image while it's still in latent space, so it slots neatly into a hi-res-fix or second-pass workflow without you manually wiring a VAE decode, an upscale, and a VAE re-encode. It takes a latent in, decodes it, scales it up (optionally through a real upscale model like 4x-UltraSharp), then re-encodes it back to a latent for another sampler pass. Same idea as the pack's Upscale Image node, but it keeps everything in the latent domain so the graph stays tidy.

What kind of upscaling this is

Quick framing, because "upscale" means three different jobs. This one is the pixel-upscaler kind: an ESRGAN-family model (or plain resize) makes the image bigger and cleaner without inventing new content. That's different from the generative restorers (SUPIR, SeedVR2) that hallucinate detail that was never there. The classic use for latent upscaling is a two-pass render: generate at a sane base size, upscale the latent, then run a second low-denoise sampler pass so the model adds coherent detail at the higher resolution. This node handles the middle step.

The inputs and outputs that matter

  • mode - Maxsize, Resize, or Scale. Maxsize fits the image within a bound without changing the aspect ratio; Resize forces exact dimensions; Scale multiplies by a factor. Pick based on whether you care about ratio or exact pixels.
  • model_name (default None) - the upscale model to route through, from a curated list: 4x-UltraSharp.ckpt, the 4xNomos8k family, 4x_NMKD-Superscale, and others. With None, it does a plain interpolated resize. With a model, it keeps far more detail. 4x-UltraSharp is the reliable default for general work - clean, doesn't over-sharpen.
  • scale (default 2) - the multiplier when you're in Scale mode.
  • width / height (default 1024) - the targets for Maxsize/Resize modes.
  • latent and vae - the latent to upscale and the VAE it needs to decode/re-encode. Both required, because this node does the round trip for you.

Outputs are the upscaled LATENT and the VAE passed through (so you can chain it onward without re-fetching the VAE).

Installing it

ComfyUI Manager: search SDVN_Comfy_node, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/StableDiffusionVN/SDVN_Comfy_node

Then pip install -r custom_nodes/SDVN_Comfy_node/requirements.txt from your ComfyUI root, and restart. Upscale models auto-download when you pick one, so Windows/macOS users want aria2c installed.

Where people get burned

Forgetting the second sampler pass. Upscaling the latent doesn't add detail by itself - it makes the canvas bigger. The detail comes from running a second KSampler at low denoise (0.3–0.5) after this node. Skip that and you've just got a soft, larger version of the same image.

Round trips cost quality. Every decode/encode through the VAE grinds the image down a little. This node does one round trip per use; stacking several latent-upscale passes compounds it. Two passes is usually plenty.

Wrong VAE. The vae input has to match the model that made the latent. A mismatched VAE mangles colors on the re-encode. Feed it the same VAE your checkpoint uses.

Going too big in one jump. A 4x latent upscale in a single step often invents garbage or repeats textures. Two moderate passes beat one huge one.

Category📂 SDVN/🏞️ Image

Inputs (7)

NameTypeDefaultDescription
modeCOMBOChọn chế độ phóng to: Maxsize (giới hạn dài nhất), Resize (đặt kích thước), Scale (phóng theo tỉ lệ).
model_nameCOMBONoneChọn model phóng to (nếu có).
scaleFLOAT2.000–10Tỉ lệ phóng to ảnh (chỉ dùng khi chọn chế độ Scale).
widthINT10240–4096Chiều rộng ảnh đầu ra.
heightINT10240–4096Chiều cao ảnh đầu ra.
latentLATENTLatent cần phóng to.
vaeVAEMô hình VAE dùng để giải mã latent.

Outputs (2)

NameTypeDescription
LATENTLATENT
VAEVAE