Image Full BBox
The 'just paste over the whole frame' utility
- image
- BBOX
Image Full BBox is the simplest node in the Character Face Swap pack, and its job is exactly what it sounds like: you feed it any image, and it returns a bounding box covering the entire image. One input, one output, no settings.
Why does that exist? Because Uncrop Face - the node that pastes a swapped face back into a frame - needs a BBOX to know where to paste. Normally you'd hand it the box from Crop Face, which records where the original face was. But that box is measured in the coordinate space of whatever image was cropped. The moment you upscale the image (and this pack's workflow does - it upsamples the composite before final output), the original face's coordinates no longer line up with the upscaled frame.
Image Full BBox solves that by saying: "I don't know where the face is anymore, so paste over the whole thing." It returns (0, 0, width, height) of the input image, and Uncrop Face, given a face and mask that have been rescaled to the full frame, just does a full-frame blend.
How it works
The entire implementation is:
def bbox(self, image):
image = image.squeeze()
return ((0, 0, image.shape[1], image.shape[0]), )
That's it. Width and height of the input tensor become the box's width and height, origin at (0,0). No detection, no math, nothing to tune.
Wiring it
- image (IMAGE) → any image, but specifically the upscaled full frame in the shipped workflow.
- Output (BBOX) → the
bboxinput of Uncrop Face.
It pairs naturally with the workflow's upscale step: after ImageUpscaleWithModel changes the dimensions, this node regenerates a box that matches the new size. It's also a handy way to force a full-frame paste when you want the swapped content to cover the entire image rather than a crop region.
Installing the pack
Part of Character Face Swap - ComfyUI Manager (search Character Face Swap), or:
cd ComfyUI/custom_nodes/
git clone https://github.com/ArtBot2023/CharacterFaceSwap.git
cd CharacterFaceSwap
python install.py # on the bundled Windows build: ../../../python_embeded/python install.py
Nothing extra needed here - it's pure tensor introspection.
Common problems
Honestly, there's not much to break. The one thing to remember is the BBOX is tied to the input image's dimensions, so if the image feeding this node doesn't match the image you later paste into, the blend lands off-region. Keep the two in sync - feed this node the same image you intend Uncrop Face to modify - and it just works.
Smallest node in the pack, and one of the least glamorous - but it's the coordinate fixer that makes the "upscale then paste" sequence line up.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BBOX | BBOX | — |