Nodes/ComfyUI-EasyPortrait/EasyPortrait Segment
ComfyUI Node

EasyPortrait Segment

Portrait cutouts and face parsing in one node — no mmseg required

By preposition17·Created 4 months ago·Updated 4 months ago· 1
EasyPortrait Segment
  • image
  • mask
  • preview
model_namePortrait Segmentation / BiSeNet-V2 / 384
modebinary
persontrue
skinfalse
left_browfalse
right_browfalse
left_eyefalse
right_eyefalse
lipsfalse
teethfalse
backgroundfalse
labels

Let's be honest about what this node is for. Portrait-only background removal is a solved problem in 2026 - BiRefNet ships in ComfyUI core and it'll beat this thing on flyaway hair every time. The reason you care about EasyPortrait Segment is the other half of it: face parsing. Feed it a face and it hands you separate masks for the skin, the left and right brows, the eyes, the lips, the teeth. No other node in the default stack does that, and it's exactly what you need when you want to fix "AI teeth" or smooth skin without touching the rest of the portrait.

What it is

A single node that runs ONNX exports of the EasyPortrait checkpoints - a real research project that does portrait segmentation (background vs person) and face parsing (eight regions) in one model family. The pack exists so you don't have to install the ancient mmsegmentation / mmcv-full stack the original code needed. Runtime deps are just onnxruntime, Pillow, and requests. That's it. No key, no API, all local.

The mechanism is boring in a good way. Your image gets resized to the model's native resolution, normalized, run through onnxruntime, and the class map gets argmaxed and resized back to your original dimensions. Models are downloaded once from the sadzip/EasyPortrait-ONNX repo on Hugging Face into ComfyUI/models/easyportrait/onnx on first use, then cached per model in memory.

The inputs that matter

The node has a lot of widgets, but a beginner really sets three things:

  • model_name - 26 choices across two families. The portrait segmentation models give you background and person; the face parsing models give you background, skin, brows, eyes, lips, and teeth. Resolution is baked into the name: 224/384/512/1024. Higher res means sharper edges and slower runs; the 384s are the sane default, 1024 when edges matter.
  • mode - binary merges your selected labels into one combined mask per image. layers returns each selected label as its own mask in the output batch. If you want skin, lips, and teeth as separate masks, that's layers; if you just want "the person", binary.
  • The label checkboxes - person, skin, left_brow, right_brow, left_eye, right_eye, lips, teeth, background. Set what you want; the labels text field overrides them if you type a comma-separated list like skin,lips,teeth (it's forgiving about spaces and case).

Two outputs: mask (a MASK batch) and preview (your image with each label overlaid in its own color, so you can see what you actually got without digging through the graph).

Installing it

Easiest path is ComfyUI Manager - search "EasyPortrait" and install. Otherwise:

cd ComfyUI/custom_nodes
git clone https://github.com/preposition17/ComfyUI-EasyPortrait
cd ComfyUI-EasyPortrait
# into the same Python env ComfyUI uses
pip install -r requirements.txt

Restart ComfyUI. First run of the node downloads its ONNX file, so give it a moment and don't panic at a stall.

Where people get burned

  • It runs on CPU until you make it not. The default onnxruntime pip package is the CPU build, and the node only uses CUDA if onnxruntime reports it available. If you want GPU inference, install onnxruntime-gpu into the same environment. On CPU the 1024 models are genuinely slow.
  • The layers mode reshapes your mask batch. One mask per label per input image gets stacked together, so three labels on two images gives you a batch of six. If you wired it to a node expecting one mask per image, it'll look wrong - that's the mode, not a bug.
  • Silent fallback. If nothing ends up selected, it quietly falls back to person for portrait models and skin for face parsing. Confusing previews often trace back to this.

Where it fits

The mask output wires straight into anything mask-based: inpainting, compositing, or a Set Mask feeding a local pass - and face-parsing masks are the backbone of skin-enhancement and relight workflows people genuinely run in this community. One honest caveat, straight from the KB: this is a segmentation model, not a matting model. Semi-transparent hair and veils will come out wrong, and no amount of model switching fixes that - for hard cutouts, keep BiRefNet in the graph. Use EasyPortrait Segment for the parts.

CategoryEasyPortrait

Inputs (13)

NameTypeDefaultDescription
imageIMAGE
model_nameCOMBOPortrait Segmentation / BiSeNet-V2 / 38426 options: Portrait Segmentation / BiSeNet-V2 / 384, Portrait Segmentation / DANet / 384, Portrait Segmentation / DeepLabv3 / 384, Portrait Segmentation / Fast SCNN / 384, Portrait Segmentation / FCN + MobileNetv2 / 384, Portrait Segmentation / FPN + ResNet50 / 1024, +20
modeCOMBObinary2 options: binary, layers
personBOOLEANtrue
skinBOOLEANfalse
left_browBOOLEANfalse
right_browBOOLEANfalse
left_eyeBOOLEANfalse
right_eyeBOOLEANfalse
lipsBOOLEANfalse
teethBOOLEANfalse
backgroundBOOLEANfalse
labelsSTRING

Outputs (2)

NameTypeDescription
maskMASK
previewIMAGE