ComfyUI Node
Person Selector SAM3
SAM3-powered person selector — uses text grounding for all masks. Produces body, face, head (face+hair), and aux masks per person using SAM3's natural language segmentation. Non-overlapping masks by design. Aux mask presets: upper/lower body, clothing, hands, feet, arms, legs, headless body, or any custom text prompt. Connect LoadSAM3Model → sam3_model. No SAM2 or BiRefNet needed.
Person Selector SAM3
- sam3_model
- current_image
- reference_1
- outfit_palettes
- depth_map
- sam_model
- reference_2
- reference_3
- reference_4
- reference_5
- reference_6
- reference_7
- reference_8
- reference_9
- reference_10
- person_data
- face_masks
- head_masks
- body_masks
- aux_masks
- preview
- similarities
- matches
- matched_count
- face_count
- report
◄auto_thresholdtrue►
◄threshold0.40►
◄guaranteed_refs0►
◄aggregation▾►
◄det_size▾►
◄aux_presetnone►
◄aux_custom_prompt►
◄aux_threshold0.30►
◄match_weights50/15/15/20►
◄depth_sort_orderfront_last►
◄aux_yolo_modelNone►
◄aux_yolo_confidence0.30►
◄aux_yolo_label_filter►
◄aux_yolo_sam_refinetrue►
◄aux_yolo_sam_bbox_expansion0►
CategoryFVM Tools/Face
Inputs (30)
| Name | Type | Default | Description |
|---|---|---|---|
| sam3_model | SAM3_MODEL_CONFIG | SAM3 model from LoadSAM3Model node | |
| current_image | IMAGE | Image(s) to process. Supports batch input. | |
| auto_threshold | BOOLEAN | true | Auto: optimal 1:1 face-reference assignment. Off: manual threshold. |
| threshold | FLOAT | 0.400–1 | Minimum similarity for matching. Ignored when auto is on. |
| guaranteed_refs | INT | 00–10 | Force-assign first N references to best face. |
| aggregation | COMBO | How to combine similarity scores across reference images. | |
| det_size | COMBO | Face detection resolution. | |
| aux_preset | COMBO | none | Preset aux mask type: - upper_body / lower_body: body halves - clothing: all clothing (no shoes/socks) - hands / feet / arms / legs: body parts - headless_body: body minus head (computed) - custom: uses aux_custom_prompt below |
| aux_custom_prompt | STRING | Custom SAM3 text prompt for aux mask (only used when aux_preset='custom'). Any noun phrase works: 'shoes', 'necklace', 'backpack', etc. | |
| aux_threshold | FLOAT | 0.300.05–1 | Confidence threshold for aux detection. |
| match_weights | STRING | 50/15/15/20 | Face/hair/head/outfit blend: '50/15/15/20' |
| reference_1opt | IMAGE | Reference image(s) for person 1. | |
| outfit_palettesopt | IMAGE | Palette preview images for outfit matching. | |
| depth_mapopt | IMAGE | Depth map for render order sorting. | |
| depth_sort_orderopt | COMBO | front_last | Rendering order for PersonDetailer. |
| aux_yolo_modelopt | COMBO | None | Optional Ultralytics YOLO model for aux detection. Overrides the SAM3 text-prompt aux pathway when set. Bbox-only models are refined to pixel masks via SAM3/SAM when aux_yolo_sam_refine is on. |
| aux_yolo_confidenceopt | FLOAT | 0.300.05–1 | YOLO detection confidence threshold. |
| aux_yolo_label_filteropt | STRING | Comma-separated class-name substrings to keep (empty = all). Example: 'shoe,boot' or 'glasses'. | |
| aux_yolo_sam_refineopt | BOOLEAN | true | On (default): refine bbox-only YOLO detections into pixel masks using SAM3 (priority) → SAM2 (fallback). Off: use raw bbox rectangles as aux masks (today's bbox-only behavior). |
| sam_modelopt | SAM_MODEL | Optional SAM2 model from Impact Pack SAMLoader. Used as fallback when sam3_model isn't suitable for refinement. | |
| aux_yolo_sam_bbox_expansionopt | INT | 00–64 | Pixels to expand bbox before SAM refinement (helps thin objects). |
| reference_2opt | IMAGE | — | |
| reference_3opt | IMAGE | — | |
| reference_4opt | IMAGE | — | |
| reference_5opt | IMAGE | — | |
| reference_6opt | IMAGE | — | |
| reference_7opt | IMAGE | — | |
| reference_8opt | IMAGE | — | |
| reference_9opt | IMAGE | — | |
| reference_10opt | IMAGE | — |
Outputs (11)
| Name | Type | Description |
|---|---|---|
| person_data | PERSON_DATA | — |
| face_masks | MASK | — |
| head_masks | MASK | — |
| body_masks | MASK | — |
| aux_masks | MASK | — |
| preview | IMAGE | — |
| similarities | STRING | — |
| matches | STRING | — |
| matched_count | INT | — |
| face_count | INT | — |
| report | STRING | — |