ImagePadForOutpaint_motorway_edition
The classic outpainting pre-step, now fed by the Motorway
- MOTORWAY 🚌💨
- MOTORWAY 🚌💨
Outpainting is the workflow where you extend a picture beyond its edges and let the model imagine what's around the corner. The first step is always the same: pad the image with blank canvas and make a mask that says "regenerate the border, leave the middle alone." ImagePadForOutpaint is that step. ImagePadForOutpaint_motorway_edition is the same node reading its image from and writing its results to a MOTORWAY 🚌💨 pipe.
It comes from agilly1989/ComfyUI_agilly1989_motorway, the author's key-value pipe pack. It reads the image under INPUT_image_key (default "image"), pads all four sides, and stores two things back in the pipe: the padded image and the mask covering the new border.
Inputs that matter
INPUT_image_key(default"image") - pipe key of the sourceleft,top,right,bottom(INT, 0 to 16384, step 8) - pixels of padding per side. They snap to multiples of 8feathering(INT, default 40) - softness of the mask edge where it meets the original imageOUTPUT_IMAGE_key(default"IMAGE") - the padded imageOUTPUT_MASK_key(default"MASK") - the border mask
Two outputs, two keys. The padded image is the thing you'll VAE-encode and feed to the sampler; the mask tells the sampler which region to actually regenerate. feathering matters more than it looks: too low and you'll see a hard seam where new content meets old; 40 is a sensible starting point. The step-8 snapping on the padding is deliberate - latent spaces like dimensions divisible by 8.
How it works
Standard clone mechanics: pop the Motorway, pull the image out by key, run stock ImagePadForOutpaint with your padding values, store the image and mask under their output keys, and return a cloned pipe. From there the classic recipe continues: encode the padded image, feed the border mask in, sample at low denoise so the center stays put, then composite back. The KB's note on masked outpainting applies here - this route gives you bit-identical unmasked pixels, which instruction-edit models still can't promise.
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 downloads.
Gotchas
Keys are exact and case-sensitive - a 'MotorwayClass' object has no attribute 'hash_' error means "image" was never written to the pipe. And note this node writes uppercase keys ("IMAGE", "MASK") but reads lowercase ("image"), so chained clones need hand-aligned key strings. Family status as always: BETA, and the motorway_edition clones are disabled in the 1.1.7 hotfix - if the node's missing, stock ImagePadForOutpaint is the identical tool with wires.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — | |
| INPUT_image_key | STRING | image | — |
| left | INT | 00–16384 | — |
| top | INT | 00–16384 | — |
| right | INT | 00–16384 | — |
| bottom | INT | 00–16384 | — |
| feathering | INT | 400–16384 | — |
| OUTPUT_IMAGE_key | STRING | IMAGE | — |
| OUTPUT_MASK_key | STRING | MASK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — |