Shibiko AI - BBOX Insert Image
Paste a regenerated face back into its box, feathers included
- image
- bbox_image
- bbox
- image
This is the "put it back" half of the crop-detect-fix-paste workflow. You detect a face (say, with the pack's Cascade node, which emits a BBOX), you regenerate or fix just that region at full resolution, and now you need to paste the result back over the original without a hard rectangular seam. That's exactly what BboxInsertImage does: it takes the replacement image, resizes it to the box, and blends it in with a soft Gaussian feather.
The KB's inpainting essay makes the case for this pattern: crop a small region, render it at the model's native resolution, paste it back - "a 64px eye gets 1024px of generation budget." This node is the paste-and-blend step in that recipe, and because it composites pixel data directly it leaves everything outside the box bit-identical to the original. Nothing else in the frame moves.
How it works
It takes the region of your main image at the box coordinates, resizes bbox_image to match (bilinear interpolation), then builds a Gaussian blend mask that's bright in the center and fades to black at the edges. The blend is: mask-weighted replacement image + inverted-mask-weighted original region. Result: the pasted content is fully opaque in the middle and melts into the surrounding pixels at the borders. That's the "Smooth Blending" from the node's own description, and it's what stops your replacement looking like a sticker.
The inputs
- image - the base image.
- bbox_image - what you're inserting (a crop, an inpaint result, a regenerated face).
- bbox - a
BBOXof the target region. Any BBOX source works: Cascade, Impact Pack detectors, whatever. - blend_factor (0–1, default 0.5) - here's the catch, see below.
Output is a single image with the content inserted.
The honest quirk
Read the source and you'll find blend_factor is computed and then immediately overwritten by the Gaussian-mask blend - as shipped, the slider is effectively a no-op. The feathering is controlled entirely by the fixed Gaussian mask, which you can't tune. So don't sit there dragging blend_factor wondering why nothing changes; the soft edge is just how this node works. If you need a harder or softer boundary, you'll want to build your own composite or reach for a masking node that exposes the feather. That single known quirk aside, this is one of the more genuinely useful nodes in the pack - it's the missing glue between "detect a face" and "fix a face."
Install
Standard for the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Shibiko-AI/ShibikoAI-ComfyUI-Tools
Or ComfyUI Manager → search "Shibiko" → install, restart. No model downloads, no special dependencies beyond what the pack already pulls in.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| bbox_image | IMAGE | — | |
| bbox | BBOX | — | |
| blend_factor | FLOAT | 0.50–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |