Nodes/ComfyUI Easy Use/imageUncropFromBBOX
ComfyUI Node Runs on cloud

imageUncropFromBBOX

Paste a fixed region back where it came from

By yolain·Created 3 years ago·Updated 8 days ago· 2,633
imageUncropFromBBOX
  • original_image
  • crop_image
  • bbox
  • optional_mask
  • image
border_blending0.25
use_square_masktrue

Detail-fixing in ComfyUI usually follows a crop-process-paste rhythm: detect a face (or hand, or any region), crop it out by its bounding box, render it at full resolution so it gets real detail, then stick it back into the original picture. easy imageUncropFromBBOX is the "stick it back" step. Give it the original image, the processed crop, and the bounding box the crop came from, and it composites the crop into place and blends the seam.

It's part of yolain's ComfyUI-Easy-Use pack, and it's the inverse of cropping by a BBOX. This whole pattern is why masked, region-based editing still matters even in 2026 - as the KB puts it, the thing this approach uniquely buys you is that the rest of the frame doesn't move. Only the region you targeted changes; everything outside the box stays byte-for-byte the original.

How it works

The node takes your original_image and pastes crop_image back at the location given by bbox (a bounding box, typically produced by a detector or an earlier crop node). The tricky part of any paste-back is the edge - a hard-edged composite shows an obvious seam. That's what border_blending handles: it feathers the boundary so the inserted region melts into the surrounding pixels. Default is 0.25, a moderate feather; raise it if the seam still shows, lower it if the blend is bleeding too far into the fix.

use_square_mask controls the shape of that blend region. On (the default) uses a simple square mask matching the box; if you have a tighter, non-rectangular mask of the actual subject, pass it into the optional optional_mask input and turn the square mask off for a blend that follows the subject's real outline instead of the box.

Inputs and outputs

  • original_image - the full picture you're pasting into.
  • crop_image - the processed region going back in.
  • bbox - where it goes. Comes from your detector/crop upstream, not hand-entered.
  • border_blending - seam feathering, 0–1, default 0.25.
  • use_square_mask - square blend vs. following an optional mask.

Output is a single image: the original with the region swapped in and blended.

Installing it

Comes with the pack. ComfyUI Manager → "ComfyUI Easy Use" → install → restart. Or cd ComfyUI/custom_nodes && git clone https://github.com/yolain/ComfyUI-Easy-Use, run install.bat / pip install -r requirements.txt, restart.

Common issues

The most common visible problem is a seam - a faint rectangle or a color/tone step around the pasted region. Two levers: bump border_blending for a softer edge, and if the region's tone drifted during processing, that's usually a VAE round-trip shifting colors (the same "grey box" gremlin that plagues face detailers), so keep your VAE consistent through the crop and back.

Second, the bbox has to match the crop. If the box you feed in isn't the exact box the crop was taken from, the region lands in the wrong spot or the wrong size. Keep the crop and uncrop reading from the same bounding box source. And if your subject isn't rectangular - a face at an angle, a hand - the square mask can catch background; that's when the optional mask plus use_square_mask off earns its place.

CategoryEasyUse/Image

Inputs (6)

NameTypeDefaultDescription
original_imageIMAGE
crop_imageIMAGE
bboxBBOX
border_blendingFLOAT0.250–1
use_square_maskBOOLEANtrue
optional_maskoptMASK

Outputs (1)

NameTypeDescription
imageIMAGE