FaceShaperMatchV2
Warp a face to match another face's shape, before you swap it
- source_image
- source_crop_info
- target_crop_info
- Image1
- LandmarkImg
This is the node the whole pack is named after - the one that actually does the shape matching. Everything else in FaceShaper is plumbing to get a clean, aligned face crop in and a composited result back out; FaceShaperMatchV2 is the step in the middle that liquefies the source face to fit the target's proportions.
Why you'd want this at all
Face-swap tools - ReActor, InstantID, the FaceID family, all the InsightFace-based stuff - are good at putting the features of one face onto another, but they generally leave the underlying face shape alone. If your source photo has a narrow jaw and your target has a wide one, the swap looks subtly (or not so subtly) off, because the geometry doesn't match even though the eyes and nose do. FaceShaper's whole premise is a pre-processing step: warp the source face's contour to match the target's aspect ratio first, then hand the result to whatever swap tool you actually use. It's not a face swapper itself - it's the thing you run before one.
How it works
You feed it two crops that have already been through FaceShaperCropper: a source_image plus its own source_crop_info, and a target_crop_info from a second image (the one whose shape you're matching to - note only the crop info is needed from the target, not the pixels). The node detects landmarks on both, then liquefies and stretches the source face so its horizontal and vertical proportions line up with the target's. landmarkType decides which landmark set drives the warp - ALL uses the full landmark set, OUTLINE restricts it to just the face's outer contour. AlignType decides what metric the warp is normalized against: Width, Height, Landmarks, or JawLine. JawLine is worth calling out specifically - the author added it after the fact because it's the one that actually fixes shape mismatches between a big face and a small face, which is the exact scenario the whole pack exists for. If your results with Width or Height look off, try JawLine before anything else.
Outputs: Image1 is the reshaped result - feed it into FaceShaperComposite to paste it back into the full photo, or run it through your face-swap node first and composite that result (the README explicitly calls out both orders as valid; experiment). LandmarkImg is a visualization of the landmarks the node used to compute the warp - genuinely useful for debugging a bad-looking result before you assume the algorithm is broken.
Installing it
Through ComfyUI Manager, search "ComfyUI_FaceShaper" and install. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/fssorc/ComfyUI_FaceShaper
then restart. This node itself needs nothing extra - its dependencies live upstream, in whichever cropper loader you picked (InsightFace, MediaPipe, or FaceAlignment) to produce the crop info it consumes.
Common issues & troubleshooting
Garbled or stretched-looking output. Check LandmarkImg first - if the landmarks are misplaced on either face, the warp will be wrong no matter what AlignType you pick, and the fix is upstream (a better detector, a higher detection_threshold, or a cleaner crop) rather than in this node.
Shape mismatch persists even after running this node. Try JawLine for AlignType - per the pack's own changelog it was added specifically to handle big-face/small-face mismatches that Width/Height alignment doesn't fully fix.
Mixed-up crop info. source_crop_info and target_crop_info are both the custom CROPINFO type, so ComfyUI won't stop you from wiring the wrong one into the wrong slot - it'll just silently warp toward the wrong target. If a result looks like nothing happened, or looks warped toward the wrong face, double-check which FaceShaperCropper output actually feeds which input here.
You only have one photo, not two. This node needs a genuine target shape reference - a second face (or the same face at a different, more "correct" moment) to match toward. If you're trying to reshape a face with no specific target in mind, this isn't the right tool.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| source_image | IMAGE | — | |
| source_crop_info | CROPINFO | — | |
| target_crop_info | CROPINFO | — | |
| landmarkType | COMBO | 2 options: ALL, OUTLINE | |
| AlignType | COMBO | 4 options: Width, Height, Landmarks, JawLine |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| Image1 | IMAGE | — |
| LandmarkImg | IMAGE | — |