Nodes/ComfyUI_FaceShaper/FaceShaper Face Mask
ComfyUI Node

FaceShaper Face Mask

Turn a FaceShaper crop into a mask for blending or inpainting

By fssorc·Created 2 years ago·Updated 2 years ago· 188
FaceShaper Face Mask
  • crop_info
  • mask
MaskSize
grow0
grow_taperedfalse
blur13

Once FaceShaperCropper has found and cropped a face, this node turns that crop into a MASK - the region-of-interest data you'd hand to an inpaint step, a compositing node, or anything else in your graph that needs to know "this is where the face is" rather than "here's the reshaped pixels." It was added alongside AlignType: JawLine in the same pack update, and it reads directly off the crop info FaceShaperCropper produces, so you don't need to hand-draw or separately detect anything.

What it's for

The rest of the pack is about reshaping a face. This node doesn't reshape anything - it just tells you where the face is, as a mask, so you can feed that into whatever blending or inpainting step you're doing around FaceShaper's output. It's the kind of small utility node that matters more than its size suggests: a soft, correctly-grown mask is the difference between a seamless face swap and a visible seam.

The inputs that matter

  • crop_info (CROPINFO) - the crop/position metadata from FaceShaperCropper. This is what the mask is generated from.
  • MaskSize (Source / Crop) - whether the output mask is sized to match the original, full image (Source) or just the cropped face region (Crop). Pick whichever matches what you're compositing against downstream - if you're masking into the full photo, use Source; if you're working purely within the cropped face image, use Crop.
  • grow (default 0, range −4096 to 4096) - expands or shrinks the mask boundary in pixels. Positive grows it outward past the detected face region; negative shrinks it inward. A small positive grow is common when you want the mask to cover a bit past the jawline so a swap doesn't leave a visible edge.
  • grow_tapered (default false) - whether that growth tapers off gradually at the edge instead of expanding uniformly. Turn this on if a hard-edged grow is giving you a visible ring.
  • blur (default 13, range 1–4096, step 2) - feathers the mask edge. Higher values give a softer, more gradual falloff - the standard move for hiding a seam in a composite.

The single output is mask (MASK) - wire it wherever your workflow expects a standard ComfyUI mask: FaceShaperComposite's optional mask input, an inpaint node, or a blend/composite node of your own.

Installing it

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

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

then restart ComfyUI. This node has no dependencies of its own beyond the base pack - it's pure geometry math on top of whatever crop_info you feed it, so there's nothing extra to download or configure for it specifically. What it does depend on is having a valid crop_info in the first place, which means FaceShaperCropper (and, upstream of that, one of the three cropper loaders) needs to be working first.

Common issues & troubleshooting

The mask is empty or covers the wrong area. This node doesn't detect anything itself - it just converts crop_info into a mask shape. If the mask looks wrong, the problem is almost always upstream: check what FaceShaperCropper actually cropped (its cropped_image output) before assuming this node is broken.

Visible hard edge in your composite. Increase blur, and consider a small positive grow with grow_tapered on - that combination is the standard fix for a seam showing where the masked region meets the rest of the image.

Mask size doesn't match what you're compositing into. This is almost always a MaskSize mismatch - Source and Crop produce differently-sized masks by design, and feeding a Crop-sized mask into a node expecting full-image dimensions (or vice versa) will either error or silently mask the wrong region. Match it to whatever image the rest of your graph is working with.

CategoryFaceShaper

Inputs (5)

NameTypeDefaultDescription
crop_infoCROPINFO
MaskSizeCOMBO2 options: Source, Crop
growINT0-4096–4096
grow_taperedBOOLEANfalse
blurINT131–4096

Outputs (1)

NameTypeDescription
maskMASK