Nodes/ComfyUI-Inpaint-CropAndStitch/(OLD πŸ’€ use Crop instead) Extend Image for Outpainting
ComfyUI Node

(OLD πŸ’€ use Crop instead) Extend Image for Outpainting

Retired into Inpaint Crop

By lquesadaΒ·Created 2 years agoΒ·Updated 2 months agoΒ· 1,136
(OLD πŸ’€ use Crop instead) Extend Image for Outpainting
  • image
  • mask
  • optional_context_mask
  • image
  • mask
  • context_mask
β—„modefactorsβ–Ί
β—„expand_up_pixels0β–Ί
β—„expand_up_factor1.00β–Ί
β—„expand_down_pixels0β–Ί
β—„expand_down_factor1.00β–Ί
β—„expand_left_pixels0β–Ί
β—„expand_left_factor1.00β–Ί
β—„expand_right_pixels0β–Ί
β—„expand_right_factor1.00β–Ί

InpaintExtendOutpaint - "Extend Image for Outpainting" - is a deprecated node from the Inpaint Crop and Stitch pack. Current ComfyUI labels it "(OLD πŸ’€ use Crop instead)", and that's the whole story: outpainting got folded into InpaintCropImproved, so you don't wire this in anymore. You've probably landed here from an older workflow, so here's what it was for.

What it did

Outpainting is just inpainting with the mask on the outside: you grow the canvas, mark the new empty area as the region to generate, and let the model paint what extends the scene. This node did the growing. Give it an image and mask, tell it how far to extend in each direction (up/down/left/right), and it returned a bigger image, a mask covering the new area, and a context mask - all set up to flow into the old crop-and-stitch chain. The payoff was that outpainting then inherited everything the pack is good at: rescaling before sampling, seamless blending, and stitching the extension back without disturbing the original pixels.

Why it's gone: in the April 2025 rewrite the author integrated extension directly into the Crop node as the extend_for_outpainting toggle (with per-direction extend_up/down/left/right_factor knobs). One node instead of two, and it stopped the old failure where expanding on all four directions and filling mask holes could mark the entire image as masked. The README is explicit that there's no replacement node - the feature moved into Crop. That's why this shows as obsolete rather than getting a "v2."

The inputs and outputs that matter

For an old graph you're keeping alive:

  • mode (default factors) - extend by a multiplier (factors) or by a raw pixel count (pixels).
  • expand_up_factor / expand_down_factor / expand_left_factor / expand_right_factor (default 1 each) - how far to grow each side. A factor above 1 adds canvas; 2 adds a full image-width of space in that direction. In pixels mode you use the matching expand_*_pixels inputs instead.

Outputs are image, mask, and context_mask, meant to feed the old crop node. To do this today: skip the node and turn on extend_for_outpainting in Inpaint Crop, then set the direction factors there.

How to install it

Comes with the pack. ComfyUI Manager: search ComfyUI-Inpaint-CropAndStitch and install. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/lquesada/ComfyUI-Inpaint-CropAndStitch.git

then restart ComfyUI. No models, no extra dependencies (GPL-3.0, by Luis Quesada Torres).

Common issues & troubleshooting

The whole image gets treated as masked when I extend on all sides. This is the exact bug that pushed the feature into Crop - the old node's extend-everywhere plus fill-holes could flood the mask. The fix is to use extend_for_outpainting on the improved Crop node, where that interaction was cleaned up.

"(OLD πŸ’€ use Crop instead)" title. Deprecation flag, not an error. It still runs; the author just wants you on the Crop node.

The extension looks pasted on / seams show. General outpainting advice applies: you want generous overlap and a decent blend, and outpainting usually needs a high denoise (roughly 0.8-1.0) because there's nothing there to preserve. On a modern stack, note that instruction-editing models and pad-and-prompt tricks now do quick outpainting too - but if the original image must survive byte-for-byte across several extensions, the crop-and-stitch route (via the improved Crop node) is still the one that guarantees it.

Categoryinpaint

Inputs (12)

NameTypeDefaultDescription
imageIMAGEβ€”
maskMASKβ€”
modeCOMBOfactors2 options: factors, pixels
expand_up_pixelsINT00–16384β€”
expand_up_factorFLOAT1.001–100β€”
expand_down_pixelsINT00–16384β€”
expand_down_factorFLOAT1.001–100β€”
expand_left_pixelsINT00–16384β€”
expand_left_factorFLOAT1.001–100β€”
expand_right_pixelsINT00–16384β€”
expand_right_factorFLOAT1.001–100β€”
optional_context_maskoptMASKβ€”

Outputs (3)

NameTypeDescription
imageIMAGEβ€”
maskMASKβ€”
context_maskMASKβ€”