Nodes/ComfyUI_agilly1989_motorway/LatentUpscale_motorway_edition
ComfyUI Node

LatentUpscale_motorway_edition

Latent upscaling to an exact size, pipe-friendly

By agilly1989Β·Created 2 years agoΒ·Updated about a year agoΒ· 7
LatentUpscale_motorway_edition
  • MOTORWAY πŸšŒπŸ’¨
  • MOTORWAY πŸšŒπŸ’¨
β—„INPUT_samples_keysamplesβ–Ί
β—„upscale_methodβ–Ύβ–Ί
β—„width512β–Ί
β—„height512β–Ί
β—„cropβ–Ύβ–Ί
β—„OUTPUT_LATENT_keyLATENTβ–Ί

LatentUpscale_motorway_edition is the "to an exact size" cousin of LatentUpscaleBy: instead of a factor, you give it a target width and height and it resamples the latent in your Motorway pipe to match. Same core node, same logic, pipe-flavored.

Use the exact-size version when the destination matters more than the ratio. The canonical case is the hi-res pass in an img2img workflow: you've got a latent and you need it to be precisely 1024Γ—1024 (or whatever your checkpoint's happy resolution is) before it hits the sampler. The factor version is better when you just want "1.5Γ— bigger and let the math sort out the exact pixels." The exact-size version is better when you have a hard target - like matching another branch of your graph, or keeping dimensions aligned to a specific multiple.

One mechanical detail worth remembering: this works in the 8Γ—-downsampled latent space, so the width/height you type are image pixels, and the node converts them internally. Latent upscaling adds no new detail by itself - it resamples what exists and gives the next sampling pass a bigger canvas to fill. The "more detail" argument is the sampler's job, and the KB's upscaling writeup is blunt that generative detail-filling is a different job from resolution-filling entirely.

The wrapper

  • MOTORWAY πŸšŒπŸ’¨ - the pipe. Required.
  • INPUT_samples_key (default samples) - where the latent lives.
  • upscale_method - enum: nearest-exact, bilinear, area, bicubic, bislerp. bislerp is the community default for latent work.
  • width, height (INT, 0–16384, step 8, default 512) - target pixel size. Step 8 keeps things VAE-friendly.
  • crop - enum: disabled or center. If the aspect ratio doesn't match the source, center crops to fit; disabled leaves the mismatch.
  • OUTPUT_LATENT_key (default LATENT) - where the result lands.

Defaults read samples and write LATENT; the output port is the pipe, so pull the result with a Motorway AxB ramp (key LATENT) to feed a regular node.

Installing

Part of the Motorway pack:

cd ComfyUI/custom_nodes
git clone https://github.com/agilly1989/ComfyUI_agilly1989_motorway
# restart ComfyUI

Or ComfyUI Manager β†’ search ComfyUI_agilly1989_motorway β†’ Install. No models, no extra pip dependencies.

Gotchas

  • Start the graph with MotorwayStart (or a primitive) so there's a pipe.
  • Keys are exact strings; Key: 'samples' doesn't exist in motorway means an upstream node stored the latent under a different key.
  • Beta: author's README says "CURRENTLY IN ACTIVE DEVELOPMENT (BETA)! IF THINGS BREAK ITS BECAUSE I BROKE IT," and the generated clone nodes have been dropped from releases during refactors. If it's not in the menu after install, check the pack's version.

If you've got a specific resolution in mind - a checkpoint's native size, a target for a second pass, a number your video workflow demands - this is the one to reach for. Factor math is for laziness; exact targets are for correctness.

Categoryagilly1989 Nodes/Motorway-ed/latent

Inputs (7)

NameTypeDefaultDescription
MOTORWAY πŸšŒπŸ’¨MOTORWAY πŸšŒπŸ’¨β€”
INPUT_samples_keySTRINGsamplesβ€”
upscale_methodCOMBO5 options: nearest-exact, bilinear, area, bicubic, bislerp
widthINT5120–16384β€”
heightINT5120–16384β€”
cropCOMBO2 options: disabled, center
OUTPUT_LATENT_keySTRINGLATENTβ€”

Outputs (1)

NameTypeDescription
MOTORWAY πŸšŒπŸ’¨MOTORWAY πŸšŒπŸ’¨β€”