Nodes/ComfyUI-BrainDead/BD MP Face Export
ComfyUI Node

BD MP Face Export

Passthrough node: runs MediaPipe on the input image, writes landmark JSON + RGBA zone mask PNG to disk, passes image through unchanged. Insert before greyscale/albedo/channel-pack steps. Feeds calibrate_faceplate_uv.py in the face plate UV pipeline. Wire context_id for automatic path resolution.

By BizaNator·Created 7 months ago·Updated 16 days ago· 14
BD MP Face Export
  • image
  • image
  • landmark_count
  • json_path
anglefront
context_id
output_dir
filename_stem
_model_path_deprecated/tmp/ComfyUI/models/mediapipe/face_landmarker.task
detection_confidence0.30
min_face_span0.35
Category🧠BrainDead/Segmentation

Inputs (8)

NameTypeDefaultDescription
imageIMAGEFull-color full-resolution image. Only image[0] is processed; all batch items pass through unchanged.
angleCOMBOfrontCamera angle. Stored in JSON and used as path suffix in context mode (e.g. _mp_front → <stem>_mp_front.json).
context_idoptSTRINGBD_SaveContext context_id. When set, output_dir and filename_stem are resolved from the context template. angle becomes the suffix.
output_diroptSTRINGFallback absolute path when no context is registered. Ignored when context_id resolves.
filename_stemoptSTRINGFallback filename stem (no extension) when no context is registered. angle is appended automatically: <stem>_mp_front.json
_model_path_deprecatedoptSTRING/tmp/ComfyUI/models/mediapipe/face_landmarker.taskDeprecated — model path is now fixed internally. This input is kept for workflow backward-compatibility only and is ignored.
detection_confidenceoptFLOAT0.300.1–1Minimum face detection confidence. 0.3 works for stylized renders.
min_face_spanoptFLOAT0.350–1Sanity guard: minimum plausible face span (fraction of frame, larger of x/y). MediaPipe occasionally returns a degenerate tiny detection on a frame-filling head; below this the node retries with a fresh landmarker and padded copies before accepting. Set 0 to disable the guard.

Outputs (3)

NameTypeDescription
imageIMAGEPassthrough — identical to input image.
landmark_countINT478 if face detected, 0 if not.
json_pathSTRINGAbsolute path of the written JSON file.