Simple Inpaint Stitch ⚡
Putting the edited pixels back without the seam
- original_image
- processed_crop
- bbox_data
- blend_mask
- result
The crop was easy. The hard part of mask-based inpainting is always getting the edit back onto the original so you can't tell anything happened. Simple Inpaint Stitch is the return half of the Simple Inpaint Crop workflow - it takes your processed crop, the original image, and the bbox_data bundle, and pastes the edit home. The bundle is the trick: because the crop node already recorded where the crop came from, this node doesn't ask you to remember coordinates.
How it works
Feed it original_image, processed_crop, and bbox_data (straight from Simple Inpaint Crop's bbox_data output). It pastes the crop back at the recorded box, and it handles the annoyances silently:
- Size mismatch - if your edited crop came back at a different resolution than the box (you upscaled before sampling, say), it resizes the crop to fit the box automatically.
- Channel mismatch - RGB crop meeting an RGBA original (or vice versa) gets reconciled by adding or dropping an alpha channel.
- Out-of-frame boxes - a mask that ran to the image edge produces a bbox that extends past the border, and the node clips both the paste region and the crop to the visible area instead of erroring.
Then there's blend_mode. replace is a hard composite - good when the model nailed the edges, bad when it didn't. blend feathers the boundary: either by feather pixels (default 8) or, better, by an optional blend_mask you supply - the classic move is wiring in the edge_mask from the pack's Seamless Tiling Maker so the seam repair is soft exactly where the texture changed.
The honest take
This is the right tool for the crop-and-stitch loop, but respect what it can't do. It's a paste node, not a color-matcher: if the model shifted the color of the region, the hard edge will be invisible while the region visibly doesn't match the neighbors. You fix that upstream (denoise, prompt, or a color-match step), not here.
Installing it
Part of amtarr/ComfyUI-TextureAlchemy - ComfyUI Manager "Texture Alchemy", or:
cd ComfyUI/custom_nodes
git clone https://github.com/amtarr/ComfyUI-TextureAlchemy
Restart, then right-click → Add Node → Texture Alchemist → Inpainting → Simple. No extra dependencies, no models.
Where people get burned
The auto-resize is a blessing and a curse - if you feed it a crop that's wildly off size, the resample softens it, and you've lost the resolution you cropped to protect. Keep the crop close to the box size. And remember that hard replace will faithfully paste in any edge artifact the sampler left; if the result shows a rectangle, re-run with blend on. The pack prints its usual console banner each run - normal.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| original_image | IMAGE | — | |
| processed_crop | IMAGE | — | |
| bbox_data | BBOX_DATA | — | |
| blend_mode | COMBO | replace | Replace: hard edge, Blend: soft edge |
| feather | INT | 80–100 | Edge feathering in pixels (blend mode only) |
| blend_maskopt | MASK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| result | IMAGE | — |