Nodes/ComfyUI/Bounding Box
ComfyUI Node Runs on cloud

Bounding Box

Drag a crop region instead of typing four numbers

By Comfy-Org·Created 4 years ago·Updated about 6 hours ago· 130,659
Bounding Box
    • BOUNDING_BOX
    x0
    y0
    width512
    height512

    The newest member of the primitive family is also the only one that isn't just a number or a word: Bounding Box bundles four integers - x, y, width, height - into a single BOUNDING_BOX value that describes a rectangular region of an image. It exists because cropping got upgraded, and the upgrade needed something to hold the region.

    It landed in core in February 2026 as part of the "BBox widget" work that introduced the BOUNDING_BOX data type and the new Image Crop node (internally ImageCropV2). The old Image Crop node made you type x, y, width, height as four separate widgets. The V2 version takes one crop_region input instead - and Bounding Box is the primitive that produces it.

    How it works

    Four INT inputs, each with sane bounds: x and y run 0 to 16384 (default 0), width and height run 1 to 16384 (default 512). The node assembles them into a small object - {"x": x, "y": y, "width": width, "height": height} - and emits it as the BOUNDING_BOX output. Exactly like its siblings, execute is a pass-through; the value just becomes a typed socket.

    Where it shines is the UI. Because the crop input on Image Crop is declared as a component wired to the Bounding Box node, the frontend can render it as an interactive box you drag directly over the image preview. You're not eyeballing coordinates - you're dragging a rectangle and watching x/y/width/height update under it. That's the whole reason the node exists: cropping should be visual, not arithmetic.

    Why you'd actually reach for it

    • Manual crops. Drag a box over an image, feed it to Image Crop, and get a clean region in one step - the direct upgrade path from the old four-widget crop.
    • Any node that takes a bounding box. BOUNDING_BOX sockets aren't exclusive to cropping. Detection and region-based nodes (in core and in the wider ecosystem) accept a box, and a primitive lets you hand-feed one when you don't want to run detection.
    • Reuse one region. Since it's a node, the same box can drive several consumers - crop for one branch, region-mask for another - and dragging the box updates them all.

    How you get it

    Ships with ComfyUI core. No install, no model files - it computes, it doesn't load. If you're on a version from before early 2026 you won't see it; update and the new Image Crop (V2) shows up alongside it.

    Common issues

    • Old crop vs new crop. The deprecated Image Crop node still uses four separate widgets and won't accept a BOUNDING_BOX. If you've got the old node on the canvas, swap it for the current Image Crop, which takes the box.
    • Coordinates are relative to the image, and can't go negative. x/y clamp at 0. Drag a box that starts outside the image and it clamps rather than erroring - usually what you want, occasionally surprising when you're trying to pad a region.
    • Zero-size is illegal. width and height have a minimum of 1, so you can't create an empty box; if something upstream computes a degenerate region, you'll get clamped to a 1×1 sliver rather than a crash.
    • The box is static. This is a primitive - a fixed value. For boxes that should move (face tracking, region animation), you want a detection node or keyframes, not this node.

    If your workflow involves any cropping beyond "crop a fixed chunk," Bounding Box is the unassuming node that makes it not-silly. Drag, don't type.

    Categoryutilities/primitive

    Inputs (4)

    NameTypeDefaultDescription
    xINT00–16384
    yINT00–16384
    widthINT5121–16384
    heightINT5121–16384

    Outputs (1)

    NameTypeDescription
    BOUNDING_BOXBOUNDING_BOX