Skip to main content

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

ParameterData TypeRequiredRangeDescription
face_landmarksFACE_LANDMARKSYes-The face landmarks data from a MediaPipe face detection node.
regionsCOMBOYes"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"
When regions is set to "custom", the following additional boolean parameters become available:
ParameterData TypeRequiredRangeDescription
face_ovalBOOLEANNoTrue/FalseInclude the face oval region in the mask. Default: True
lipsBOOLEANNoTrue/FalseInclude the lips region in the mask. Default: True
eyesBOOLEANNoTrue/FalseInclude the eyes region in the mask. Default: True
irisesBOOLEANNoTrue/FalseInclude the irises region in the mask. Default: True
Note: When using "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 NameData TypeDescription
MASKMASKA 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