Nodes/comfyui-artify/Inpaint Stitch (Artify)
ComfyUI Node

Inpaint Stitch (Artify)

The glue that puts your inpaint back exactly where it belongs

By ArtifyGames·Created 7 months ago·Updated 26 days ago· 0
Inpaint Stitch (Artify)
  • stitcher
  • inpainted_image
  • image

Inpaint Stitch (Artify) is the second half of a two-node inpainting pair, and it is nearly the whole point of the thing: it takes your model's inpainted result and pastes it back into the original image so precisely that the pixels outside your mask are untouched - bit for bit, never round-tripped through the VAE. That's the property that made the crop-and-stitch pattern (pioneered by lquesada's ComfyUI-Inpaint-CropAndStitch) the default way to get true masked inpainting out of models like Flux Fill or Qwen-Image-Edit in 2026. In the old days you had to remember to composite after inpainting or the whole canvas degraded a little with every pass; with this pair, that rule is built into the graph.

The node has two inputs and one output and nothing else to configure. That emptiness is deliberate - all the decisions were made upstream at the crop node.

How it works

The stitcher bundle from Inpaint Crop (Artify) carries everything Stitch needs: the original canvas, the crop's position and size, the blend mask, and the upscale/downscale algorithms you chose on the crop node. Stitch just executes:

  • It resizes the model output to the exact crop window - upscaling with the algorithm you picked (default bicubic) if it's smaller, downscaling (default bilinear) if it's bigger.
  • It handles the classic latent-rounding mismatch specially: if the model returned something a few pixels smaller than the crop (the changelog treats this as the normal case, DEFAULT_ALIGNMENT_GRID is 8), it top-left anchors and edge-pads instead of interpolating, because interpolation is where the drift sneaks in. The whole 0.2.4/0.2.5 changelog for this pack is a war on 1-pixel stitch drift.
  • It blends the inpainted region in using the blurred mask you set up at crop time (mask_blend_pixels, default 32), so the seam feathers out instead of showing a hard edge.
  • It composites onto the untouched original canvas and returns the full-size image.

Inputs and output

  • stitcher - required, type STITCHER, straight from Inpaint Crop (Artify). Do not feed it from another pack's crop node; the payload format is Artify's own and it will not match.
  • inpainted_image - whatever your model produced from the cropped_image / cropped_mask outputs.
  • image - the only output: the original image at full resolution with just the masked region replaced.

Wiring

A minimal chain: Load Image → Inpaint Crop → (your sampler/edit model) → Inpaint Stitch → Save. The stitcher wire runs from crop to stitch alongside the image path. Keep the pair from the same run - the stitcher holds that specific crop's geometry, so re-running the crop and then stitching an old model output is a mismatch you'll see as blur or misalignment.

Install

It's in the same tiny pack as its two siblings, with no real dependencies (requirements.txt is a comment). ComfyUI Manager: search ComfyUI-Artify. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/ArtifyGames/comfyui-artify.git

Restart ComfyUI, refresh the browser.

Gotchas

  • The crop does the aligning, you just benefit: Inpaint Crop internally snaps its crop to an 8px grid precisely so the model's latent output lands near the crop size. If your model output is still wildly off-size, Stitch rescales it - and a big rescale is where softness creeps in.
  • No mask, no magic: if your crop ran with no mask, the whole frame was "context," so Stitch has nothing to blend and you mostly get the image back. Fix it at the crop node, not here.
  • Batch-aware: it matches the stitcher to each image in the batch, but if your crop produced differing crop sizes it already errored upstream - so keep batches uniform.
CategoryArtify/Inpaint

Inputs (2)

NameTypeDefaultDescription
stitcherSTITCHERMetadata output from Inpaint Crop (Artify).
inpainted_imageIMAGEInpaint result to stitch back into the original image.

Outputs (1)

NameTypeDescription
imageIMAGE