Outpaint to Image (WLSH)
Extend a canvas and get a ready-to-use mask
- image
- IMAGE
- MASK
Worth saying up front: if all you want is "make this image bigger and fill in something plausible," a modern instruction-editing model can now do that from a sentence and a couple of pad nodes, no mask required - that's genuinely become the easier path for most casual outpainting since 2025. Where masked outpainting like this node still earns its place is when you need exact control over the extension area and a real mask to drive a proper denoise pass, especially if you're staying in an SD1.5/SDXL pipeline rather than jumping to an edit model. This node handles the setup mechanics for that: canvas extension plus a matching mask, in one step.
What it does. Give it an image and a direction (left, right, up, or down - one side per call), and it extends the canvas by pixels in that direction, filling the new region and generating a MASK that marks it for inpainting. mask_padding adds a soft blurred border around the edge of that mask rather than a hard cutoff, which is exactly the "generous overlap, adequate blur" advice that shows up everywhere in outpainting discussions - a hard-edged mask is what produces the visibly pasted-on seam people complain about, and this node bakes the fix into the mask itself rather than leaving it to you to remember.
One design detail to plan around: this extends in a single direction per call. If you want to grow an image on two sides (or all four), you run it twice - once per direction, feeding the output of the first call into the second. There's no "extend all sides" mode built in.
Inputs and what you set: image (your source), direction, pixels (default 128 - how far out you're extending), mask_padding (default 12 - how soft the mask's edge is). Outputs: IMAGE (the extended canvas, new region filled but not yet generated) and MASK (the region to inpaint). The typical next steps: encode with a VAE-for-inpaint node - this pack's own VAE Encode for Inpaint w/Padding (WLSH) fits naturally here - run it through a KSampler at a high denoising strength (0.8-1.0 is standard for outpainting since the new region needs to be mostly new content), decode, and if the seam still shows after that pass, this pack's Generate Border Mask node is built specifically to clean it up in a second, cheaper pass over just the boundary.
Installing it
Via ComfyUI Manager: search "wlsh_nodes" or "WLSH Nodes", install, restart. Manually: cd ComfyUI/custom_nodes && git clone https://github.com/wallish77/wlsh_nodes, restart ComfyUI. No models required for this node itself - you'll need whatever checkpoint you're generating with, same as any other workflow.
Common issues
The classic outpainting failure - a visible seam where old and new pixels meet - usually traces back to one of two things: too little mask_padding (the blend zone was too thin to hide the transition), or a denoising strength on the following KSampler that's too low to actually commit to generating real content in the new area. If the extension looks "pasted on" after your first pass, don't fight it there - that's what the second-pass border-mask fix is for, rather than cranking denoise on the whole region again and risking changes to parts of the image you wanted to keep. Also worth a sanity check if outputs look wrong: direction needs to match which side you're actually trying to grow - an easy thing to leave stale after copy-pasting the node.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| direction | COMBO | 4 options: left, right, up, down | |
| pixels | INT | 12832–512 | — |
| mask_padding | INT | 120–64 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |