Inpaint Stitcher (Advanced)
Paste that inpainted crop back without leaving a seam
- original_image
- processed_crop
- blend_mask
- stitched_image
So you did the smart thing and inpainted a cropped region at full resolution. Now the question is whether it goes back into the original image cleanly or comes back wearing its edges like a collar. Inpaint Stitcher is the second half of TextureAlchemy's crop-and-stitch pair: feed it the original image, the processed crop, and the bounding box from Inpaint Crop Extractor, and it composites the fix back into place - with the option to feather the boundary so the seam disappears instead of shouting.
It exists for the same reason its partner does: instruction-edit models and inpainting samplers both degrade or blur the rest of the frame if you run them on the whole image. Stitch the edited crop back over the untouched original and you get bit-identical pixels everywhere except the region you meant to change. That's the entire value, and it's a real one - it's the one thing a full-image edit model can't give you.
How it works
The node clones the original, resizes the processed crop to the bbox dimensions if they don't match, and handles channel mismatches (RGB crop onto RGBA original and vice versa) automatically. Then it pastes. Two blend modes:
- replace - a hard composite. Fast, exact, but any lighting or color mismatch at the crop edge is fully visible. Use it when the crop blends naturally or you're going to grade afterward.
- blend - softens the boundary. Combined with the
featherslider (0–100px), it ramps the crop's influence down toward its edges so the transition fades instead of cutting. This is the one you'll want for most inpainting.
The blend_mask input is the refinement: pass a mask (e.g., the cropped mask from the extractor, feathered) to control exactly where blending happens, instead of relying on a uniform feather. The node also clamps negative bbox coordinates and crops to the visible region, so the padding you added in the extractor doesn't cause out-of-bounds errors - a real annoyance with hand-rolled paste nodes that this one just handles.
The single output is stitched_image: the original with the processed crop in place.
The inputs that matter
- original_image and processed_crop - where the fix came from and where it goes.
- bbox_x / bbox_y / bbox_width / bbox_height - wire these straight from Inpaint Crop Extractor's outputs; you do not want to type them by hand.
- blend_mode + feather - start with
blendand feather 8–24px; only drop toreplaceif you have a reason.
Installing it
Ships with ComfyUI-TextureAlchemy. ComfyUI Manager → search "TextureAlchemy" → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/amtarr/ComfyUI-TextureAlchemy
Restart and find it under Texture Alchemist → Inpainting. No extra dependencies or model downloads.
Common issues
- "There's a visible rectangle." Either
blend_modeis onreplaceor the feather is too small. Bumpfeatherup; if it persists, feed a featheredblend_maskfrom the extractor'scropped_mask. - "The crop looks squished." The node resizes your processed crop to the bbox size, so if your sampler output was a different aspect ratio, it'll stretch. Generate the crop at the bbox dimensions.
- "The stitched area has the wrong brightness." A hard edge isn't the only seam - lighting mismatch is the other. Feather helps, but if the fix is much darker or lighter than the surroundings, you're better off grading the crop before stitching.
The pair is more setup than a one-node "just inpaint," but the payoff - full-resolution detail where it matters, untouched pixels everywhere else - is exactly why the community built workflows around it.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| original_image | IMAGE | — | |
| processed_crop | IMAGE | — | |
| bbox_x | INT | 00–16384 | — |
| bbox_y | INT | 00–16384 | — |
| bbox_width | INT | 5121–16384 | — |
| bbox_height | INT | 5121–16384 | — |
| blend_mode | COMBO | replace | Replace: hard composite, Blend: soft edges |
| feather | INT | 00–100 | Feather/blend edges (pixels, only for blend mode) |
| blend_maskopt | MASK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| stitched_image | IMAGE | — |