Nodes/ComfyUI_agilly1989_motorway/LatentBlend_motorway_edition
ComfyUI Node

LatentBlend_motorway_edition

Blend two latents by a factor, via keys

By agilly1989·Created 2 years ago·Updated about a year ago· 7
LatentBlend_motorway_edition
  • MOTORWAY 🚌💨
  • MOTORWAY 🚌💨
INPUT_samples1_keysamples1
INPUT_samples2_keysamples2
blend_factor0.50
OUTPUT_LATENT_keyLATENT

LatentBlend_motorway_edition wraps core's LatentBlend, which mixes two latents together according to a blend_factor between 0 and 1. The motorway edition reads both latents from pipe keys and stores the blend back under a key.

What a latent blend is (and isn't)

At factor 0.5, the output is the midpoint of the two latents - an average of their representations. At 0.9 it's mostly the first latent with a hint of the second. It's arithmetic on the compressed tensors, not a cutout or a soft-edged composite: you're interpolating between two states, which is why it can produce genuinely in-between imagery when you blend two different samples, or why it's used to ease one latent into another for smoother transitions in animation-ish workflows. The honest caveat: blending latents of different scenes doesn't give you a clean mashup of the two images. It gives you a tensor average, and what the VAE decodes from an average is frequently mush. Its best uses are blending variations of the same subject - two seeds of the same prompt - or as a transition step, not mixing a cat and a car.

You set:

  • blend_factor (default 0.5, range 0–1) - where between the two latents the result sits.
  • INPUT_samples1_key (default "samples1") and INPUT_samples2_key (default "samples2") - the two sources.
  • OUTPUT_LATENT_key (default "LATENT") - where the blend lands.

Both inputs must be the same shape; blending different resolutions throws an error, not a clever result. Only output socket is MOTORWAY 🚌💨; read the blend out via a Motorway AxB ramp to sample or decode.

The "_for_testing" warning

This node's category in core is literally _for_testing, and that's a real signal. Core ComfyUI ships it as experimental - it's in the tree, it works, but it's not a stable, blessed part of the sampling pipeline. Combined with the pack's own beta status, that makes LatentBlend_motorway_edition one of the most "your mileage may vary" nodes in this whole family. Fine for experimenting with interpolation; don't build a production workflow's identity on it.

Install and caveats

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

Restart ComfyUI, or install via ComfyUI Manager. No pip deps, no model files.

Pack-wide reality check: one-developer beta, README-explicit about breakage, and the current repo HEAD comments out the _motorway_edition registration mid-refactor, so a fresh clone may not even load this node. The signature error, 'MotorwayClass' object has no attribute 'hash_', means a key you referenced was never written to the pipe - with two inputs, check both upstream keys. And the honest close: a _for_testing core node wrapped in a beta pipe is the definition of optional. The stock LatentBlend is the same experiment with a socket if you want to try it at all.

Categoryagilly1989 Nodes/Motorway-ed/_for_testing

Inputs (5)

NameTypeDefaultDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨
INPUT_samples1_keySTRINGsamples1
INPUT_samples2_keySTRINGsamples2
blend_factorFLOAT0.500–1
OUTPUT_LATENT_keySTRINGLATENT

Outputs (1)

NameTypeDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨