RS Detection Combine Loader
Three detector slots, one rule that matters
- detectors
Detector choice is the half of automatic detailing that people skip past, and it's the half that decides whether you get clean face masks or rectangles with visible edges. This node packs the three usual options - segmentation, bounding box, SAM refinement - behind one connection, and it has one priority rule that will confuse you if nobody says it out loud.
Here it is: if SEGM is on, BBOX and SAM are ignored entirely. Not merged, not refined, not run. Skipped.
Why that rule exists
The pack is opinionated, and the opinion is correct for faces. A segmentation model returns a polygon that follows the face outline, so the re-render patch hugs the subject and the seam mostly disappears. A bbox detector returns a rectangle, so the patch is a rectangle and its edges can show. Anzhc, who trains the segmentation face detectors most people end up using, put it plainly in the community: a segmentation mask "allows for much less obvious seams, if any."
So the default here is segm/Anzhc Face seg 640 v2 y8n.pt, and SEGM wins by design. Turn it to OFF and the node moves to the older path: BBOX alone gives you rectangular masks, or BBOX + SAM gives you boxes refined into polygons. That fallback isn't decoration - it's how you detect things the segm set doesn't cover, and how you use a SAM you already have installed.
The fields
Required, and lonely: face_segm_model. Ten choices in the catalog. OFF, the default Anzhc face seg v2, eyes, a v4 face model, head-and-hair, deepfashion2 for clothing, three person_yolov8*-seg whole-person models, and a skin model. SEGM OFF disables it without downloading anything.
Optional: show_optional_models to reveal the rest, then sam_model and face_bbox_model. SAM is used only when SEGM is OFF and a BBOX is selected, and sam_model appears as OFF alone unless SAM is genuinely installed - the pack does not vendor SAM, it uses the segment_anything package you already have and lists whatever's in the sams folder. BBOX has nine choices: eyes, face in nano/small/medium and a v2 variant, and hand nano/small.
Output is a single detectors connection (RS_MC_DETECTION_BUNDLE) that goes into RS MultiCharacter Detailer. One wire, no SEGS plumbing to route yourself - which is a real simplification compared with wiring an Impact Pack detector chain by hand.
Models download on execution
You don't pre-install the weights. Pick a catalog model, run the graph, and the node fetches it with progress. Installed files live in the same folders Impact Pack uses - ultralytics/segm, ultralytics/bbox - plus sams for SAM, so anything you already have from FaceDetailer or ADetailer shows up when you refresh the model list. Drop your own .pt files in those folders and refresh, and they'll appear in the dropdown too.
That shared-model-folder design is the reason this node slots into an existing ComfyUI install so easily, and also the reason its own install list includes ComfyUI-Impact-Pack and ComfyUI-Impact-Subpack: the ultralytics plumbing and folder conventions come from there.
cd ComfyUI/custom_nodes
git clone https://github.com/raspie10032/ComfyUI_RS_MultiCharacter_Sampler.git
cd ComfyUI_RS_MultiCharacter_Sampler
/path/to/ComfyUI/venv/bin/python -m pip install -r requirements-detailer.txt
Then install Impact Pack and Impact-Subpack through Manager and restart. requirements-detailer.txt brings opencv-python and scipy plus the tagger stack (timm, huggingface-hub, safetensors) - required for the detailer, not for this loader alone.
Choosing, practically
Faces: leave the default segm face model alone. It's the validated path and the one with the least seam risk.
Hands and eyes: the bbox models are more forgiving, but if you're correcting hands the segmentation clothing/skin models are worth a look - skin seg masks a whole region rather than a rectangle around the hand.
Whole person: person_yolov8*-seg masks the body, which is not what you want for face repair. Every detected person becomes a detail region, and max_regions caps how many get processed.
Two warnings
Only select models for output shapes you want. Eyes produce two regions per face. Clothing produces one big region per outfit. That inflates max_regions fast, and the detailer's own docs are blunt that more processed regions don't mean better quality.
And a supply-chain note that outlives this node: the Ultralytics YOLO runtime has one demonstrated compromise behind it, December 2024, when a poisoned release shipped a cryptominer into ComfyUI installs through the detailing node pack. Pin your package versions, install detector dependencies from your own index if you're shipping anything, and don't blindly pip install -U ultralytics mid-project.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| face_segm_model | COMBO | segm/Anzhc Face seg 640 v2 y8n.pt | SEGM takes priority: BBOX and SAM are skipped even if selected. Face, eyes, clothes, skin, hair and whole-person masks. Missing catalog models download on execution. Installed models in ultralytics/segm appear after refreshing the model list. OFF does not download or load SEGM. |
| show_optional_modelsopt | BOOLEAN | false | — |
| sam_modelopt | COMBO | OFF | Used only when SEGM is OFF and a BBOX is selected. Refines BBOX regions into masks. Skipped with SEGM; OFF does not load SAM. |
| face_bbox_modelopt | COMBO | OFF | Used only when SEGM is OFF. Face, eye or hand boxes for SAM, or rectangular masks without SAM. Missing catalog models download on execution. Installed models in ultralytics/bbox appear after refreshing the model list. Skipped with SEGM; OFF does not load BBOX. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| detectors | RS_MC_DETECTION_BUNDLE | — |