Bounding Boxes to Bounds
Get detector regions into WAS's crop & mask nodes
- bounding_boxes
- bounds
- count
ComfyUI has two rectangle systems and they don't talk to each other. ComfyUI core (and the detection nodes built on it) hands you bounding boxes - a BOUNDING_BOX value, the same shape PrimitiveBoundingBox creates. WAS Node Suite's cropping, masking and blending nodes speak a different dialect called bounds (IMAGE_BOUNDS), a value that can carry one region per image in a batch. Bounding Boxes to Bounds is the adapter that carries a detector's boxes across the gap.
It lives under WAS Suite/Image/Bound and takes one input: bounding_boxes, straight off a BOUNDING_BOX or BOUNDING_BOXES wire from SAM 3 Detect, Run Real-Time Detection, SDPose Face Bounding Boxes, Create Bounding Boxes, or a MediaPipe landmarker - and, like the other box nodes in this suite, it also reads JSON text holding the same boxes. Out the other side come two outputs: bounds, one row per box, ready for Bounded Image Crop, Bounds to Mask, Inset Image Bounds, or Draw Image Bounds; and count, for a switch that needs to handle "none."
Each box becomes one bounds row "with every edge inclusive," as the node puts it - the same rectangle counted the other way around. That inclusive-edges note is exactly the kind of off-by-one that crops by a pixel and quietly shaves your subject's edge, so it's worth knowing the two systems count differently and the converter is doing that translation for you rather than just renaming the value.
Why this converter exists
A detector's output is usually meant for ComfyUI's own box nodes - Crop By Bounding Boxes, Draw BBoxes, or the Layers-from-bounding-boxes flow. But the richest post-detection toolkit in WAS Node Suite lives on the bounds side: mask everything you found, crop each region with room to spare, work it, and paste it back. The converter is what lets you use Impact-style detection results to drive WAS-style processing. The filter you'd want between the detector and this node - drop the small junk, merge duplicates, pad for a good crop - is WAS Bounding Boxes Filter, which sits on the bounding-box side and pairs naturally with this one.
The batch handling is the quiet feature. Detection over a sequence often comes back as per-frame lists of boxes, and this node reads one box, a list of them, or those per-frame lists alike, emitting a bounds value that keeps a row per image. From there, WAS's bounds nodes already know how to treat a batch - each row is one image's region, and downstream nodes that draw or crop understand the correspondence without you exploding the batch by hand.
Installing
Part of WAS Node Suite v3 (WASasquatch/was-node-suite-comfyui), WASasquatch's MIT pack - going since 2023, over a million downloads, and the historical home of most of these image operations in ComfyUI. It's a pure converter: no packages, no models, no downloads beyond the pack. Requires ComfyUI 0.14.0+, since the v3 suite targets ComfyUI's newer node backend.
Via ComfyUI Manager, search WAS Node Suite v3, or clone it:
cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui
Restart ComfyUI and it's under WAS Suite/Image/Bound. If the node never registers, update ComfyUI - 0.14.0 or newer is the requirement.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| bounding_boxes | BOUNDING_BOX,BOUNDING_BOXES,STRING | The boxes to convert. Wire in SAM3 Detect, Run Real-Time Detection, SDPose Face Bounding Boxes or Create Bounding Boxes. JSON text holding the same boxes is read too. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| bounds | IMAGE_BOUNDS | One row per box, ready for Bounded Image Crop, Bounds to Mask, Inset Image Bounds or Draw Image Bounds. |
| count | INT | How many regions came out, for a switch that handles none. |