LatentUpscale_motorway_edition
Latent upscaling to an exact size, pipe-friendly
- MOTORWAY ππ¨
- MOTORWAY ππ¨
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(defaultsamples) - where the latent lives.upscale_method- enum:nearest-exact,bilinear,area,bicubic,bislerp.bislerpis 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:disabledorcenter. If the aspect ratio doesn't match the source,centercrops to fit;disabledleaves the mismatch.OUTPUT_LATENT_key(defaultLATENT) - 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 motorwaymeans 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.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| MOTORWAY ππ¨ | MOTORWAY ππ¨ | β | |
| INPUT_samples_key | STRING | samples | β |
| upscale_method | COMBO | 5 options: nearest-exact, bilinear, area, bicubic, bislerp | |
| width | INT | 5120β16384 | β |
| height | INT | 5120β16384 | β |
| crop | COMBO | 2 options: disabled, center | |
| OUTPUT_LATENT_key | STRING | LATENT | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MOTORWAY ππ¨ | MOTORWAY ππ¨ | β |