LoadLatent_motorway_edition
Load a saved latent back into the pipe and skip the re-encode
- MOTORWAY 🚌💨
- MOTORWAY 🚌💨
Here's a niche trick a lot of people don't know about: you can save a latent to disk mid-workflow and load it back later - no decode, no re-encode, no VAE round-trip. LoadLatent_motorway_edition is the loading half of that, re-plumbed for the Motorway pipe.
The use case is genuine but specific. Latents are cheap to store and exact to reload, so saving them is great for iterating on the sampling stage without regenerating the expensive early part of a workflow - run the pipeline once, save the latent at the interesting point, then replay the sampler with different settings over and over. It's also handy for handing off between sessions or sharing a "starting point" without shipping images. The VAE encode is one of the lossy steps in the chain, so skipping it when you don't need pixels is a real quality and time win. (ComfyUI stores these as .latent files via the SaveLatent node; this node loads them back.)
The honest caveat: it's a _for_testing category node in core, and it's a narrow workflow you'll either love or never use. But if you've ever sat through a 30-second encode just to tweak a sampler setting, you know exactly why this exists.
The wrapper
latent- the file dropdown, listing.latentfiles from your input folder (whereSaveLatent-style workflows put them).OUTPUT_LATENT_key(defaultLATENT) - where the loaded latent lands in the pipe.MOTORWAY 🚌💨- marked optional in the schema, but connect it anyway: the wrapper still needs a pipe to write the latent into.
Output port is the pipe; pull the LATENT key out with a Motorway AxB ramp when you want to feed a regular sampler.
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 model downloads, no extra pip dependencies.
Gotchas
- Start the graph with a
MotorwayStartso there's a pipe to write into. - Keys are exact strings -
Key: 'LATENT' doesn't exist in motorwaymeans the latent was written under a different key. - The dropdown only shows files already in the input folder; if you saved a latent in a session, it needs to be somewhere the loader can see it.
- Beta pack: the author's README warns "IF THINGS BREAK ITS BECAUSE I BROKE IT," and generated clones have been toggled off in some releases. Missing from the menu after install = beta, not you.
Latent loading is a "know it's there when you need it" feature. Now you know.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | COMBO | 0 options: | |
| OUTPUT_LATENT_key | STRING | LATENT | — |
| MOTORWAY 🚌💨opt | MOTORWAY 🚌💨 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — |