Image_solo_stitch
Blend a processed crop back into the original image
- inpainted_image
- mask
- stitch
- image
- recover_image
- original_image
This is the paste-back half of the crop-process-stitch pattern that Image_solo_crop/Image_solo_crop2 set up. You cropped a subject out, ran it through a sampler or an effect, and now you need it back in the original frame at the original position - not just dropped in, but blended in, so the seam doesn't show. That's what sets this apart from a plain composite: it carries real blend controls (mode, opacity, smoothness) on top of the geometry the stitch bundle already knows.
How it works
Feed it the processed (inpainted_image), the mask that defined the crop region, and the stitch bundle from your crop node, and it works out where that region belongs in the original frame and pastes it back - with a feathered edge (smoothness) so the transition isn't a hard cut, and a real blend mode (not just alpha-over) so the pasted content can multiply, screen, overlay, or soft-light into the base rather than simply replacing it. It's the same idea as pasting only the changed pixels back after inpainting instead of letting a full-image regenerate touch parts of the frame that never needed to change - except here you get compositing controls a plain paste doesn't have.
The inputs and outputs that matter
inpainted_image/mask/stitch(required) - your processed crop, its mask, and theSTITCH2bundle fromImage_solo_crop/Image_solo_crop2. Wrong stitch type (say,Image_Resize_sum'sSTITCH3) simply won't connect here.smoothness(INT, 0–500, default 0) - feather radius on the paste edge.blend_factor(FLOAT, 0–1, default 1) - how strongly the pasted content applies, independent of opacity.blend_mode-normal,multiply,screen,overlay,soft_light, ordifference.opacity(FLOAT, 0–1, default 1) - straightforward transparency of the pasted layer.stitch_mode-crop_mask(default) orcrop_image, controlling whether the paste region is driven by the mask shape or the crop rectangle itself.recover_method- interpolation algorithm if any rescaling is needed during the paste (nearest-exact,bilineardefault,area,bicubic,lanczos).x_offset/y_offset(INT, ±10000, default 0) - manual nudge on top of the stitch bundle's recorded position.scale(FLOAT, 0.1–5, default 1) - manual scale adjustment on top of the bundle's recorded scale.
Three outputs: image (the final composite), recover_image, and original_image - giving you the finished result plus two reference points for comparison without keeping a second wire alive elsewhere in the graph.
How to install it
ComfyUI Manager: search ComfyUI-Apt_Preset, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset
pip install -r requirements.txt
install.bat is Windows-only; on Linux (comfy.icu's executor included) run pip install -r requirements.txt directly. No model files needed.
Common issues
blend_mode left at anything other than normal will visibly darken or lighten the pasted region relative to the surrounding image - that's expected behavior for multiply/screen/overlay, not a bug, but it surprises people who just wanted a clean paste. If you want a straight replacement with no color interaction, keep blend_mode on normal and control the fade with smoothness and opacity alone.
The x_offset/y_offset/scale fields are additive nudges on top of what the stitch bundle already recorded, not replacements for it - if your paste is landing in the wrong spot, check these are at their defaults (0, 0, 1) before assuming the upstream crop node got the position wrong.
Standard pack-wide note: a fresh ComfyUI-Apt_Preset install pulls a large requirements.txt (onnxruntime, gguf, transparent-background, scenedetect, and more, none of which this node needs but all of which must import for the pack to load) - there's a documented case of that failing outright. If you hit IMPORT FAILED, check the ComfyUI console for the actual missing-package error before assuming this specific node is broken.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| inpainted_image | IMAGE | — | |
| mask | MASK | — | |
| stitch | STITCH2 | — | |
| smoothness | INT | 00–500 | — |
| blend_factor | FLOAT | 1.000–1 | — |
| blend_mode | COMBO | 6 options: normal, multiply, screen, overlay, soft_light, difference | |
| opacity | FLOAT | 1.000–1 | — |
| stitch_mode | COMBO | crop_mask | 2 options: crop_mask, crop_image |
| recover_method | COMBO | bilinear | 5 options: nearest-exact, bilinear, area, bicubic, lanczos |
| x_offset | INT | 0-10000–10000 | — |
| y_offset | INT | 0-10000–10000 | — |
| scale | FLOAT | 1.000.1–5 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| recover_image | IMAGE | — |
| original_image | IMAGE | — |