VAEEncodeTiled_motorway_edition
Encode huge images (and video) without the OOM
- MOTORWAY 🚌💨
- MOTORWAY 🚌💨
Encoding a 4K image or a long video into latent space is a memory hog - the whole frame stack goes through the VAE at once and small GPUs throw OOM errors for fun. VAEEncodeTiled is the answer: it processes the image in overlapping tiles, encoding one chunk at a time, and reassembles the latent. This _motorway_edition clone brings that tiled encode to the agilly1989 Motorway pipe, reading the image and VAE from the shared dict by key.
Motorway primer: start with MotorwayStart, then each _motorway_edition node swaps 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 the tiling behavior is identical to stock VAEEncodeTiled.
What it does. It takes pixels and a vae and encodes to a latent, but the image is split into tiles first. tile_size (default 512) is the tile edge, overlap (default 64) keeps tile seams from showing. The temporal_size (64) and temporal_overlap (8) fields are the video part - per the stock tooltip, they're "only used for video VAEs" and control how many frames get encoded at once and how much they overlap. That's how you feed a long video clip into an img2img-style workflow without the encode being the thing that kills your run.
The inputs that matter. MOTORWAY is required. INPUT_pixels_key (default pixels) and INPUT_vae_key (default vae) point at the image and VAE in the dict - mind the case trap, since VAELoader_motorway_edition stores under VAE uppercase by default and you'll need to match that in INPUT_vae_key. OUTPUT_LATENT_key (default LATENT) is where the encoded latent lands. Output: the MOTORWAY port only.
Common issues. Tiling trades VRAM for time: big images take noticeably longer to encode tiled, and too-small overlap can leave faint seams in the latent that show up after sampling. The Motorway's key/case traps are the other recurring pain - 'MotorwayClass' object has no attribute 'hash_' is just "key not found," so double-check spellings before blaming the node. And the standing caveat: the pack's current main branch has the clone registration commented out in __init__.py, so if this node is missing from your menu, that's the version you're on.
Install via ComfyUI Manager (search "ComfyUI_agilly1989_motorway") or clone into custom_nodes, restart, no models to download. Solo-dev beta pack - the README literally says "it works on my system," which is a fine bar for a VRAM-saving wrapper like this one.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — | |
| INPUT_pixels_key | STRING | pixels | — |
| INPUT_vae_key | STRING | vae | — |
| tile_size | INT | 51264–4096 | — |
| overlap | INT | 640–4096 | — |
| temporal_size | INT | 648–4096 | Only used for video VAEs: Amount of frames to encode at a time. |
| temporal_overlap | INT | 84–4096 | Only used for video VAEs: Amount of frames to overlap. |
| OUTPUT_LATENT_key | STRING | LATENT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — |