Nodes/Eden.art nodesuite/Eden_IMG_padder
ComfyUI Node Runs on cloud

Eden_IMG_padder

Padding that matches the edge color β€” so your outpainting doesn't start from a black slab

By edenartlabΒ·Created 3 years agoΒ·Updated 6 months agoΒ· 119
Eden_IMG_padder
  • image
  • IMAGE
β—„pad_fraction0.00β–Ί
β—„pad_locationβ–Ύβ–Ί

Eden_IMG_padder extends an image with extra canvas on one side - and here's the thing that makes it worth using instead of a plain pad node: the added border is colored to match your image's actual edge. Pad the bottom of a sunset photo and you get a band the color of the horizon, not a black bar. For outpainting workflows that's the difference between the sampler extending something coherent and extending into void.

How it works

The mechanism is simple and effective. You pick pad_fraction (what fraction of the image's own size to add) and pad_location (bottom, top, left, right). The node looks at the last few pixels along that edge - the source averages over a small edge strip - and fills the new border with a solid band of that mean color. Solid, not gradient: it's one flat color matched to the edge, which is exactly what an outpainting sampler wants as its starting context.

Inputs

  • image (IMAGE) - input tensor.
  • pad_fraction (default 0, 0–1) - added size relative to the image. 0.25 on a 1024px image adds 256px.
  • pad_location - bottom, top, left, right. One side per call; stack two nodes if you need two sides.

Output is a single IMAGE with the border appended.

Why you'd reach for it

Outpainting is the headline use: pad one side with edge-matched color, run img2img at low denoise, let the sampler invent the extended scene, then crop back - a two-node dance with Eden_IMG_unpadder on the other end. It's also a cheap way to fix aspect ratios before a model that demands specific dimensions, or to buy canvas for a composite you're about to paste onto. The edge-color match is the whole point; generic zero-padding gives samplers a seam to stumble over, and this avoids that without any image-analysis dependency.

Installing it

Part of the Eden.art nodesuite. ComfyUI Manager: search "Eden.art nodesuite." Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/edenartlab/eden_comfy_pipelines
cd eden_comfy_pipelines && pip install -r requirements.txt

Restart ComfyUI. The pack installs heavy pinned deps (clip-interrogator, open_clip_torch, transformers, scikit-image…), more than this node needs, but that's the cost of the suite.

Common issues

The border is a flat mean color, so it won't perfectly match a busy edge - on textured images the seam is visible until you denoise over it. That's expected; the pad is context, not a finished extension. Also, padding only ever adds one side per node instance. If you want symmetric padding around an image, that's two calls (or a different node). And pad_fraction is relative to the perpendicular dimension for left/right pads - read it as "fraction of the image's width/height," whichever axis you're extending along.

CategoryEden 🌱/Image

Inputs (3)

NameTypeDefaultDescription
imageIMAGEβ€”
pad_fractionFLOAT0.000–1β€”
pad_locationCOMBO4 options: bottom, top, left, right

Outputs (1)

NameTypeDescription
IMAGEIMAGEβ€”