Nodes/ComfyUI Impact Pack/Latent Scale (on Pixel Space)
ComfyUI Node Runs on cloud

Latent Scale (on Pixel Space)

Upscale a latent by round-tripping through pixels

By ltdrdata·Created 3 years ago·Updated 4 months ago· 3,242
Latent Scale (on Pixel Space)
  • samples
  • vae
  • upscale_model_opt
  • LATENT
  • IMAGE
scale_method
scale_factor1.50
use_tiled_vaefalse

Latent Scale (on Pixel Space) upscales a latent - but instead of stretching it in latent space (which tends to go mushy), it decodes the latent to a real image, upscales that, then re-encodes it back to a latent. The name is precise if you read it slowly: it's a latent scaler that does its scaling in pixel space. That detour through pixels is the entire point, because pixel-space upscaling has decades of good tools behind it and latent-space upscaling has… vibes.

This matters for the two-pass generation everyone does. You generate at native resolution, then you want to go bigger before a second sampling pass adds coherent detail (the classic hi-res fix). The intermediate "make the latent bigger" step is where quality leaks. Naive latent upscaling smears; this node instead hands the enlargement to proper pixel-space methods - Lanczos, or a real upscale model - and only then converts back to a latent for the next KSampler. It's a cleaner bridge between your first pass and your second.

The inputs

Five, and two you'll actually think about:

  • samples - the LATENT you're upscaling.
  • scale_method - the pixel-space interpolation: nearest-exact, bilinear, lanczos, or area. Lanczos is the sensible general pick; it's the sharp, well-behaved classic.
  • scale_factor (default 1.5) - how much bigger. 1.5–2x is the sweet spot for a hi-res pass; go higher and the second sampling pass has more to invent.
  • vae - required, because the node has to decode and re-encode. Feed the same VAE your model uses. This is the input people forget exists on a "latent" node, and forgetting it is why it won't wire up.
  • upscale_model_opt (optional) - plug in an ESRGAN-family model and the enlargement uses that model instead of plain interpolation. Per the pack's own note, when a model is provided it upscales the pixels with the model and then resamples down to your target with the chosen scale_method. If you've got a good 4x upscaler, this is the higher-quality route.

There's also use_tiled_vae, a boolean - turn it on if the decode/encode step blows past your VRAM at high resolution; it processes the VAE step in tiles at the cost of some speed.

Two outputs: the upscaled LATENT (feed it into your second KSampler pass) and, handily, the IMAGE it produced along the way, so you can preview the intermediate pixels without decoding again.

How to use it well

It's the intermediate step, not the finish line. Latent Scale enlarges; the detail comes from the sampling pass you run on the upscaled latent afterward, at a moderate denoise (0.3–0.5 is the usual hi-res-fix range - high enough to add detail, low enough not to redraw the composition). Pair this node with a KSampler set that way and you've rebuilt hi-res fix out of parts.

Reach for the upscale_model_opt route when you care about quality and have the VRAM; use plain Lanczos when you want it fast and cheap. Both beat stretching the latent directly.

Common issues

The number-one snag is the VAE input - it's required, and a mismatched or missing VAE gives you garbage or an error. Use the model's matching VAE. The number-two snag is VRAM at the decode/encode step on big images; that's what use_tiled_vae is for. And keep expectations calibrated: this node makes the latent bigger and cleaner-than-naive, but it is not a magic detail generator on its own - an already-soft source won't gain detail that was never there. If your input is genuinely low-quality rather than just small, a dedicated restoration upscaler is a different tool for a different job.

Installing it

Latent Scale (on Pixel Space) comes with ComfyUI Impact Pack. Install via ComfyUI-Manager (search ComfyUI Impact Pack, Install, restart), or manually: cd ComfyUI/custom_nodes && git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack, then install the pack's requirements.txt into ComfyUI's Python environment (portable build: ..\..\..\python_embeded\python.exe -m pip install -r requirements.txt), and restart. Auto-install was removed in v7.6, so a manual clone needs that requirements step to load. For the upscale_model_opt input, drop an ESRGAN-family model (4x-UltraSharp, Remacri, etc.) into ComfyUI/models/upscale_models. Impact Pack is ltdrdata's - the same maintainer as ComfyUI-Manager - so it's dependable and actively kept up.

CategoryImpactPack/Upscale

Inputs (6)

NameTypeDefaultDescription
samplesLATENT
scale_methodCOMBO4 options: nearest-exact, bilinear, lanczos, area
scale_factorFLOAT1.500.1–10000
vaeVAE
use_tiled_vaeBOOLEANfalse
upscale_model_optoptUPSCALE_MODEL

Outputs (2)

NameTypeDescription
LATENTLATENT
IMAGEIMAGE