Nodes/ComfyUI_FaceShaper/FaceShape Match(legacy)
ComfyUI Node

FaceShape Match(legacy)

The original one-node face shape matcher, and why you probably want V2 instead

By fssorc·Created 2 years ago·Updated 2 years ago· 188
FaceShape Match(legacy)
  • analysis_models
  • imageFrom
  • imageTo
  • Image1
  • LandmarkImg
landmarkType
AlignType

The display name says it plainly - "FaceShape Match(legacy)" - and the pack's own README is just as upfront: this was the original approach, superseded by a three-node V2 pipeline (FaceShaperCropperFaceShaperMatchV2FaceShaperComposite) that handles tilted faces properly and doesn't require dlib. It's kept around because it still works if you already have dlib installed, and because it's genuinely simpler - one node instead of three.

What it does

Same core idea as the rest of the pack: face-swap tools transplant features but leave face shape alone, so a source and target with different jawlines or proportions produce an off-looking swap. FaceShaper liquefies and stretches the source face to match the target's facial proportions in a single step, with no separate crop-then-composite dance - you feed it two full images and get a reshaped result back directly.

The inputs and outputs that matter

  • analysis_models (type FaceShaper_MODELS) - comes from the FaceShaperModels loader node, which wraps dlib's face detector and shape predictor. This is the dependency that makes this node "legacy": dlib has to actually be installed and working for this to run at all.
  • imageFrom / imageTo (IMAGE) - imageFrom is the face you're reshaping; imageTo is the reference whose shape you're matching toward.
  • landmarkType (ALL / OUTLINE) - which landmark set drives the warp.
  • AlignType (Width / Height / Landmarks) - what the warp is normalized against. Note this node doesn't have the JawLine option that FaceShaperMatchV2 does - that was added later specifically to the V2 pipeline, and it's the option that best fixes big-face/small-face mismatches, which is one solid reason to prefer V2 if that's your problem.

Outputs are Image1 (the reshaped result) and LandmarkImg (a landmark visualization for debugging) - the same output shape as FaceShaperMatchV2.

Installing it

Through ComfyUI Manager, search "ComfyUI_FaceShaper" and install, or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/fssorc/ComfyUI_FaceShaper

then restart. The part that actually costs you time is dlib, which this node depends on entirely through FaceShaperModels:

  • pip install dlib - this can fail to build from source, especially on Windows. The README links a precompiled Windows wheel as the fallback if a plain pip install doesn't work.
  • Model files, downloaded from huggingface.co/matt3ounstable/dlib_predictor_recognition and placed in ComfyUI/models/dlib/: shape_predictor_68_face_landmarks.dat, shape_predictor_81_face_landmarks.dat, shape_predictor_5_face_landmarks.dat, and dlib_face_recognition_resnet_model_v1.dat.

Common issues & troubleshooting

dlib installs but the node still errors. This is a real, documented failure: users have gotten dlib installed successfully - including via the precompiled wheel route - and still hit name 'dlib' is not defined when running FaceShaperModels, with no fix reported in the thread. If you hit this, it's worth treating dlib as unreliable on your setup rather than assuming you did something wrong; jumping to the V2 pipeline (which doesn't touch dlib at all, using InsightFace, MediaPipe, or face-alignment instead) sidesteps the problem entirely rather than debugging it.

You're fighting tilted-face results. This was the specific motivation for building V2 in the first place - the legacy node doesn't have V2's separate crop-and-align step, so a face that isn't roughly upright and front-facing in the source photo is more likely to produce a bad warp.

You want the best shape-matching quality. Use FaceShaperMatchV2 with AlignType: JawLine instead - it's the newer option and it directly targets the failure mode (big face vs. small face) that this legacy node has no equivalent fix for.

Bottom line: if dlib is already installed and working on your machine, this node is a perfectly reasonable one-node shortcut. If you're setting up fresh, skip straight to the V2 pipeline - it's less install pain and it's what the pack's author is actively developing.

CategoryFaceShaper

Inputs (5)

NameTypeDefaultDescription
analysis_modelsFaceShaper_MODELS
imageFromIMAGE
imageToIMAGE
landmarkTypeCOMBO2 options: ALL, OUTLINE
AlignTypeCOMBO3 options: Width, Height, Landmarks

Outputs (2)

NameTypeDescription
Image1IMAGE
LandmarkImgIMAGE