Nodes/ComfyUI_agilly1989_motorway/SaveLatent_motorway_edition
ComfyUI Node

SaveLatent_motorway_edition

Parking your raw latent on disk, via the Motorway

By agilly1989·Created 2 years ago·Updated about a year ago· 7
SaveLatent_motorway_edition
  • MOTORWAY 🚌💨
  • MOTORWAY 🚌💨
INPUT_samples_keysamples
filename_prefixlatents/ComfyUI

Most save nodes write pixels. SaveLatent_motorway_edition writes something else entirely: the raw latent - the compressed internal representation that sits before the VAE decode turns it into an image. It's the clone of ComfyUI's built-in SaveLatent, re-plumbed for the Motorway bus, and it's a niche tool with one genuinely useful job: checkpointing a half-finished pipeline so you can resume later without re-running the sampling.

Think of it like saving a game mid-level instead of after the boss. You sample, you like where the latent is going, you save it; tomorrow you load that latent back (with LoadLatent), run a different scheduler, tweak the VAE decode, or apply a different upscale - all without redoing the expensive denoising. It also shows up in workflows that hand latents between tools, and in _for_testing-adjacent experiments. The tradeoff: a latent is only meaningful to the model that made it. Save a latent from an SD 1.5 model and try to decode it with an SDXL VAE and you get garbage. It's a cache, not a portable file.

The widgets:

  • filename_prefix (default latents/ComfyUI) - note the subfolder. Your latents go to ComfyUI/output/latents/. Keep the prefix meaningful if you'll have several.
  • INPUT_samples_key (default samples) - the bus key your LATENT object lives under. In the default convention, samplers park their output latent under samples, which is exactly what the default matches.

Like the other save nodes in this pack, it passes the Motorway bus through on output, and it isn't flagged as an output node - so it writes the file but doesn't get ComfyUI's endpoint treatment.

Installing it

Part of ComfyUI_agilly1989_motorway. ComfyUI Manager: search ComfyUI_agilly1989_motorway, install, restart. Or:

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

No extra dependencies, no model files.

The catch

The pack's standing caveats: release 1.1.7 ships with the clones disabled, so uncomment the two ClonedNodeMapping lines in custom_nodes/ComfyUI_agilly1989_motorway/__init__.py and restart to see any *_motorway_edition node. And it's a beta from a solo dev whose README literally opens with "BIG BROKEN WITH ASYNC WILL FIX WHEN I GET THE TIME/MOTIVATION." If you only need to persist a latent occasionally, the stock SaveLatent is the dependable route; this one exists so you can keep the entire pipeline - including the cache step - on the Motorway.

Categoryagilly1989 Nodes/Motorway-ed/_for_testing

Inputs (3)

NameTypeDefaultDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨
INPUT_samples_keySTRINGsamples
filename_prefixSTRINGlatents/ComfyUI

Outputs (1)

NameTypeDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨