Nodes/Smart Image Crop and Stitch/Smart Image Stitcher (Still)
ComfyUI Node

Smart Image Stitcher (Still)

The other half of crop-and-stitch — where the seam is won or lost

By HallettVisual·Created 2 months ago·Updated 2 months ago· 40
Smart Image Stitcher (Still)
  • original_image
  • processed_image
  • stitcher_info
  • mask
  • IMAGE
feather_pixels32
blend_modeBox Feather
resize_full_image_outputRestore Original Size
enable_color_matchfalse
color_match_amount0.35

Any node can crop an image. Putting the processed result back without a visible seam is where crop-and-stitch lives or dies, and that's the job Smart Image Stitcher exists for. It takes the patch your model just generated, shrinks it back down to the slot it came from, and composites it onto the original with a feathered blend. If you've ever stared at a hard rectangle where an inpainted region used to be, this node is the part of the workflow you were missing.

It's the partner to Smart Image Crop, and it's a reworking of the same pattern that made lquesada/ComfyUI-Inpaint-CropAndStitch the community default for masked edits. The whole point: only the cropped region gets regenerated, and the stitcher pastes it back so the rest of the frame stays byte-for-byte untouched. That guarantee is why people still reach for masks at all in 2026 - an edit model like Qwen-Image-Edit or Flux 2 Klein re-renders the whole frame and everything drifts a little; crop-and-stitch doesn't.

How it works

You feed it the original_image, the processed_image (whatever your inpaint/detail/upscale chain produced from the crop), and stitcher_info - the DICT that Smart Image Crop emitted, which tells the stitcher where the crop came from and what size to restore it to.

The key move is downscaling. The AI gave you a high-res patch; the stitcher resizes it back to the crop's original slot using area interpolation, which is the right choice for shrinking (bicubic would alias). Then it builds a blend mask and composites:

  • Box Feather (default) - a feathered border around the whole crop rectangle. Reliable and easy.
  • Mask Feather - uses the optional mask input so the blend follows the actual mask shape instead of a rectangle. Better for organic regions, and it gets a Gaussian blur based on feather_pixels.
  • Hard Paste - no feathering at all. If feather_pixels is 0, the two feather modes behave like a hard paste too, per the README.

The settings that matter

  • feather_pixels - the seam control. Too small and you see the boundary; too big and the change bleeds into untouched areas. 32 is a sane start.
  • enable_color_match / color_match_amount - off by default, and it should stay off until you notice a problem. When your inpainted region comes back with slightly different color or contrast than the surrounding image (a classic failure with edit models), enabling this shifts the patch's color statistics toward the original region before stitching. color_match_amount scales the correction: 0 disables, 1 applies full correction, 0.35 is the default for a nudge.
  • resize_full_image_output - Restore Original Size or Keep Resized Image. This only matters if Smart Image Crop ran in its no-mask Resize Full Image mode, i.e. you used the pair as a whole-frame upscaler. Pick whether you want the original resolution back or the big version as the final output.

One nice safety net: if the crop node was bypassed (or stitcher_info says bypass), the stitcher just returns the original image unchanged. So you can bypass the entire crop-and-stitch pair and the graph keeps working.

Installing it

Same pack as the crop node - you get both at once.

cd ComfyUI/custom_nodes
git clone https://github.com/HallettVisual/ComfyUI-Smart-Image-Crop-and-Stitch.git

Restart ComfyUI; both nodes appear under Smart Image Tools. It's also discoverable via ComfyUI Manager (registry id smart-image-crop-and-stitch). The only dependency is opencv-python, no model downloads. It's also worth knowing the author: HallettVisual previously built "Regional Prompt Upscaler," a tile-based upscaler that was all about overlap and feathering - seam quality is clearly where they've spent the effort, and it shows here.

Common issues

  • Visible rectangle instead of a blend - you're on Hard Paste, or feather_pixels is 0. Check both.
  • Color mismatch at the seam - the inpainted region doesn't match the surroundings. That's what enable_color_match is for; turn it on before you start hand-painting correction layers.
  • Wrong final size in a full-image upscale - check resize_full_image_output. If you resized the whole image and expected the big version but got the original back, it's set to Restore Original Size.
  • Nothing happens - if stitcher_info is missing, disconnected, or from a stale workflow, the stitcher passes the original through. Re-run the crop node so it emits fresh info.

The crop gets all the attention, but this node is where the quality of the final image is actually decided. Get the feather and color match right and nobody will be able to tell where the edit happened - which is exactly the point.

CategorySmart Image Tools

Inputs (9)

NameTypeDefaultDescription
original_imageIMAGE
processed_imageIMAGE
stitcher_infoDICT
feather_pixelsINT320–256
blend_modeCOMBOBox FeatherChoose the stitch mask. Feather amount applies to both box and mask feather modes.
resize_full_image_outputCOMBORestore Original SizeOnly affects Crop node no-mask mode: Resize Full Image.
enable_color_matchBOOLEANfalseWhen enabled, shifts the processed crop toward the original region's color and contrast before stitching.
color_match_amountFLOAT0.350–1Matches the processed crop color statistics toward the original image before stitching. 0 disables it, 1 applies full correction.
maskoptMASK

Outputs (1)

NameTypeDescription
IMAGEIMAGE