MediaPipe is Google’s open-source machine learning solution for real-time perception. In ComfyUI, MediaPipe Face Detection provides BlazeFace detection, FaceMesh v2 landmark estimation, and ARKit-52 blendshapes — all in a single unified workflow. MediaPipe Face Detection is natively supported in ComfyUI (PR #14009), and the model weights are available under the Apache 2.0 License. MediaPipe GitHub | Comfy-Org Model RepositoryDocumentation Index
Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
Use this file to discover all available pages before exploring further.
Key capabilities
- Fast face detection — BlazeFace-based detector with short (~2 m) and full (~5 m) range variants
- 478 facial landmarks — dense FaceMesh v2 keypoints per detected face
- ARKit-52 blendshapes — real-time facial expression coefficients
- Face region masks — per-region masks for face oval, lips, eyes, and irises
- Face bounding boxes — outputs compatible with
DrawBBoxesfor bounding box visualization
Scope: Face detection only — BlazeFace + FaceMesh v2 + ARKit blendshapes. This does not cover hand, pose, or holistic detection.
MediaPipe Face Detection Workflow
1. Download the Workflow
Update your ComfyUI to the latest version, then go toWorkflow → Browse Templates and find “Mediapipe: Image Face Detection” under the Utility category.
Download JSON Workflow File
Download workflow
Run on Comfy Cloud
Open in cloud
Download Sample Image
Get the example input image for this workflow
2. Download the Model
The MediaPipe Face Detection model is hosted on the Comfy-Org MediaPipe model repository. Place it in the following directory structure:3. Using the Workflow
This workflow uses a subgraph node that orchestrates face detection, visualization, and mask generation. The subgraph exposes the following controls:Learn about Subgraph
This workflow uses Subgraph nodes for modular processing. Check out the Subgraph documentation to learn how to customize and extend the workflow.
| Input | Description |
|---|---|
| image | Input image batch to analyze |
| face_landmarker | Optional. Leave empty to use the built-in model loader. Connect an external FACE_DETECTION_MODEL output to override |
| Parameter | Default | Description |
|---|---|---|
| model_name | mediapipe_face_fp32.safetensors | Checkpoint in ComfyUI/models/detection/. If missing, download the model above |
| detector_variant | short | short — tuned for close/large faces (~2 m range). full — covers smaller/farther faces (~5 m), slower. both — runs both detectors and keeps whichever found more faces per frame (~2× cost) |
| num_faces | 1 | Maximum faces to return per frame. 0 = no cap (return all detected). Range: 0–16 |
| custom_face_oval | false | Include face-outline region in the mask output |
| custom_lips | false | Include lips in the mask (union with other enabled regions) |
| custom_left_eye | false | Include left eye region in the mask |
| custom_right_eye | false | Include right eye region in the mask |
| custom_irises | false | Include iris regions in the mask |
| Output | Type | Description |
|---|---|---|
| face_landmarks | FACE_LANDMARKS | Per-frame faces with 478 2D/3D landmarks, ARKit-52 blendshapes, mesh topology data — feeds into visualization and mask nodes |
| bboxes | BOUNDING_BOX | Face bounding boxes — compatible with DrawBBoxes node |
| mask | MASK | Binary mask from the enabled region toggles |
4. Run the Workflow
- Ensure the model file is placed in
ComfyUI/models/detection/ - Load an image in the
Load Imagenode - Adjust detection parameters as needed
- Click
Queueor useCtrl(Cmd) + Enterto run - The workflow outputs the mesh overlay, bounding boxes, and mask preview
Community Resources
- MediaPipe GitHub — Upstream MediaPipe framework
- Comfy-Org/mediapipe — Official ComfyUI model weights
- ComfyUI Subgraph Guide — Learn how subgraphs work