Nodes/ComfyUI-LivePortraitKJ/LivePortrait Load InsightFaceCropper
ComfyUI Node Runs on cloud

LivePortrait Load InsightFaceCropper

The picky but best detector

By kijai·Created 2 years ago·Updated 2 years ago· 2,199
LivePortrait Load InsightFaceCropper
    • cropper
    onnx_deviceCPU
    keep_model_loadedtrue
    detection_threshold0.50

    This is the "original equipment" face detector for the pack, and the one with the most baggage. LivePortraitLoadCropper loads an InsightFace-based cropper - SCRFD detection plus landmarking - and hands you a LPCROPPER that the LivePortrait Cropper node runs. It's the most accurate of the three detectors at extreme angles and tough lighting, and it's also the one most likely to make you curse during install. Both halves of that sentence matter.

    Why it's good

    InsightFace is the same library under nearly every identity tool in the ecosystem - IP-Adapter FaceID, InstantID, PuLID, ReActor all stand on it. Its detection quality is the reason it's load-bearing everywhere. For LivePortrait, it detects more extreme head angles than MediaPipe, which matters when your driving video has the subject turning away from camera. If you're chasing maximum fidelity and the license isn't a problem for you, this is the detector to use.

    The inputs

    • onnx_device (CPU / CUDA / ROCM / CoreML, default CPU) - the detector runs on ONNX Runtime, and this picks where. The README's caution: InsightFace can't run on GPU in Windows via this path, and on CPU it's slower than MediaPipe. If you set CUDA, you need onnxruntime-gpu installed (the pack's requirements list it, so Manager-installed setups usually have it).
    • keep_model_loaded (default on) - keep the detector resident between runs. Turn off if VRAM is tight.
    • detection_threshold (default 0.5) - how confident a detection must be before it counts. Raise it if you're getting spurious face picks in busy scenes; lower it to catch faces the model is unsure about.

    Output is a single cropper (LPCROPPER) that plugs straight into LivePortrait Cropper.

    The install tax

    InsightFace is not auto-installed by this pack, and the weights are non-commercial. Two things to handle:

    1. Install the library. With a working compile environment it's often just pip install insightface - or, for the portable Windows build:
      python_embeded/python.exe -m pip install insightface
      If that fails (it's famous for failing - the pre-1.0 builds needed Visual Studio build tools), the Reactor node's troubleshooting page covers the workarounds in detail.
    2. Drop the model pack in place. Extract buffalo_l.zip (from the InsightFace v0.7 release) so the model lands at ComfyUI/models/insightface/buffalo_l.

    And the license: InsightFace model weights are non-commercial - fine for personal projects, a dealbreaker if the output is for a client or a product. That restriction is why Kijai added MediaPipe to this pack in the first place (his July 2024 update made InsightFace optional precisely so the whole pipeline could be MIT + Apache 2.0). If you might sell the result, use LivePortrait Load MediaPipeCropper instead.

    Real talk

    If you're on a fresh install and just want the thing to run, start with the MediaPipe cropper. The quality gap at normal angles is small, and you skip the InsightFace install entirely. Come back to this node when you hit a driver that MediaPipe can't track - that's the scenario it actually wins.

    CategoryLivePortrait

    Inputs (3)

    NameTypeDefaultDescription
    onnx_deviceCOMBOCPU4 options: CPU, CUDA, ROCM, CoreML
    keep_model_loadedBOOLEANtrue
    detection_thresholdoptFLOAT0.500.05–1

    Outputs (1)

    NameTypeDescription
    cropperLPCROPPER