Nodes/BrainDead Nodes/BD Face Landmarks
ComfyUI Node

BD Face Landmarks

The anchor point for the whole face-wrap pipeline

By BizaNator·Created 8 months ago·Updated 3 days ago· 15
BD Face Landmarks
  • images
  • landmarks_batch
  • overlay
  • status
min_detection_confidence0.40
min_presence_confidence0.40
model_path

Almost every "take a character's head photos and wrap them into a texture" workflow collapses on one thing: nobody knows where the eyes, mouth, and ears actually are. BD Face Landmarks is the node that solves that - it runs Google's MediaPipe FaceLandmarker on a batch of head photos and returns a LANDMARKS_BATCH: 478 landmarks per view, a per-view 4×4 head-pose transform, and a coarse view hint (front / left / right / rear). It's the first node in the BrainDead FaceWrap stack, and everything downstream - fitting a head mesh, baking textures, stitching views - eats this output.

Because it's MediaPipe (Apache 2.0) rather than something like InsightFace, there's no license trap and it's fast on CPU. The KB panel on it calls this role "the commercially-clear detection and landmarking backend," which is exactly what a game-asset pack needs to be built on.

What you feed it and what comes out

  • images - the batch of head photos. For the canonical 4-view wrap you feed front/left/right/rear in that order.
  • min_detection_confidence (0.4) and min_presence_confidence (0.4) - the two MediaPipe thresholds. Lower min_detection_confidence and more extreme profile views get accepted; 0.4 is a decent floor for profiles.
  • model_path (optional) - override for face_landmarker.task. Empty = it searches ComfyUI's model dirs under mediapipe/face_landmarker.task and auto-downloads the ~3.6 MB bundle on first use if missing.

Outputs: landmarks_batch (feeds BD Face Fit, BD Face Mesh, the strip/mosaic composers), overlay (an image with the landmarks drawn per view - always look at this first), and status.

One genuinely nice design detail: failed detections (rear shots, extreme profiles) stay in the batch with detected=False instead of silently dropping out, so view ordering never shifts underneath you.

Installing

Ships in ComfyUI-BrainDead. ComfyUI Manager → search "BrainDead" → install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/BizaNator/ComfyUI-BrainDead
cd ComfyUI-BrainDead
pip install -r requirements.txt

Restart. The MediaPipe Tasks API and the model bundle need to be available - the model auto-downloads, but if you get a missing-import error, pip install mediapipe in your ComfyUI environment first.

Where people get burned

The classic failure isn't the node, it's the photos: rear and extreme-profile shots just won't detect well, so keep min_detection_confidence reasonable and don't fight it - the pipeline is built to tolerate an undetected rear view. And check the overlay before wiring onward; if a "front" came back classified weirdly, the per-slot index overrides in the composer nodes (e.g. front_index) exist exactly for that.

Category🧠BrainDead/FaceWrap

Inputs (4)

NameTypeDefaultDescription
imagesIMAGEBatch of head photos. For the 4-view face-wrap stack front/left/right/rear in that order.
min_detection_confidenceFLOAT0.400–1Lower = more profile views accepted. 0.4 is a decent profile floor.
min_presence_confidenceFLOAT0.400–1MediaPipe landmark-presence threshold.
model_pathoptSTRINGOverride path to face_landmarker.task. Empty = search ComfyUI model dirs for mediapipe/face_landmarker.task (auto-download if missing).

Outputs (3)

NameTypeDescription
landmarks_batchBD_LANDMARKS_BATCH
overlayIMAGE
statusSTRING