VAELoader_motorway_edition
Load the VAE once, use it in every decode
- MOTORWAY 🚌💨
- MOTORWAY 🚌💨
The VAE is the codec of the whole pipeline: it compresses pixels into latent space and decompresses them back out. VAELoader is the node that loads one from models/vae - and in a graph that encodes and decodes in several places, a single loaded VAE shared everywhere is exactly the kind of thing a pipe system is for. This _motorway_edition clone loads the VAE once and stores it in the agilly1989 Motorway dict, so every encode and decode in the graph can pull it by key instead of each carrying its own wire.
Motorway, in one breath: start with MotorwayStart, then each _motorway_edition node trades data wires for key strings, reading and writing a shared dict that flows down one MOTORWAY connection. These nodes are auto-generated clones of core ComfyUI nodes, so underneath this is the plain VAELoader.
What it does. vae_name is the dropdown listing everything in models/vae (plus the approximate/TAESD tiny decoders if you've got them). Pick one, and the loaded VAE is stored in the Motorway under the key set by OUTPUT_VAE_key - default VAE, uppercase. That's the whole job. Later, your VAEDecode_motorway_edition or VAEEncode_motorway_edition pulls it back out via its INPUT_vae_key.
The inputs that matter. MOTORWAY is optional, as it is for all the loader clones - connect an existing Motorway to add to it, or leave it unconnected to act as a fresh start. vae_name and OUTPUT_VAE_key are the only real fields. Single output: the MOTORWAY port.
Common issues. The case trap is baked into the defaults and it's the #1 stumbling block: this node stores under VAE uppercase, but every consumer's INPUT_vae_key defaults to vae lowercase. If your decode fails with 'MotorwayClass' object has no attribute 'hash_', that mismatch is why - set the consumer's key to VAE. Then there's the VAE wisdom that predates this pack entirely: modern checkpoints bake their own VAE in, so loading a separate one is only right when you specifically want a different codec (the SD 1.5 grey-wash fix is the famous case) or a TAESD for fast previews. A wrong-architecture VAE gives you flat color or noise, not a subtle change. And the standing caveat: the pack's current main branch has the clone registration commented out in __init__.py, so if the node's missing from your menu, that's the version you have.
Install via ComfyUI Manager (search "ComfyUI_agilly1989_motorway") or git clone https://github.com/agilly1989/ComfyUI_agilly1989_motorway into custom_nodes, restart. No models to download (VAE files go in models/vae as usual), no dependencies. Solo-dev beta pack - treat the Motorway as a convenience layer and this becomes the tidy way to keep one VAE feeding the whole graph.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| vae_name | COMBO | 0 options: | |
| OUTPUT_VAE_key | STRING | VAE | — |
| MOTORWAY 🚌💨opt | MOTORWAY 🚌💨 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — |