Nodes/comfyui_face_parsing/FaceParse(FaceParsing)
ComfyUI Node

FaceParse(FaceParsing)

The node that actually segments the face

By Ryuukeisyou·Created 3 years ago·Updated about a year ago· 193
FaceParse(FaceParsing)
  • model
  • processor
  • image
  • IMAGE
  • FACE_PARSING_RESULT

This is the node the whole pack is named after, and it's simpler than the setup around it suggests: feed it an image, a loaded model, and a loaded processor, and it hands back a full semantic segmentation of the face - not "here's a face," but "here's exactly which pixels are skin, which are the nose, which are the left eyebrow, the upper lip, the hair." That's a fundamentally different capability from a bounding-box detector. A box tells you where; this tells you what, pixel by pixel. It's what unlocks things a plain face detector can't do - masking just the skin for a smoothing pass without touching the eyes or lips, isolating hair separately from the face, building a mask that respects the actual shape of a feature instead of a rectangle around it.

How it works

FaceParse runs the jonathandinu/face-parsing model (a BiSeNet-style segmentation network, loaded via FaceParsingModelLoader) on your image, using the FaceParsingProcessorLoader's processor to handle the pre/post-processing the model expects. The output is an internal, structured result covering roughly 18-19 labeled regions - skin, nose, eyes, brows, ears, lips, mouth, hair, hat, neck, clothing, and more - that you don't work with directly. Instead, you hand that result to FaceParsingResultsParser, which lets you pick and choose which of those regions get turned into an actual mask.

This two-step split (parse once, then choose your regions) is a deliberate design: running the segmentation model is the expensive part, and you might want several different masks from the same parse - skin only for smoothing, skin plus lips for a lipstick edit, everything but hair for a swap - without re-running inference each time.

The inputs that matter

All three are required and there's no way around any of them:

  • model (FACE_PARSING_MODEL) - from FaceParsingModelLoader.
  • processor (FACE_PARSING_PROCESSOR) - from FaceParsingProcessorLoader.
  • image (IMAGE) - ideally a tight crop of a face, from FaceBBoxDetect/BBoxDetect + a crop node. You can run this on a full uncropped image, but you'll get much cleaner segmentation feeding it a face that fills most of the frame - the same reason ADetailer-style tools always crop before running their detail pass.

The outputs are IMAGE (a visualization pass-through - you'll usually route this straight to a save/preview, or ignore it in favor of the raw image you already have) and FACE_PARSING_RESULT, the structured segmentation data that goes straight into FaceParsingResultsParser.

Installing it

  • ComfyUI Manager - search "comfyui_face_parsing", install, restart.
  • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/Ryuukeisyou/comfyui_face_parsing.git, restart ComfyUI.

FaceParse itself needs nothing extra beyond the model and processor being loaded - those two upstream nodes handle the actual downloads (jonathandinu/face-parsing's .json/.safetensors into models/face_parsing/).

Common issues

The real-world failure people hit isn't accuracy, it's the node breaking outright: there's a documented episode of comfyui_face_parsing throwing an "IMPORT FAILED" error after a routine update, on a workflow that had been running fine, with users reporting it crashing right at the face-parsing step. The fix that worked for people was mundane but effective - uninstall and reinstall the node through ComfyUI Manager, and separately, make sure both your ComfyUI core and the frontend package are current (pip install -r requirements.txt after a git pull, or Manager's update path). Custom nodes built on transformers-family models are more sensitive to ComfyUI/frontend version drift than plain image nodes, and this is a case where "try fix" in Manager didn't resolve it but a clean reinstall did.

Beyond that: if segmentation looks noisy or wrong around feature edges, check that you're feeding it a cropped, mostly-frontal face rather than a tiny face in a wide shot - that's a data problem, not a bug.

Categoryface_parsing

Inputs (3)

NameTypeDefaultDescription
modelFACE_PARSING_MODEL
processorFACE_PARSING_PROCESSOR
imageIMAGE

Outputs (2)

NameTypeDescription
IMAGEIMAGE
FACE_PARSING_RESULTFACE_PARSING_RESULT