Nodes/AusBoss/Load Image + Pad πŸ†Ž
ComfyUI Node

Load Image + Pad πŸ†Ž

Outpainting that doesn't feel like assembling a puzzle by hand

By ausbossΒ·Created 2 months agoΒ·Updated 3 days agoΒ· 2
Load Image + Pad πŸ†Ž
    • image
    • mask
    • width
    • height
    • stitcher
    • reference
    β—„imageβ–Ύβ–Ί
    β—„pad_left0β–Ί
    β—„pad_top0β–Ί
    β—„pad_right0β–Ί
    β—„pad_bottom0β–Ί
    β—„modecolorβ–Ί
    β—„fill_color#808080β–Ί
    β—„backdrop_blur0.50β–Ί
    β—„feather0β–Ί
    β—„canvas_multiple8β–Ί
    β—„target_megapixels0.00β–Ί

    Outpainting is where most people give up on masks. You load an image, pad it with a color, mask the padding, hope the seam disappears, and rebuild the whole rig every time you change the padding. Load Image + Pad πŸ†Ž is that entire setup compressed into one node: it loads an image and pads it into an outpaint canvas visually, producing the canvas, the mask, and the geometry you need to stitch it back - plus a reference output for the modern reference-latent models that do outpainting well.

    The setup, in one screen

    The node draws the padded canvas on itself. Drag any edge of the final rectangle to grow that side's padding - the whole edge is the handle - and per-side pixel counts ride the bands so you always know the numbers. The badge shows the true output size, and the pad_left/top/right/bottom widgets update to match. You're not typing four integers and hoping.

    Four padding modes cover what you want behind the seam: color (solid fill_color), edge (each side takes the average color of its nearest image edge), edge pixel (the outermost rows smear outward), and pillarbox blur (the image itself stretched, blurred, and dimmed behind the sharp original). backdrop_blur tunes that last one.

    The two settings that keep the result clean:

    • feather (default 0) ramps the mask inward across the image edge on each padded side, so the sampler blends the seam instead of drawing a hard line. For outpainting you usually want this on.
    • target_megapixels rescales the source before padding so the final canvas lands on a target area (then re-rounds to canvas_multiple). Resizing first keeps the mask seam crisp at sampler-friendly sizes.

    The outputs that make this a complete rig

    • image - the padded canvas, ready to encode.
    • mask - white over the new padding (feathered per your setting), straight into an inpainter as the outpaint mask.
    • width / height - the final canvas size as INTs, rounded up to canvas_multiple (default 8).
    • stitcher - hand this to Stitch Inpaint πŸ†Ž with the sampled result and only the new padding gets kept, with the original pixels restored bit-identically. It also carries where the source sits on the canvas - which is what the Krea 2 Outpaint Model Patch πŸ†Ž reads to place a reference.
    • reference - the unpadded source fitted to a small multiple of 16, for Krea 2 Encode πŸ†Ž and other reference conditioning. Wire it nowhere and nothing is computed.

    That stitcher + reference pairing is the interesting part in 2026: the canvas tells Krea 2 where the original sits, and Krea 2 Encode attaches the reference latents - which is what makes an outpaint actually continue the source instead of painting something adjacent to it.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/ausboss/ComfyUI-AusBoss.git
    

    Restart ComfyUI and search for AusBoss (Manager: ComfyUI-AusBoss). No extra Python dependencies; minimum ComfyUI 0.27.1.

    Troubleshooting

    If the seam shows hard even with feathering, the mask is being painted into a model that ignores soft masks - raise feather or check the sampler. If the canvas comes back an odd size, canvas_multiple rounds it up; set it to what your model wants. And the classic mistake: pad all four sides and the geometry breaks - the Krea 2 patch node has a whole "extend one axis at a time" rule for that, spelled out on its own page.

    CategoryπŸ†Ž AusBoss/Image

    Inputs (11)

    NameTypeDefaultDescription
    imageCOMBOChoose or upload an image from ComfyUI's input folder.
    pad_leftINT00–16384Pixels added to the left edge (drag the canvas edge on the node).
    pad_topINT00–16384Pixels added to the top edge (drag the canvas edge on the node).
    pad_rightINT00–16384Pixels added to the right edge (drag the canvas edge on the node).
    pad_bottomINT00–16384Pixels added to the bottom edge (drag the canvas edge on the node).
    modeCOMBOcolorcolor = solid fill_color; edge = each side takes the average color of the nearest image edge; edge pixel = the outermost rows and columns smear outward; pillarbox blur = the image itself, stretched to cover the canvas, blurred and dimmed behind the sharp original.
    fill_colorSTRING#808080Padding color for the color mode; accepts #RGB/#RRGGBB hex, R, G, B (0-255 or 0..1 floats), one grayscale number, or a CSS color name. Other modes ignore it.
    backdrop_blurFLOAT0.500–1Pillarbox blur only: one knob for how strongly the backdrop is blurred and dimmed; 0 keeps it sharp and full brightness.
    featherINT00–2048Ramps the mask inward across the image edge on each padded side so the sampler blends the seam; 0 keeps the seam hard.
    canvas_multipleINT81–4096Rounds the final canvas up to this multiple; the remainder joins the right and bottom padding.
    target_megapixelsFLOAT0.000–640 = off. Rescales the SOURCE so the padded canvas lands on this many megapixels (then re-rounds to canvas_multiple) β€” resizing before padding keeps the mask seam crisp.

    Outputs (6)

    NameTypeDescription
    imageIMAGEThe padded image; the original pixels are untouched (resized only when a megapixel target is set).
    maskMASKWhite over the new padding, feathered inward per the feather widget β€” feed it straight to an inpainter as the outpaint mask.
    widthINTFinal canvas width after multiple/megapixel rounding.
    heightINTFinal canvas height after multiple/megapixel rounding.
    stitcherAUSBOSS_STITCHERHand to Stitch Inpaint πŸ†Ž with the sampled result to keep only the new padding and restore the original pixels bit-identically. Also carries where the source sits on the canvas, which Krea 2 Outpaint Model Patch πŸ†Ž reads to place the reference.
    referenceIMAGEThe source alone, no padding, fitted to a small multiple of 16 β€” the reference image for Krea 2 Encode πŸ†Ž and other reference conditioning. Wire it nowhere and nothing is computed.