Nodes/ComfyUI-load-lora-from-url/Paste Image By Mask
ComfyUI Node

Paste Image By Mask

Composite a processed crop back in without a visible seam

By bollerdominik·Created about a year ago·Updated 22 days ago· 2
Paste Image By Mask
  • source_image
  • cropped_image
  • mask
  • image
feather3

This is the last leg of the cut-process-paste pattern this pack sets up across three small nodes: SquareMaskRegion turns a mask into a clean padded square, CutImageByMask crops the source image to it, you run whatever processing you actually wanted on that crop, and this node lands the result back on the original image. It's the same idea Impact Pack's FaceDetailer automates end-to-end for faces specifically - detect, crop, resample at full resolution, composite back - except here every step is a separate node you control, so the mask and the processing in between can be anything, not just a face detector's output.

The part that decides whether this actually looks good or looks obviously pasted-in is the blend at the mask's edge, and this node has exactly one control for that.

Inputs and the one field that matters

  • source_image - the original, full image you're compositing back into.
  • cropped_image - the processed result (whatever came out of your detail pass, upscale, or edit step on the cropped region).
  • mask - the mask defining where the crop goes back.
  • feather (optional, default 3, range 0–256) - the node's own tooltip states this plainly: "Blend width in pixels at the mask edge. 0 = hard paste." At zero, the composite is a hard cut, pixel-for-pixel - fine if your mask edge is already exact, but a common source of a visible seam if it isn't. A small feather value softens that boundary so the transition between original and processed pixels isn't a sharp line.

Output is a single image - the composited result, same dimensions as source_image.

Installing it

Search ComfyUI-load-lora-from-url in ComfyUI Manager, or install by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/bollerdominik/ComfyUI-load-lora-from-url

Restart ComfyUI. Pure compositing, no models, nothing to download.

Where people get burned

  • Feather set to 0 on a mask that isn't pixel-precise. This is the single most common cause of a visible seam with this node. Unless your mask edge genuinely lines up exactly with a real boundary in the image, a small feather value (start around 3–10 and adjust) will hide far more inconsistency than it costs in sharpness.
  • cropped_image not matching the region mask describes. If you ran SquareMaskRegion and CutImageByMask upstream, make sure the crop that comes back from your processing step is still the same size and position as what those nodes produced - resizing or re-cropping in between will misalign the paste.
  • Expecting this to fix color or lighting mismatch. Feathering softens the geometric edge, not a difference in exposure, color grade, or noise level between the processed crop and the original. If your detail pass came out visibly brighter or a different color temperature than the surrounding image, that's a separate problem feathering alone won't hide - worth matching those before this step rather than after.
Categoryimage/compose

Inputs (4)

NameTypeDefaultDescription
source_imageIMAGE
cropped_imageIMAGE
maskMASK
featheroptINT30–256Blend width in pixels at the mask edge. 0 = hard paste.

Outputs (1)

NameTypeDescription
imageIMAGE