Documentation Index
Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
Use this file to discover all available pages before exploring further.
This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! Edit on GitHub
Overview
This node creates a binary mask (a black and white image) based on face landmarks detected by MediaPipe. It draws filled polygon shapes for each detected face region, producing one mask per frame in a batch. When multiple faces are detected in the same frame, their masks are combined into a single mask.Inputs
| Parameter | Data Type | Required | Range | Description |
|---|---|---|---|---|
face_landmarks | FACE_LANDMARKS | Yes | - | The face landmarks data from a MediaPipe face detection node. |
regions | COMBO | Yes | "all""custom" | Selects which facial regions to include in the mask. "all" creates a mask from the union of all face regions (face oval, lips, eyes, irises). "custom" allows you to toggle each region individually. Default: "all" |
regions is set to "custom", the following additional boolean parameters become available:
| Parameter | Data Type | Required | Range | Description |
|---|---|---|---|---|
face_oval | BOOLEAN | No | True/False | Include the face oval region in the mask. Default: True |
lips | BOOLEAN | No | True/False | Include the lips region in the mask. Default: True |
eyes | BOOLEAN | No | True/False | Include the eyes region in the mask. Default: True |
irises | BOOLEAN | No | True/False | Include the irises region in the mask. Default: True |
"all" mode, the mask includes all regions combined. Since the face oval encloses the other regions, selecting "all" effectively produces the same result as selecting only the face oval.
Outputs
| Output Name | Data Type | Description |
|---|---|---|
MASK | MASK | A binary mask tensor where face regions are white (value 1.0) and background is black (value 0.0). The mask has the same dimensions as the input image and contains one mask per frame in the batch. |
Source fingerprint (SHA-256):
92270002a42ed59bc75e676a6881e1899186d3c8a1bb4dd4c0d39b3762b5bb66