BBoxes to ImpactPack Segs
Bridge your own detections into Impact Pack's pipeline
- bboxes
- SEGS
If you've used ComfyUI Impact Pack at all, you know SEGS - its representation of detected regions that feeds FaceDetailer and the whole detect-crop-refine loop. This node is the bridge: it takes the pack's own BBOX list (which you can get from detectors like Parse BBox QwenVL or Mask to BBox) and converts it into Impact Pack's SEGS format, so you can run your detections through Impact's refinement machinery without Impact's own detectors.
Why bother? Impact Pack's detectors are geared toward faces and specific objects. But sometimes your detection comes from somewhere else entirely - a vision-language model that returns bounding boxes, or a mask you computed yourself. Rather than re-detecting, you just want to hand Impact the boxes you already have and let it do the crop-and-refine part. That's exactly the gap this node fills: it's the adapter between "my own bbox pipeline" and "Impact's SEGS ecosystem."
How it works
The conversion is mechanical. A SEGS object is (image_size, list_of_SEG) where each SEG carries a bbox and a label. This node takes your BBOX list and the width/height of the image they refer to, then emits SEGS with each box as a SEG (confidence fixed at 1.0, no cropped image - the crops happen downstream in Impact). The INPUT_IS_LIST flag means it expects a list of boxes on the bboxes socket, which is how Merge BBoxes and friends output.
Three inputs:
- bboxes - a
BBOXlist from any node in this pack's bbox family. - width / height - the image dimensions the boxes live in (defaults 512×512, min 64, max 8192). Get these wrong and Impact's cropping math goes sideways, so wire them from your actual image rather than trusting defaults.
One output: SEGS, straight into FaceDetailer, SEGS to Image-style nodes, or anything else that eats Impact's format.
Install
The usual pack routine:
cd ComfyUI/custom_nodes
git clone https://github.com/Duanyll/duanyll_nodepack
cd duanyll_nodepack && pip install -r requirements.txt
or ComfyUI Manager → "Duanyll Nodepack" → install → restart. You'll also need ComfyUI Impact Pack installed for the output socket to exist. The pack's requirements pull in OpenCV, kornia, insightface, matplotlib, and the Volcengine SDK; this node itself only needs the SEG namedtuple definition.
Where it fits and the honest caveat
The natural pipeline: get an image, run a VL model or mask-to-bbox to find your targets, convert with this node, then let Impact's detailer run a fresh sampling pass on each box. It's a genuinely clean integration, and it's the kind of thing that only exists because the author actually wanted it.
The caveat: SEGS is Impact Pack's format and Impact's own converters cover the common paths, so this node only earns its keep when your boxes come from the Duanyll bbox family. If you're not using that family, you may as well use Impact's native converters. But if the pieces line up - and they do line up, since Parse BBox QwenVL plus this node plus FaceDetailer is a coherent chain - it saves you the whole "reimplement SEGS" headache.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| bboxes | BBOX | — | |
| width | INT | 51264–8192 | — |
| height | INT | 51264–8192 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| SEGS | SEGS | — |