Nodes/SaltAI-Open-Resources/Crop Batch Image Paste
ComfyUI Node

Crop Batch Image Paste

The stitch half of crop-process-stitch

By get-salt-AI·Created 2 years ago·Updated 2 years ago· 84
Crop Batch Image Paste
  • images
  • crop_images
  • crop_data_batch
  • images
  • masks
crop_blending0.25
crop_sharpening0

If you've done any serious inpainting work you already know the pattern this node belongs to, even if you learned it under a different pack's name: crop a region out, process just that crop at full resolution, paste it back into the original untouched. It's the reason the ComfyUI-Inpaint-CropAndStitch node pair became the community's default inpainting shape - you keep every pixel outside the mask byte-for-byte identical, and you get full generation resolution spent on the small region that actually needs it instead of being diluted across the whole frame. SaltImagePasteCrop is Salt's version of the paste-back half of that pattern, built for batches.

What it does

Four required inputs beyond the crop itself: images is your original, full-size batch; crop_images is the processed crop batch you want pasted back in; crop_data_batch is a CROP_DATA_BATCH - a bundle of per-image crop geometry (position and size) produced earlier in the pipeline by whatever node extracted the crop in the first place, so it has to be the exact same batch, same order, as what generated your crops. Get that pairing wrong and you'll paste the right image into the wrong location.

Two tuning knobs control the paste quality: crop_blending (0–1, default 0.25) feathers the seam between the pasted crop and the surrounding original - 0 gives you a hard, potentially visible edge, higher values blend the boundary more gradually. crop_sharpening (an integer 0–3, default 0) sharpens the pasted region, useful because a crop that got resized up for processing and then resized back down tends to soften slightly, and this claws a little of that back.

Two outputs come back: images - the final composited result - and masks, worth flagging because in this node's own schema it's typed as IMAGE, not MASK, despite the name. If you're wiring it into something that expects an actual MASK type you'll need to convert it first; don't assume the name tells you the type here.

Installing it

ComfyUI Manager: search SaltAI-Open-Resources. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/get-salt-AI/SaltAI

Restart ComfyUI. Pure image compositing, no model downloads.

Common issues

Visible seams almost always mean crop_blending is too low for how different the crop's lighting/detail is from its surroundings - nudge it up before you assume something's structurally wrong. Ghosting or misaligned pastes are nearly always a batch-order mismatch between images, crop_images, and crop_data_batch - if anything upstream reordered, filtered, or resized one of those three batches independently, the geometry in crop_data_batch no longer lines up with what it's supposed to describe. Keep the three batches walking through your graph in lockstep. And remember the masks output's actual type when you wire it onward - a downstream node expecting MASK will simply refuse the connection or error, not silently work.

CategorySALT/Image/Process

Inputs (5)

NameTypeDefaultDescription
imagesIMAGE
crop_imagesIMAGE
crop_data_batchCROP_DATA_BATCH
crop_blendingFLOAT0.250–1
crop_sharpeningINT00–3

Outputs (2)

NameTypeDescription
imagesIMAGE
masksIMAGE