〽️ Image Ops Crop Stitch
Fix one region, keep the whole frame — stitch an edit back into the original
- original
- crop
- crop_mask
- image
- mask
ImageOps Crop Stitch is the second half of a two-node workflow, and it's the part that makes the first half useful. You crop a region out with ImageOps Resize/Crop, edit or regenerate that crop in isolation, then feed the original image, the edited crop, and the crop's mask into this node - and it pastes your edit back into the original frame, blended at the seam. It's from the ComfyUI-Majoor-ImageOps pack, and it exists for one very practical reason: you don't want to regenerate or repaint a whole frame when only one region needs changing.
Why this is worth having
ComfyUI gives you inpainting for the "fix a region" problem, but inpainting is heavy - it re-runs a model over the region. Crop Stitch is the lightweight, deterministic alternative for edits that aren't generative: you upscaled a patch, you painted over a flaw in the crop, you color-corrected a section, and you need it back in place with everything else untouched. Because the stitch works in source-image coordinates, the surrounding frame stays pixel-identical. That's a level of "surgical edit" that plain crop-and-composite workflows don't give you.
How it works
You give it original (the untouched image/video), crop (your edited region), and - the piece that makes it all line up - crop_mask, which is exactly the source-space mask that ImageOps Resize/Crop outputs as its crop_mask output. Wire that mask from the crop node and the stitch knows precisely where the crop lived in the original. feather (0–128) softens the mask edge before compositing, which is how you hide the seam - a few pixels of feather blends your edit into the surrounding image instead of leaving a hard rectangle. bypass returns the original untouched for A/B.
Outputs are image (the stitched result) and mask (the composited alpha). Batch-first like the rest of the pack, so a video clip stitches frame-by-frame in one pass.
Install
ComfyUI Manager (search "ComfyUI-Majoor-ImageOps"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/MajoorWaldi/ComfyUI-Majoor-ImageOps
Restart and hard-refresh the browser (Ctrl+F5 / Cmd+Shift+R). No models, no extra dependencies.
The honest gotchas
This node only lines up if the crop mask is from the same source image at the same resolution. If you resize the original between the crop and the stitch, or feed a crop from a different frame than the original, the paste will be off - this is a matching-coordinates tool, not a magic auto-align. Second: feather is your friend but too much of it lets the edit bleed into surrounding detail, so start around 4–8 pixels and raise it only where the seam shows. And if you hand-wire the crop without the mask, you'll get a hard-edged paste - the crop_mask output from ImageOps Crop exists precisely so you don't have to reconstruct it. Use it.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| original | IMAGE,VIDEO | Original image/video before Resize/Crop. | |
| crop | IMAGE,VIDEO | Edited cropped image/video to stitch back. | |
| bypass | BOOLEAN | false | — |
| feather | INT | 00–128 | Softens the crop mask edge before compositing. |
| crop_maskopt | MASK | Source-space mask from ImageOps Resize/Crop. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |