Nodes/comfyui_imgutils/Imgutils Generic Detector
ComfyUI Node

Imgutils Generic Detector

Seven anime detectors behind one node

By LK-168·Created about a year ago·Updated about a year ago· 1
Imgutils Generic Detector
  • image
  • image_with_boxes
  • detection_mask
  • detection_bbox
detection_type
conf_threshold0.50
iou_threshold0.70
draw_boxestrue
levels
version

The flagship: one node, seven detectors

This is the node this pack is built around, and the one you'll reach for first. Imgutils Generic Detector wraps the imgutils library's anime-oriented YOLO detectors behind a single dropdown, so one node covers person, face, head, halfbody, hand, eye, and censor detection. That "anime-oriented" bit is the whole personality of this pack: these models are trained to be good on illustrations and anime art, which is where most of the surrounding ecosystem of the deepghs/imgutils library lives. On photos they still work, but the real reason to pick this over a generic YOLO is when your content is drawn rather than photographed.

How it works

Pick a detection_type, and the node calls the matching detector from imgutils.detect (detect_person, detect_faces, detect_hands, detect_censors, and so on). Two thresholds control the results:

  • conf_threshold (default 0.5) - minimum confidence to keep a detection.
  • iou_threshold (default 0.7) - the IoU cutoff for Non-Maximum Suppression, i.e. how aggressively overlapping boxes get merged. Lower it if you're getting double-boxes; raise it if the merge is eating distinct objects.

level picks the model size: n (nano, fast, less accurate) or s (standard - the sane default). version selects the model version where one exists (person detection has v0/v1/v1.1, faces v0/v1/v1.3/v1.4); leave it blank for the default. draw_boxes toggles whether the annotated image comes back with boxes and labels drawn on.

Outputs - all three matter

  • image_with_boxes - the annotated image (or the original, if draw_boxes is off).
  • detection_mask - a mask with the detected boxes filled in as white rectangles. This is the lazy-person's mask: not precise at the edges, but instant.
  • detection_bbox - the box list with label and confidence, which is what BBox Filter, BBox to Mask, and SAM Predictor all consume.

What the seven modes are actually for

Person, face, head, halfbody, hand, and eye detection feed detailer-style workflows - crop a face, refine it, paste it back, the Impact Pack pattern. Censor Detection is the special one: it's the model trained to flag NSFW regions, and it's the natural front-end to this pack's Censor with Mask node. The censor example workflow in the repo runs exactly that chain: detect → filter → SAM → censor.

Install

ComfyUI Manager → "Install Custom Nodes" → search "comfyui_imgutils", or:

cd ComfyUI/custom_nodes
git clone https://github.com/LK-168/comfyui_imgutils

Restart ComfyUI. Here's the bit that trips people up: the detection models download themselves on first run into $HF_HOME. If that env var isn't set in your ComfyUI startup, the download goes somewhere unexpected or fails. The README tells you to add it to run_nvidia_gpu.bat on the official Windows package; the Aki (秋叶) package defaults to .cache\huggingface\hub\ and needs nothing.

Common issues

  • First run is slow / looks stuck. It's downloading a model; give it a minute and watch the console.
  • No detections, ever. conf_threshold too high or the content doesn't match the model's training domain. Drop the threshold to 0.3 and retest.
  • Boxes everywhere. iou_threshold too low, so overlapping boxes survive. Crank it toward 0.7–0.8.

It's the workhorse. If you install this pack for one node, this is it.

Categoryimgutils/detection

Inputs (7)

NameTypeDefaultDescription
imageIMAGE
detection_typeCOMBO7 options: Person Detection, Face Detection, Head Detection, Halfbody Detection, Hand Detection, Eye Detection, +1
conf_thresholdFLOAT0.500–1
iou_thresholdFLOAT0.700–1
draw_boxesBOOLEANtrue
levelCOMBOs2 options: n, s
versionCOMBO3 options: v0, v1, v1.1

Outputs (3)

NameTypeDescription
image_with_boxesIMAGE
detection_maskMASK
detection_bboxBBOX