Nodes/ComfyUI-BrainDead/BD Head Cutout
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).

By BizaNator·Created 7 months ago·Updated 16 days ago· 14
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)

NameTypeDefaultDescription
imageIMAGE
head_promptsoptSTRINGhead face hair earSAM3 positives — one per line. Their union = the head.
exclude_promptsoptSTRINGneck shirt clothing shoulderSAM3 negatives — subtracted from the head (peels off neck / clothing / body).
neck_cutoptBOOLEANtrueRemove 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_bgoptCOMBOtransparentBackground for the head_cutout image: transparent = RGBA; black/white = baked RGB.
smoothoptINT120–64Smooth 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_refineoptCOMBOoffSnap the head edge to the image: guided (fast), matting (soft hair), vitmatte (best, downloads a model). off = the raw SAM3 + close silhouette.
refine_radiusoptINT81–64
refine_epsoptFLOAT0.00010.000001–0.1
refine_thresholdoptFLOAT0.500–1
vitmatte_modeloptCOMBOsmall2 options: small, base
mask_thresholdoptFLOAT0.500–1SAM3 text-segmentation threshold.
jaw_modeoptCOMBOneck_parserHow 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)

NameTypeDescription
head_cutoutIMAGE
head_maskMASK
statusSTRING