Nodes/ComfyUI_agilly1989_motorway/LatentMultiply_motorway_edition
ComfyUI Node

LatentMultiply_motorway_edition

A volume knob for your latent — multiply before you sample

By agilly1989·Created 2 years ago·Updated about a year ago· 7
LatentMultiply_motorway_edition
  • MOTORWAY 🚌💨
  • MOTORWAY 🚌💨
INPUT_samples_keysamples
multiplier1.00
OUTPUT_LATENT_keyLATENT

LatentMultiply_motorway_edition does exactly one thing: it takes the latent pulled from your Motorway pipe and scales every value by a single number. That's it. It's the most "just math" node in the latent family, and people sleep on it.

What is that even good for? Latents aren't just opaque blobs - their magnitude carries real meaning. Multiplying by ~1.1–1.2 before sampling pushes the signal up, which is a classic trick for punching up contrast and giving a slightly dull image more body; scaling down does the opposite and can tame an output that's running too hot. Some people use it to correct for differences between VAE implementations or checkpoints that sit at slightly different latent scales. Set the multiplier to -1 and you've inverted the latent, which shows up in some style-mixing experiments. The range goes from -10 to 10, so you have room to play - but in practice you'll spend your time around 0.9 to 1.3.

The wrapper

Same Motorway-ed pattern as the rest of the pack: this is the core LatentMultiply node, rewired to pull from and write back to the pipe by key instead of taking a direct wire.

  • MOTORWAY 🚌💨 - the pipe. Required.
  • INPUT_samples_key (default samples) - where the latent lives in the pipe.
  • multiplier (FLOAT, -10 to 10, default 1) - the scalar. 1.0 is a no-op.
  • OUTPUT_LATENT_key (default LATENT) - where the scaled result is stored.

With the defaults it reads samples and writes LATENT, so it slots into a standard Motorway chain with zero fuss. The output port is the pipe itself; pull the LATENT key back out with a Motorway AxB ramp and VAEDecode to look at what you made.

Honestly, the natural home for this node is img2img-ish workflows where you're feeding an encoded image back into a sampler. A small pre-sample multiplier is a cheap way to bias how much of the source survives, and since it's latent-space math it costs nothing - no decode, no re-encode, no image resampling.

Installing

It's part of the Motorway pack, so you install the pack:

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

Or via ComfyUI Manager: search ComfyUI_agilly1989_motorway → Install. No model downloads, no extra pip dependencies.

Gotchas

  • You need a MotorwayStart node (or primitive start) upstream, or there's no pipe to read from.
  • Keys are exact strings. Key: 'samples' doesn't exist in motorway means nothing upstream wrote that key - match it to whatever key your encoder branch stored under.
  • The pack is a one-dev beta; the author's README warns "IF THINGS BREAK ITS BECAUSE I BROKE IT," and the generated clone nodes have been dropped from releases during refactors. No node in the menu after install? That's the beta, not you.

It's a boring node, and that's the appeal: one number, one key in, one key out, no surprises.

Categoryagilly1989 Nodes/Motorway-ed/latent/advanced

Inputs (4)

NameTypeDefaultDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨
INPUT_samples_keySTRINGsamples
multiplierFLOAT1.00-10–10
OUTPUT_LATENT_keySTRINGLATENT

Outputs (1)

NameTypeDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨