StableCascade_StageC_VAEEncode_motorway_edition
Get a real image into Stable Cascade's two-stage latent space
- MOTORWAY 🚌💨
- MOTORWAY 🚌💨
Stable Cascade's img2img is not "VAE-encode and go." Because the architecture has two stages, encoding an image into the pipeline produces two latents - a stage C latent and a stage B latent - and StableCascade_StageC_VAEEncode is the node that does both at once. This is the Motorway edition: the image and VAE come out of the pipe by key, and both latents go back in under keys.
This is the node you want when you're doing Cascade img2img - feeding a reference image into stage C so the composition follows it, or just using an existing image as the starting point for stage B's refinement. Mechanically it runs the VAE encode with the compression factor applied, producing the two latents in one pass rather than making you chain encode steps. Worth noting it's the standard path even if you only think you need one of the two latents: Cascade wants both in the pipe so the stages stay consistent.
What to set
INPUT_image_key(defaultimage) - the Motorway key holding the IMAGE you want to encode.INPUT_vae_key(defaultvae) - the Motorway key holding the VAE (the Cascade VAE, not an SDXL one).compression(default42, 4–128) - the latent compression factor, matched to what your Cascade checkpoint expects.OUTPUT_stage_c_key(defaultstage_c) - where the stage C latent is written.OUTPUT_stage_b_key(defaultstage_b) - where the stage B latent is written.
Output is the MOTORWAY with both latents stored, ready to feed the stage C and stage B samplers respectively.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/agilly1989/ComfyUI_agilly1989_motorway
Restart; it's under agilly1989 Nodes → Motorway-ed → latent → stable_cascade. ComfyUI Manager has the pack. No pip dependencies.
Where people get burned
The VAE must be the Cascade VAE. Stable Cascade doesn't share the SD/SDXL latent space, and the failure mode for feeding it a mismatched VAE is usually ugly noise, not a clean error message. Make sure the VAE key points at the one bundled with your Cascade checkpoint.
The compression mismatch is the second trap: encode with 42 but sample stage C with a checkpoint trained at a different compression and the latent dimensions don't line up, which surfaces as bizarre dimension errors or a broken stage B. Match it everywhere in the flow.
And the Motorway standard: keys are case-sensitive and exact, and 'MotorwayClass' object has no attribute 'hash_' means a key isn't in the pipe - check that image and vae were written upstream before this node runs. The pack is beta and the auto-cloned motorway-ed nodes have been toggled on and off across releases, so if an update hides the node, that's upstream, not a misinstall.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — | |
| INPUT_image_key | STRING | image | — |
| INPUT_vae_key | STRING | vae | — |
| compression | INT | 424–128 | — |
| OUTPUT_stage_c_key | STRING | stage_c | — |
| OUTPUT_stage_b_key | STRING | stage_b | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — |