Face Landmarks (MediaPipe 468)
468 points on a face, and an overlay so you can see it work
- image
- landmarks
- overlay
The pack's five-point JHPixelProFaceDetect is for feeding the aligner. JHPixelProFaceLandmarks is the denser, weirder sibling: it extracts 468 landmarks per face via MediaPipe and hands them to you as a proper typed LANDMARKS tensor, plus an overlay image with every point drawn as a green dot so you can actually see the detection instead of trusting it.
Under the hood it's MediaPipe's face landmark task - the same family as the detector, but emitting the full dense mesh. One implementation detail from the README that's fun: the tasks backend internally returns 478 points, and the pack truncates to the canonical first 468 to keep batch shapes stable. So "468" is deliberate, not a typo.
Inputs and outputs
max_num_faces(1–10, default 1): how many faces to detect per image. Missing detections are NaN-padded, which is worth remembering - a face that isn't there comes back as NaN, not zeros, so downstream math doesn't quietly invent a face at the origin.min_detection_confidence(default 0.5): MediaPipe's detection threshold. Same caveat family as the detector node - don't crank it to 0.95 and expect portraits to survive.refine_landmarks: kept for API compatibility. Dense 468-point output is always used regardless.draw_overlay(default true): paint the points as green dots on theoverlayoutput. Turn it off only when you're in production and want the raw image.
Outputs are landmarks (shape (B, F, 468, 2), normalized to image extent, NaN-padded) and overlay (the image with dots, for validation).
What you actually do with it
The obvious move is feeding JHPixelProFaceWarp, which consumes the LANDMARKS type directly for Delaunay warping - the two are designed as a pair. But the overlay is genuinely underrated: drop this node into a workflow, glance at the green dots, and you've validated detection quality in one second before committing to a heavier retouch chain. The README also frames it as the prototype surface for future face-aware tools, because it establishes a stable custom LANDMARKS type that other pack nodes can consume. If you've ever fought a face tool that takes landmarks as undocumented JSON blobs, a typed tensor output is a relief.
Two honest limits. It needs mediapipe installed (clear import error otherwise, same as the detector - and the same ~5 MB model download to ComfyUI/models/mediapipe/ on first use). And the wrapper deliberately doesn't expose MediaPipe's per-point visibility score - you get landmarks and overlay, not confidence per point. For most pipeline work that's fine; if you need visibility filtering you'll be adding it yourself.
Install
ComfyUI Manager → search ComfyUI-JH-PixelPro, or:
cd ComfyUI/custom_nodes
git clone https://github.com/jetthuangai/ComfyUI-JH-PixelPro.git
cd ComfyUI-JH-PixelPro
pip install -r requirements.txt
Restart ComfyUI; it's under ComfyUI-JH-PixelPro/face. The pack wants ComfyUI ≥ 0.43.x, Python ≥ 3.10, plus kornia, mediapipe, opencv-python-headless, and scipy.
This node is not a fix for anything by itself - it's a measurement, and like most measurements it's only as useful as what you wire it into. Pair it with the warp node for geometry work, or use it purely as a validation step in front of the face pipeline. Either way, the overlay makes it the most reassuring node in the pack to watch run.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| max_num_faces | INT | 11–10 | Max faces per image. Missing faces are padded with NaN. |
| min_detection_confidence | FLOAT | 0.500–1 | MediaPipe min_face_detection_confidence threshold. |
| refine_landmarks | BOOLEAN | true | Kept for API compatibility; dense 468-point output is always used. |
| draw_overlay | BOOLEAN | true | Draw the detected landmarks as green dots on an overlay image. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| landmarks | LANDMARKS | — |
| overlay | IMAGE | — |