Nodes/ComfyUI_agilly1989_motorway/LatentUpscaleBy_motorway_edition
ComfyUI Node

LatentUpscaleBy_motorway_edition

The cheap pre-sample resample

By agilly1989Β·Created 2 years agoΒ·Updated about a year agoΒ· 7
LatentUpscaleBy_motorway_edition
  • MOTORWAY πŸšŒπŸ’¨
  • MOTORWAY πŸšŒπŸ’¨
β—„INPUT_samples_keysamplesβ–Ί
β—„upscale_methodβ–Ύβ–Ί
β—„scale_by1.50β–Ί
β—„OUTPUT_LATENT_keyLATENTβ–Ί

This node is the "by a factor" version of latent upscaling: take the latent in your Motorway pipe, multiply its dimensions by scale_by, and store the bigger latent back. It's the core LatentUpscaleBy node with the same logic, just re-plumbed for the pipe.

Here's the thing worth understanding before you use it: latent upscaling is not image upscaling. The image upscalers everyone argues about in the community (ESRGAN, SeedVR2, the whole "more detail vs. more pixels" debate) work on pixels. This works on the compressed 8Γ—-downsampled representation the model thinks in. What you're doing is giving the sampler a larger canvas to work on - the standard move for a hi-res pass, where you generate small, upscale the latent, and sample again so the model fills in the new detail. It adds no detail by itself; it just resamples what's there, and the sampler does the inventing. If you're only ever doing one pass, this node buys you nothing - you'd just generate at the target size directly.

You'll normally reach for the factor version when you know you want "a bit bigger" - 1.5Γ— is the classic. It computes the new width/height from the current size and rounds, so no target resolution math on your end.

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 usual suggestion for latent upscaling; nearest-exact keeps things blocky if that's somehow your goal.
  • scale_by (FLOAT, 0.01–8, default 1.5) - the multiplier.
  • OUTPUT_LATENT_key (default LATENT) - where the result lands.

Defaults are usable as-is: read samples, scale 1.5Γ—, write LATENT. Output port is the pipe itself, so pull the result back with a Motorway AxB ramp (key LATENT) if you're handing it to a normal 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 deps.

Gotchas

  • Need a MotorwayStart (or primitive) upstream to create the pipe.
  • Keys are exact strings. Key: 'samples' doesn't exist in motorway means an upstream node stored the latent under a different key - check the key fields on both sides.
  • Beta: the author's README warns "CURRENTLY IN ACTIVE DEVELOPMENT (BETA)! IF THINGS BREAK ITS BECAUSE I BROKE IT," and the generated clone nodes have been toggled off in some releases. Missing from the menu after install? That's the beta.

One honest recommendation: if you want real resolution, pair this with a pixel-space upscaler and a second pass rather than cranking scale_by to 4 and hoping. The latent resample is the setup; the sampler is the show.

Categoryagilly1989 Nodes/Motorway-ed/latent

Inputs (5)

NameTypeDefaultDescription
MOTORWAY πŸšŒπŸ’¨MOTORWAY πŸšŒπŸ’¨β€”
INPUT_samples_keySTRINGsamplesβ€”
upscale_methodCOMBO5 options: nearest-exact, bilinear, area, bicubic, bislerp
scale_byFLOAT1.500.01–8β€”
OUTPUT_LATENT_keySTRINGLATENTβ€”

Outputs (1)

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