BboxesToBboxes
Convert a whole list of bounding boxes between formats
- bboxes
- bbox
This is the list version of BboxToBbox: same conversion, same two competing bounding-box conventions - (x, y, w, h) versus (x1, y1, x2, y2) - but applied across a whole list of boxes at once instead of one. If a detector node in your graph found multiple regions (several faces, several objects) and handed them back as a list of bboxes in one format, and the node you want to feed next expects the other format, this converts the entire list in a single pass instead of making you split, convert, and reassemble it yourself.
It's from comfyui-easyapi-nodes, lldacing's pack of small API/plumbing utilities, and the format mismatch it solves is a real, recurring friction point in ComfyUI: bbox-producing nodes - detector providers from packs like Impact Pack among them - don't share a single agreed convention, so anything that composes detection with cropping or drawing across different packs tends to need a translation step somewhere in the graph. This node is that step, sized for the common case where a detector hands back multiple regions at once rather than a single box.
How it works
Same logic as the single-box version: is_xywh tells the node what format the incoming list is already in, to_xywh tells it what format to produce, and it applies that conversion to every bbox in the list. If both flags agree, nothing meaningfully changes; the useful case is when they differ and every box in the list needs the same translation applied.
The inputs and outputs that matter
bboxes(BBOX, required) - the list of bounding boxes to convert.is_xywh(BOOLEAN, optional, defaultfalse) - set totrueif the incoming list is already in(x, y, w, h)format;falsefor(x1, y1, x2, y2).to_xywh(BOOLEAN, optional, defaultfalse) - set totrueto get results back in(x, y, w, h);falsefor(x1, y1, x2, y2).- Output:
bbox- the converted result, typed generically (*) so it plugs into whatever downstream node expects that shape next.
How to install it
Via ComfyUI Manager, searching comfyui-easyapi-nodes. Manual install:
cd ComfyUI/custom_nodes
git clone https://github.com/lldacing/comfyui-easyapi-nodes.git
cd comfyui-easyapi-nodes
pip install -r requirements.txt
Restart ComfyUI afterward. No models required - it's arithmetic applied across a list.
Common issues & troubleshooting
Every box in the output looks wrong, not just some. Since the same is_xywh/to_xywh flags apply to the whole list uniformly, a wrong flag setting throws off every box identically rather than just one - which is actually a useful diagnostic: if the entire list looks systematically off (all shifted, all the wrong size), double-check the input format flag against what your detector node actually produces, rather than assuming individual boxes are corrupted.
Mixed-format list - some boxes in one convention, some in the other. This node assumes the whole list shares one format going in. If your list genuinely mixes conventions (unusual, but possible if it was assembled from multiple sources), you'd need to split it and convert the two groups separately with two passes rather than one.
Only need to convert a single box, not a list. Use BboxToBbox instead - same conversion, built for one box rather than a list, and a simpler node if that's all your graph needs.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| bboxes | BBOX | — | |
| is_xywhopt | BOOLEAN | false | — |
| to_xywhopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| bbox | * | — |