ComfyUI Node

πŸ“ Landmark Pro 468

MediaPipe's face mesh, wrapped and working

By kanibusΒ·Created about a year agoΒ·Updated about a year agoΒ· 5
πŸ“ Landmark Pro 468
  • image
  • landmarks
  • annotated_image
  • face_mask
  • confidence
β—„detection_confidence0.50β–Ί
β—„tracking_confidence0.50β–Ί
β—„enable_refinementtrueβ–Ί
β—„enable_micro_expressionsfalseβ–Ί
β—„smoothing0.50β–Ί
β—„wan_versionautoβ–Ί
β—„enable_t2i_adaptertrueβ–Ί
β—„cache_resultstrueβ–Ί

The name sounds like a gimmick, but this one's real. LandmarkPro468 is a thin, working wrapper around MediaPipe's FaceMesh - the same 468-point facial landmark detector behind a lot of face-tracking tooling - and it gives you those landmarks, a face mask, and an annotated image as standard ComfyUI outputs. In the kanibus/kanibus pack (a Claude-generated repo where several "AI" nodes are placeholder stubs), this is one of the honest ones: it actually runs a model and returns what it promises.

How it works

MediaPipe FaceMesh detects a face and outputs 468 landmarks in normalized coordinates; the node scales them to pixel space and hands you a 468Γ—3 numpy array (x, y, z - z is relative depth within the face, not camera distance). It also draws every point onto an annotated image, and builds a face_mask as the convex hull of the landmarks - so you get a tight face silhouette mask for free.

The knobs map directly onto MediaPipe's own confidence thresholds:

  • detection_confidence (0.1–1, default 0.5) - how sure the detector must be to find a face in the first place. Lower it if faces are being missed, but expect more false positives.
  • tracking_confidence (0.1–1, default 0.5) - how confident the tracker must stay between frames. Lower on blurry/occluded video.
  • enable_refinement - whether iris refinement (the extra 2 landmark sets for the irises) is on. You don't get iris points in the 468 array either way, but the tracking itself is better with it on; the code only actually engages it in wan_2.2 mode.
  • smoothing - exists as a parameter; in the shipped code it doesn't do much, so treat it as a placeholder knob.

Outputs: landmarks (LANDMARKS_468), annotated_image, face_mask (MASK), confidence (FLOAT). The face_mask is the most generally useful output - it wires into inpainting or masking workflows without needing the rest of the pack.

What it's good for

Landmark data is what the pack's other face nodes (pupil tracking, emotion, masking) theoretically feed on, but honestly you can get further wiring this node's mask into your own workflow. Use the annotated image as an overlay, the mask for targeted inpainting, or the landmarks for any analysis you want to do yourself. If you need iris landmarks specifically (468–475), note this node outputs the standard 468-point array without iris extras - NeuralPupilTracker is the one that gives you iris data.

Installing

cd ComfyUI/custom_nodes
git clone https://github.com/kanibus/kanibus
cd kanibus    # lowercase - the README's "cd Kanibus" fails on case-sensitive systems
pip install -r requirements.txt   # or requirements_minimal.txt if it clashes
python install.py

Restart ComfyUI, find it in the Kanibus category. MediaPipe auto-downloads its face-mesh model (~6MB) on first use; no manual model download needed. The README's "MUST download ~5.6GB of ControlNet models" doesn't apply to this node.

Gotchas

  • One face only. max_num_faces=1 - group shots get the first face detected.
  • No face = zeros. No detection returns an empty landmarks array, a blank mask, and 0.0 confidence. It won't crash; it'll just give you nothing useful.
  • Stateful node. The face_mesh instance keeps settings between calls, and some parameters are mutated per wan_version - if you toggle versions between runs, the detector's confidence settings carry over. Restart ComfyUI for a clean slate.

If you need 468-point facial landmarks inside ComfyUI, this works. It's not flashy and it doesn't add much beyond what raw MediaPipe gives you, but it's a competent, honest node - which, again, is more than half of this pack can claim.

CategoryKanibus

Inputs (9)

NameTypeDefaultDescription
imageIMAGEβ€”
detection_confidenceFLOAT0.500.1–1β€”
tracking_confidenceFLOAT0.500.1–1β€”
enable_refinementoptBOOLEANtrueβ€”
enable_micro_expressionsoptBOOLEANfalseβ€”
smoothingoptFLOAT0.500–1β€”
wan_versionoptCOMBOauto3 options: wan_2.1, wan_2.2, auto
enable_t2i_adapteroptBOOLEANtrueβ€”
cache_resultsoptBOOLEANtrueβ€”

Outputs (4)

NameTypeDescription
landmarksLANDMARKS_468β€”
annotated_imageIMAGEβ€”
face_maskMASKβ€”
confidenceFLOATβ€”