Nodes/ComfyUI_agilly1989_motorway/ImagePadForOutpaint_motorway_edition
ComfyUI Node

ImagePadForOutpaint_motorway_edition

The classic outpainting pre-step, now fed by the Motorway

By agilly1989·Created 2 years ago·Updated about a year ago· 7
ImagePadForOutpaint_motorway_edition
  • MOTORWAY 🚌💨
  • MOTORWAY 🚌💨
INPUT_image_keyimage
left0
top0
right0
bottom0
feathering40
OUTPUT_IMAGE_keyIMAGE
OUTPUT_MASK_keyMASK

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 source
  • left, top, right, bottom (INT, 0 to 16384, step 8) - pixels of padding per side. They snap to multiples of 8
  • feathering (INT, default 40) - softness of the mask edge where it meets the original image
  • OUTPUT_IMAGE_key (default "IMAGE") - the padded image
  • OUTPUT_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.

Categoryagilly1989 Nodes/Motorway-ed/image

Inputs (9)

NameTypeDefaultDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨
INPUT_image_keySTRINGimage
leftINT00–16384
topINT00–16384
rightINT00–16384
bottomINT00–16384
featheringINT400–16384
OUTPUT_IMAGE_keySTRINGIMAGE
OUTPUT_MASK_keySTRINGMASK

Outputs (1)

NameTypeDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨