Nodes/ComfyUI_agilly1989_motorway/EmptyLatentImage_motorway_edition
ComfyUI Node

EmptyLatentImage_motorway_edition

The blank latent you meet first, now living on the Motorway

By agilly1989·Created 2 years ago·Updated about a year ago· 7
EmptyLatentImage_motorway_edition
  • MOTORWAY 🚌💨
  • MOTORWAY 🚌💨
width512
height512
batch_size1
OUTPUT_LATENT_keyLATENT

EmptyLatentImage is usually the first node a new ComfyUI user ever runs - the blank 512×512 canvas that a sampler denoises into a picture. If you've done any txt2img, you've met it. The _motorway_edition version from agilly1989/ComfyUI_agilly1989_motorway is the same node with the pipe treatment: instead of handing the blank latent out as a cable, it writes it to a named key on the Motorway.

That's the whole story, honestly. What this node does - make a zeroed latent of a given size - is identical to core. The wrapper just changes where the result goes.

The inputs that matter

  • width (default 512, min 16, step 8) - latent width in pixels. The step of 8 isn't bureaucracy: SD-class VAEs downscale by 8, so a width not divisible by 8 misaligns the latent grid. The tooltip says it plainly: "The width of the latent images in pixels."
  • height (default 512, min 16, step 8) - same story, "The height of the latent images in pixels."
  • batch_size (default 1) - "The number of latent images in the batch." Bump this only when you want several images in one denoise pass; it eats VRAM linearly.
  • OUTPUT_LATENT_key (default LATENT) - the key the blank latent is stored under on the pipe.

Output is the MOTORWAY pipe only. Downstream, a motorway-ed KSampler reads the latent back via its INPUT_latent_key - set both to LATENT and the connection is invisible, which is sort of the point of the system.

How it fits a Motorway workflow

The pattern is: MotorwayStart stores the bus, this node parks a blank latent on it under LATENT, a CLIP encode parks conditioning under CONDITIONING, and a motorway-ed KSampler consumes both keys and writes back a fresh latent under a different key for the VAE to decode. That key naming is the real skill here - it's a dict that flows, and like any dict, the classic failure is a typo. The author's README even names the error: if you get 'MotorwayClass' object has no attribute 'hash_', the key you asked for was never written to the bus.

Install

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

Restart ComfyUI, or use ComfyUI Manager and search "ComfyUI_agilly1989_motorway." No extra dependencies.

One pack-level reality check before you build a whole graph around this: the latest release (1.1.7) describes itself in pyproject.toml as "HOTFIX - REMOVED MONKEYPATCH AND GENERATED NODES," and the generated clone nodes are commented out of __init__.py. The core Motorway nodes still work; the _motorway_edition clones may not be in your menu until the author re-enables them. If it's missing, core EmptyLatentImage does the identical job - you'd just feed it into a Motorway 1x0 ramp to get the value onto the bus yourself.

Categoryagilly1989 Nodes/Motorway-ed/latent

Inputs (5)

NameTypeDefaultDescription
widthINT51216–16384The width of the latent images in pixels.
heightINT51216–16384The height of the latent images in pixels.
batch_sizeINT11–4096The number of latent images in the batch.
OUTPUT_LATENT_keySTRINGLATENT
MOTORWAY 🚌💨optMOTORWAY 🚌💨

Outputs (1)

NameTypeDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨