ImageBatch_motorway_edition
Stack two images into one batch, keyed through the Motorway
- MOTORWAY ππ¨
- MOTORWAY ππ¨
Batches are how ComfyUI moves more than one image at a time - a single IMAGE tensor with a batch dimension instead of a pile of separate images. ImageBatch is the node that makes one of those out of two images. This version, ImageBatch_motorway_edition, is that same node with its inputs and output moved into a MOTORWAY ππ¨ pipe.
It comes from agilly1989/ComfyUI_agilly1989_motorway, a hobby pipe pack that stores values under named keys and shuttles them around so your graph doesn't turn into wire spaghetti. The wrapper clones stock ImageBatch, reads both source images out of the pipe by key, concatenates them along the batch dimension, and writes the combined image back into the pipe.
Inputs and outputs that matter
INPUT_image1_key(default"image1") - pipe key of the first imageINPUT_image2_key(default"image2") - pipe key of the secondOUTPUT_IMAGE_key(default"IMAGE") - key the stacked result lands under
Output is just the Motorway pipe. The combined image isn't on a wire; it's parked under OUTPUT_IMAGE_key for the next node that reads it.
Where you actually hit this in the wild: you've got two separately generated images (or two frames) and you want to feed them to a sampler or a batch-aware processor in one pass. Or you're building a comparison and need both in a single batch to VAE-decode together. Note the requirements don't change - the two source images still need the same width and height, because you can't concatenate mismatched tensors along the batch axis.
How the wrapper works
The pattern is the same across every *_motorway_edition node: pop the Motorway, pull each input out using its INPUT_*_key string, run the underlying stock node with your widget values, store each output under its OUTPUT_*_key, and hand back a cloned pipe so nothing upstream is mutated. It's stock ImageBatch underneath - no behavior invented here.
Installing
cd ComfyUI/custom_nodes
git clone https://github.com/agilly1989/ComfyUI_agilly1989_motorway
Restart ComfyUI, or search "motorway" in ComfyUI Manager. No requirements.txt, no model files - pure Python.
Gotchas
Keys are exact and case-sensitive; a 'MotorwayClass' object has no attribute 'hash_' error means your key string doesn't match anything in the pipe yet. And a warning worth repeating for every node in this pack: it's BETA ("if things break it's because I broke it"), and the motorway_edition clone family is currently disabled in the 1.1.7 hotfix, so don't panic if this node doesn't show up in your menu on the latest release - the stock ImageBatch will do the same job, just with wires.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| MOTORWAY ππ¨ | MOTORWAY ππ¨ | β | |
| INPUT_image1_key | STRING | image1 | β |
| INPUT_image2_key | STRING | image2 | β |
| OUTPUT_IMAGE_key | STRING | IMAGE | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MOTORWAY ππ¨ | MOTORWAY ππ¨ | β |