Nodes/ComfyUI/Load Face Detection Model (MediaPipe)
ComfyUI Node Runs on cloud

Load Face Detection Model (MediaPipe)

MediaPipe face detection is now a core node — no face-swap pack required

By Comfy-Org·Created 4 years ago·Updated about 13 hours ago· 130,663
Load Face Detection Model (MediaPipe)
    • FACE_DETECTION_MODEL
    model_name

    Face detection in ComfyUI used to mean installing a heavy custom pack just to find the faces in an image - usually as a setup step for face-detail or face-swap work. As of May 2026 that's a core feature, and Load Face Detection Model (MediaPipe) is the loader half of it. It hands you MediaPipe's FaceLandmarker v2 weights, and a sibling node does the actual detection. No install, no pack.

    What you're loading

    This is a PyTorch port of Google's face_landmarker_v2_with_blendshapes model, and the weights bundle several things at once: two detector variants (a short-range detector for close-up faces, a full-range one for the rest), a shared face mesh, blendshape coefficients, and the canonical geometry data that describes what a "standard" face looks like. Downstream, the detection node runs BlazeFace to find faces, then FaceMesh v2 to place 478 landmarks on each one, then derives ARKit-52 style blendshapes - the same pipeline that powers a lot of live face-tracking and animation tooling.

    How the loader works

    One input, model_name, which lists files from models/detection/. The tooltip says it plainly: face detection model from models/detection/. The loader reads the file as a torch checkpoint and wraps it; if you point it at something that isn't a valid weight file, it errors cleanly.

    One output:

    • FACE_DETECTION_MODEL - wire it into MediaPipeFaceLandmarker, which is the node that actually detects faces and emits the landmark/blendshape data. From there you can visualize the mesh or derive face masks.

    Getting the model

    ComfyUI doesn't auto-download it, so drop the .safetensors/.pth weights into ComfyUI/models/detection/ and refresh the node list. The naming in the folder is generic - detection is also where other detection-type models land - so keep track of which file is the face landmarker.

    Common issues

    The format is the gotcha. This loader expects the PyTorch weights, not the .task file MediaPipe normally distributes. If you grabbed a .task bundle, it won't load here - you need the converted model file that the ComfyUI integration (and its upstream source) distributes.

    Second, detector scope is a real limitation, not a bug. The short-range detector is great on faces that fill the frame and struggles when faces are tiny or far away; that's exactly why the weights bundle both detectors, and the detection node picks between them. If you're trying to track a face in a wide shot, expect it to be less reliable than on a closeup.

    Third, keep expectations set: this is detection, not identity. It gives you where the face is and how it's shaped - the raw material for masks and animation. It doesn't tell you who it is. For that you'd still be in IP-Adapter or face-ID territory. But as a clean, core, no-pack way to find faces, it's a solid step up from nothing.

    Categorymodel/loaders

    Inputs (1)

    NameTypeDefaultDescription
    model_nameCOMBOFace detection model from models/detection/.

    Outputs (1)

    NameTypeDescription
    FACE_DETECTION_MODELFACE_DETECTION_MODEL