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

LivePortrait Load MediaPipeCropper

The detector that keeps your project sellable

By kijai·Created 2 years ago·Updated 2 years ago· 2,199
LivePortrait Load MediaPipeCropper
    • cropper
    landmarkrunner_onnx_deviceCPU
    keep_model_loadedtrue

    If you've ever squinted at an InsightFace license and thought "okay but what if I charge for this," this is the node for you. LivePortraitLoadMediaPipeCropper loads Google's MediaPipe-based face detector as the pack's face-finder, and the whole point is that MediaPipe is Apache 2.0 - commercial-clean - where InsightFace's weights are non-commercial. Kijai built this in partly because so many people couldn't even get InsightFace installed, and partly so the entire pipeline could be licensed permissively.

    How it differs from the InsightFace cropper

    MediaPipe replaces the detection and landmarking half only. The actual animation is unchanged. What you trade for the clean license:

    • Detection quality dips at the edges. InsightFace handles more extreme angles. For a normal talking-head driver, you won't notice.
    • It's much faster on CPU than InsightFace, and it can't run on GPU on Windows at all (a Google runtime limitation, not this pack's).
    • Install is automatic. mediapipe is in the pack's requirements, so Manager installs pull it in. No buffalo_l zip, no Visual Studio build tools, no non-commercial model files. This is why so many tutorials default to it now.

    The one input that makes this node interesting is landmarkrunner_onnx_device - it has the usual CPU / CUDA / ROCM / CoreML, plus a torch_gpu option. Pick torch_gpu and the landmark runner gets loaded from a converted PyTorch model (landmark_model.pth) that Kijai auto-downloads from his Hugging Face repo, instead of running through ONNX. That means you can skip the ONNX Runtime dependency entirely on some setups, and the torch version runs on GPU. On everything except Windows-CUDA, the README's advice basically boils down to: try torch_gpu, it's about as fast as ONNX and one fewer moving part. Otherwise CPU is the safe default.

    The other input is keep_model_loaded (default on) - leave it on unless you're fighting VRAM. Output is the single cropper (LPCROPPER) that feeds LivePortrait Cropper.

    The honest comparison

    | | MediaPipe | InsightFace | |---|---|---| | License | Apache 2.0 (clean) | Non-commercial weights | | Extreme angles | Weaker | Stronger | | CPU speed | Faster | Slower | | Install | Automatic | Manual, painful | | Small faces | Weak (short-range blazeface) | Better |

    When to reach for the other loaders

    MediaPipe's real weakness is small faces - its detector only ships the short-range blazeface, so if your subject is a small face in a wide shot, you'll get missed detections. For those, the newer FaceAlignment cropper (blazeface_back_camera / SFD) is the fix, and it stays license-clean. For extreme angles and maximum fidelity with no commercial concerns, the InsightFace loader is still the ceiling. For the default "I just want it to work and stay sellable" case, this is the node to grab.

    CategoryLivePortrait

    Inputs (2)

    NameTypeDefaultDescription
    landmarkrunner_onnx_deviceCOMBOCPU5 options: CPU, CUDA, ROCM, CoreML, torch_gpu
    keep_model_loadedBOOLEANtrue

    Outputs (1)

    NameTypeDescription
    cropperLPCROPPER