Nodes/comfyui_met_suite/Primitive BBOX
ComfyUI Node

Primitive BBOX

Type a Box When the Detector Can't Find It

By metncelik·Created 2 years ago·Updated about a year ago· 2
Primitive BBOX
    • bbox
    • x_min
    • y_min
    • x_max
    • y_max
    • width
    • height
    x_min0
    y_min0
    width512
    height512

    Somewhere between "I need a bounding box" and "my detector returned a bounding box" sits the case nobody wants: the detector can't find the thing, or doesn't know it exists. A face at the edge of the frame, a region you want to fix that no YOLO model is trained to see, an area a grounding model just won't name. Primitive BBOX is the blunt instrument for that situation - you type the box yourself.

    It does one thing and does it plainly: take x_min, y_min, width and height and emit a BBOX - the same (x_min, y_min, width, height) tuple that Impact Pack's detectors produce. Because it outputs the standard BBOX type, whatever you build from it plugs straight into the same downstream nodes a detector would feed: FaceDetailer, a mask-from-bbox step, an inpaint region. It's the manual fallback for the whole detect-crop-refine pattern that made small faces stop being ruined.

    The extras are where it earns its keep. Beyond the bbox it also returns x_min, y_min, x_max, y_max, width and height as separate INT outputs. So instead of adding a math node to compute x_max = x_min + width, you just wire it. That's genuinely useful when you're deriving a region from a mask's bounds, or chaining the numbers into a canvas node without re-deriving them.

    Inputs: x_min (0), y_min (0), width (512, minimum 1), height (512, minimum 1). The minimums are a small quality-of-life touch: you can't accidentally mint a degenerate zero-size box. Outputs as above, seven of them.

    The obvious question - why not just hard-code the numbers into whatever node needs them? Because most BBOX-consuming nodes don't accept raw ints; they expect the BBOX type, and there's no core node that turns four integers into one. That's the gap this fills, and it's a real one.

    It's the least glamorous node in the pack, and with zero Google impressions so far it's also the least found - which is a shame, because the suite's other two bbox nodes (BBOX Resize and BBOX Padding) are just transforms applied to whatever this one creates. Think of it as the foundation brick.

    Install is shared across the pack: ComfyUI Manager → search comfyui_met_suite → install → restart, or

    cd ComfyUI/custom_nodes
    git clone https://github.com/metncelik/comfyui_met_suite
    

    then restart. No models, no keys, one Pillow dependency you already have.

    Honest use cases: hand-tuned inpainting regions, forcing a detail pass on one specific face, prototyping a workflow before you wire in a real detector. When the automation fails, this is the node that keeps the pipeline running.

    CategoryMET SUITE/bbox

    Inputs (4)

    NameTypeDefaultDescription
    x_minINT0
    y_minINT0
    widthINT512
    heightINT512

    Outputs (7)

    NameTypeDescription
    bboxBBOX
    x_minINT
    y_minINT
    x_maxINT
    y_maxINT
    widthINT
    heightINT