ComfyUI Node
BD Head Cutout
Isolate JUST the head (no neck), the same way for every image — front-facing or side/profile, no angle selector. SAM3 segments head_prompts and subtracts exclude_prompts (neck / clothing); an in-house SegFormer pass then removes the neck chin-safely (bridges + drops the disconnected neck via connected-components). Outputs the head cutout (on transparent / black / white) and the head MASK to apply onto any downstream output (e.g. strip the neck Qwen adds).
BD Head Cutout
- image
- head_cutout
- head_mask
- status
◄head_promptshead
face
hair
ear►
◄exclude_promptsneck
shirt
clothing
shoulder►
◄neck_cuttrue►
◄cutout_bgtransparent►
◄smooth12►
◄edge_refineoff►
◄refine_radius8►
◄refine_eps0.0001►
◄refine_threshold0.50►
◄vitmatte_modelsmall►
◄mask_threshold0.50►
◄jaw_modeneck_parser►
Category🧠BrainDead/Segmentation
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| head_promptsopt | STRING | head face hair ear | SAM3 positives — one per line. Their union = the head. |
| exclude_promptsopt | STRING | neck shirt clothing shoulder | SAM3 negatives — subtracted from the head (peels off neck / clothing / body). |
| neck_cutopt | BOOLEAN | true | Remove the neck via the SegFormer face parser (chin-safe: it never cuts a flat line into the chin — the chin stays as part of the head component). Off = keep whatever exclude_prompts left. |
| cutout_bgopt | COMBO | transparent | Background for the head_cutout image: transparent = RGBA; black/white = baked RGB. |
| smoothopt | INT | 120–64 | Smooth the head boundary into an S-type jaw/chin curve (1536px-normalised, auto-scales with resolution). Rounds the lumpy SegFormer edge + the sharp neck-sever corners. 0 = raw silhouette; higher = smoother/rounder. |
| edge_refineopt | COMBO | off | Snap the head edge to the image: guided (fast), matting (soft hair), vitmatte (best, downloads a model). off = the raw SAM3 + close silhouette. |
| refine_radiusopt | INT | 81–64 | — |
| refine_epsopt | FLOAT | 0.00010.000001–0.1 | — |
| refine_thresholdopt | FLOAT | 0.500–1 | — |
| vitmatte_modelopt | COMBO | small | 2 options: small, base |
| mask_thresholdopt | FLOAT | 0.500–1 | SAM3 text-segmentation threshold. |
| jaw_modeopt | COMBO | neck_parser | How to cut the bottom of the head: neck_parser — SegFormer face-parser removes the real neck/clothing (chin-safe, default). Best when hair/clothing is complex. landmark_jawline — cut along the MediaPipe jawline (under-ear → jaw → chin) for a clean anatomical S-curve regardless of what's below. Best for a tight, consistent jaw cut. Both respect the smooth setting. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| head_cutout | IMAGE | — |
| head_mask | MASK | — |
| status | STRING | — |