Load Image + Pad π
Outpainting that doesn't feel like assembling a puzzle by hand
- image
- mask
- width
- height
- stitcher
- reference
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_megapixelsrescales the source before padding so the final canvas lands on a target area (then re-rounds tocanvas_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 tocanvas_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.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMBO | Choose or upload an image from ComfyUI's input folder. | |
| pad_left | INT | 00β16384 | Pixels added to the left edge (drag the canvas edge on the node). |
| pad_top | INT | 00β16384 | Pixels added to the top edge (drag the canvas edge on the node). |
| pad_right | INT | 00β16384 | Pixels added to the right edge (drag the canvas edge on the node). |
| pad_bottom | INT | 00β16384 | Pixels added to the bottom edge (drag the canvas edge on the node). |
| mode | COMBO | color | color = 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_color | STRING | #808080 | Padding 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_blur | FLOAT | 0.500β1 | Pillarbox blur only: one knob for how strongly the backdrop is blurred and dimmed; 0 keeps it sharp and full brightness. |
| feather | INT | 00β2048 | Ramps the mask inward across the image edge on each padded side so the sampler blends the seam; 0 keeps the seam hard. |
| canvas_multiple | INT | 81β4096 | Rounds the final canvas up to this multiple; the remainder joins the right and bottom padding. |
| target_megapixels | FLOAT | 0.000β64 | 0 = 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)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | The padded image; the original pixels are untouched (resized only when a megapixel target is set). |
| mask | MASK | White over the new padding, feathered inward per the feather widget β feed it straight to an inpainter as the outpaint mask. |
| width | INT | Final canvas width after multiple/megapixel rounding. |
| height | INT | Final canvas height after multiple/megapixel rounding. |
| stitcher | AUSBOSS_STITCHER | Hand 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. |
| reference | IMAGE | The 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. |