Simple Detector (SEGS)
One node that turns an image into detailer-ready regions
- bbox_detector
- image
- sam_model_opt
- segm_detector_opt
- SEGS
Before you can detail a face, something has to find the face. Simple Detector (SEGS) is Impact Pack's one-stop node for that: point a detector at an image and get back a SEGS - the pack's bundle of detected regions, each carrying a crop area, a mask and a confidence score. That SEGS is what you feed into a Detailer or an Upscaler. The "Simple" is earned: it rolls a bounding-box detection pass and an optional silhouette-refinement pass into a single node, so you don't have to wire the multi-step version by hand.
If you've used ADetailer in A1111, this is the detection half of that, exposed as its own node so you can control it.
How it works
It runs your bbox_detector over the image to find candidate boxes, keeps the ones above bbox_threshold, and turns each into a region. If you also plug in a sam_model_opt (SAM) or a segm_detector_opt (segmentation model), it refines those boxes with an actual silhouette mask instead of a plain rectangle - which is what stops the detailer's fix from looking like a square patch. The result is "improved SEGS" without you having to combine bbox and mask operations yourself.
The inputs and outputs that matter
bbox_detector(BBOX_DETECTOR) - the detection model. This is the required piece and the one you have to source separately (see install). Usually a YOLO face/hand/person model viaUltralyticsDetectorProvider.image(IMAGE) - what to run detection on, typically your freshly generated image.bbox_threshold(default 0.5) - confidence cutoff. Lower it if it's missing faces; raise it if it's flagging clouds and knees as faces.crop_factor(default 3) - how much context around each detection ends up in the crop. 3 means the crop is roughly three times the box, which gives the detailer some surrounding pixels to blend into. Too tight and the fix has visible edges.bbox_dilation(default 0) - grow or shrink each box before cropping; negative values erode.sam_model_opt/segm_detector_opt(optional) - add one of these to get silhouette masks instead of rectangles.
The single output is SEGS - wire it into a Detailer, a SEGS filter, or a SEGS preview.
How to install it
Install the pack via ComfyUI Manager (search ComfyUI Impact Pack, Install, restart) or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack
cd ComfyUI-Impact-Pack
pip install -r requirements.txt
Here's the catch specific to this node: it needs a BBOX_DETECTOR, and the node that provides YOLO detectors, UltralyticsDetectorProvider, is not in the base pack anymore. Since v8.0 it lives in the separate ComfyUI-Impact-Subpack - install that from the Manager as well, then download a detection model (e.g. a face_yolov8 weight) into ComfyUI/models/ultralytics. Without a detector plugged in, this node has nothing to run.
Common issues & troubleshooting
No BBOX_DETECTOR node in your menu. That's the Subpack split - install ComfyUI-Impact-Subpack separately. The base pack won't give you Ultralytics detectors on its own.
A word on the YOLO dependency. The Ultralytics package behind these detectors was the vector for a December 2024 supply-chain compromise that reached ComfyUI users through Impact Pack. It's since been decoupled into the opt-in Subpack. Keep your packages current, and if you're pinning dependencies for something you ship, know that the detection path pulls Ultralytics (which is AGPL) - leave it out unless you need it.
Empty SEGS. Either the threshold is too high or the detector model doesn't match your subject (a face detector won't find hands). Lower bbox_threshold first, then check you loaded the right weight.
Square, obvious patches after detailing. You're detecting with boxes only. Add a sam_model_opt so the region follows the actual outline.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| bbox_detector | BBOX_DETECTOR | — | |
| image | IMAGE | — | |
| bbox_threshold | FLOAT | 0.500–1 | — |
| bbox_dilation | INT | 0-512–512 | — |
| crop_factor | FLOAT | 3.01–100 | — |
| drop_size | INT | 101–16384 | — |
| sub_threshold | FLOAT | 0.500–1 | — |
| sub_dilation | INT | 0-512–512 | — |
| sub_bbox_expansion | INT | 00–1000 | — |
| sam_mask_hint_threshold | FLOAT | 0.700–1 | — |
| post_dilationopt | INT | 0-512–512 | — |
| sam_model_optopt | SAM_MODEL | [OPTIONAL] Segment Anything Model for Silhouette Detection. Be sure to use the SAM_MODEL loaded through the SAMLoader (Impact) node as input. Given this input, it refines the rectangular areas detected by BBOX_DETECTOR into silhouette shapes through SAM. sam_model_opt takes priority over segm_detector_opt. | |
| segm_detector_optopt | SEGM_DETECTOR | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| SEGS | SEGS | — |