↗️ Upscale Latent
Resize in latent space with an optional upscale model
- latent
- vae
- LATENT
- VAE
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, orScale. 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(defaultNone) - the upscale model to route through, from a curated list:4x-UltraSharp.ckpt, the4xNomos8kfamily,4x_NMKD-Superscale, and others. WithNone, 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.latentandvae- 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.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| mode | COMBO | Chọ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_name | COMBO | None | Chọn model phóng to (nếu có). |
| scale | FLOAT | 2.000–10 | Tỉ lệ phóng to ảnh (chỉ dùng khi chọn chế độ Scale). |
| width | INT | 10240–4096 | Chiều rộng ảnh đầu ra. |
| height | INT | 10240–4096 | Chiều cao ảnh đầu ra. |
| latent | LATENT | Latent cần phóng to. | |
| vae | VAE | Mô hình VAE dùng để giải mã latent. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |
| VAE | VAE | — |