π BV Detailer Loop Detect to SEGS (Impact)
Detection on the crop, not the whole image β the trick that makes this loop work
- detailer_job
- current_image
- region_mask
- segs
Here's the difference between the BV Detailer Loop and a plain Impact Pack setup: in a normal FaceDetailer, the detector scans the whole image and details every face it finds. In the BV loop, each job owns one region you drew, and BV Detailer Loop Detect to SEGS (Impact) runs its detector on that region's crop - then gates the results with the exact region mask. You drew a box around the character on the left? This node makes sure only that character's face gets detailed, not the stranger on the right.
The node description says it exactly: "Runs a registered detector on a BV-region crop, rebases its SEGS and gates detections with the exact full-image region mask." That crop-first design is what keeps per-region prompting meaningful - the detector never sees the whole frame, so it can't wander.
How it works
Every job in the plan may carry a named detector from the BV Detector Registry. This node is what actually uses it:
- It expands the region mask by
roi_padding(15% by default) and crops the current image to that padded box. - It runs the job's detector on the crop - a bbox detector, or a segmentation detector if that's what's bound.
- It rebases any detected coordinates back to full-image space, so downstream SEGS positions are correct on the original canvas.
- It intersects the detections with the exact region mask. Anything the detector found outside your drawn region is discarded.
If the job has no detector assigned, it doesn't skip - it converts the region mask straight to SEGS and labels it with the region names. Mask-only jobs are a first-class path.
Inputs that matter
The first three come straight from BV Detailer Loop Job Resolver: detailer_job, current_image, region_mask. Then the tuning knobs, which a per-job detector block in the plan overrides:
roi_padding(default0.15) - how much extra context around the region the detector sees. Faces want some; too much and you're back to whole-image detection.threshold(0.5) - detector confidence cutoff. Lower if your detector keeps missing the face.crop_factor(1.5) - the upscale factor for the detected crop when it becomes a SEGS region.drop_size(10) - drop detections smaller than this many pixels.detector_query/detector_labels- a text query for promptable detectors, and a comma-separated label filter to keep only e.g.face,hand.
One output: segs (SEGS) - the mask-gated segment set, wired into Impact Detailer (SEGS/pipe).
Installing it
Part of BV Node Pack; install once for the whole family.
cd ComfyUI/custom_nodes
git clone https://github.com/BlackVortexAI/bv_nodepack.git
Restart, hard-refresh with Ctrl+F5. Then the real dependency: this node imports impact.core at runtime and raises a clear error if Impact Pack isn't there, so install ComfyUI-Impact-Pack too. Detector weights (the usual face_yolov8n/s, hand_yolov8n/s, person_yolov8n-seg and friends) come from Impact's detector folder, not from BV.
Common issues
- "requires ComfyUI-Impact-Pack". It's not installed, or ComfyUI wasn't restarted after you installed it. One restart usually fixes it.
- Detector assigned but this node acts like there's none. The job's
detector_idmust be registered in the BV Detector Registry and the registry connected to the BV Regional Detailer Plan - the plan validates assignments at build time and will error loudly if a job names a detector that isn't there. - It rejects batches. Single image only, same rule as the rest of the loop.
- No SEGS at all on a busy image. Crank
thresholddown or raiseroi_padding; the detector is only looking at your region's crop, so a face outside it will never appear - that's the feature, but it means your drawn region has to actually contain the subject.
The preferred route per the README: for faces, use the detector-gated path - the detector keeps precise face geometry while your region decides which person may be processed. That combination is what makes regional detailing feel surgical instead of shotgun.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| detailer_job | BV_DETAILER_JOB | β | |
| current_image | IMAGE | β | |
| region_mask | MASK | β | |
| roi_padding | FLOAT | 0.150β2 | β |
| threshold | FLOAT | 0.500β1 | β |
| dilation | INT | 0-512β512 | β |
| crop_factor | FLOAT | 1.51β20 | β |
| drop_size | INT | 101β8192 | β |
| detector_query | STRING | β | |
| detector_labels | STRING | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| segs | SEGS | β |