FaceShaper Load InsightFace
The InsightFace backend for FaceShaper's V2 pipeline
- cropper
This is a loader node, not a worker node - click it once, get a cropper object out, and plug that into FaceShaperCropper. It's one of three interchangeable ways to give FaceShaper's V2 pipeline a face detector, and it's the one that uses InsightFace under the hood: the same detection library that sits behind nearly every face-swap and identity tool in the ComfyUI ecosystem (ReActor, InstantID, PuLID, the FaceID adapters - all of it, one backbone with different front ends).
Why FaceShaper needs a "cropper" at all
The point of FaceShaper is to fix a real, well-known problem: face-swap tools swap the features but leave the face shape alone, so when the source and target have different jawlines or proportions, the result looks wrong. FaceShaper's V2 pipeline fixes that in three steps - crop and align a face, warp its shape to match a target, paste it back - and step one needs a model that can find a face in an image and locate its landmarks. This node is one of three you can use for that job. InsightFace is the option to reach for when you want the most accurate detection, especially on faces at odd angles, and don't mind the tradeoffs that come with it (below).
The inputs that matter
onnx_device- where InsightFace runs:CPU(the default),CUDA,ROCM, orCoreML. CPU is the safe default but it's the slowest option by a wide margin; if you've got an NVIDIA card, switch this toCUDA.keep_model_loaded(defaulttrue) - keeps the model resident between runs instead of reloading it every time. Leave this on unless you're VRAM-starved.detection_threshold(optional, default0.5, range 0.05–1) - the confidence cutoff for "this is a face." Lower it if FaceShaper is missing faces it should be catching (small, blurry, or partial faces); raise it if it's picking up false positives.
The only output is cropper (type FSMCROPPER), a plain handle you wire straight into FaceShaperCropper's cropper input. Nothing else in the graph reads it directly.
Installing it
Grab the pack through ComfyUI Manager (search "ComfyUI_FaceShaper") or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/fssorc/ComfyUI_FaceShaper
then restart ComfyUI. This node specifically also needs:
- InsightFace itself, which is not installed automatically.
pip install insightface(or, for the portable build,python_embeded/python.exe -m pip install insightface). This is the single hardest part of using this loader - InsightFace has a long-standing reputation as one of the worst installs in local generation, historically requiring a C++ build toolchain (Visual Studio on Windows). If the pip install fails, the pack's own README points you at the ReActor node's troubleshooting section for workarounds. The good news: InsightFace 1.0, released May 2026, finally dropped that C++ build requirement - if you're installing fresh, get 1.0 or newer rather than following an old guide that sends you to Visual Studio. - The
buffalo_lmodel pack - download the zip from InsightFace's releases and unzip it toComfyUI/models/insightface/buffalo_l. landmark.onnxandlandmark_model.pth, from Kijai/LivePortrait_safetensors on HuggingFace, placed inmodels/liveportrait. FaceShaper's crop/landmark code is adapted fromComfyUI-LivePortraitKJand deliberately reuses its model paths - if you already have that pack installed, you already have these two files.
Common issues
The license is non-commercial. This is the thing to know before you build a pipeline you intend to sell. InsightFace's code is MIT, but every model pack - buffalo_l included - is licensed for non-commercial research only, and that restriction applies whether you downloaded the weights yourself or let pip fetch them automatically. If your FaceShaper workflow feeds a paid product, this loader (and anything downstream of it) is the wrong choice; swap to FaceShaperLoadMediaPipeCropper instead, which uses an Apache-2.0-licensed detector with no such restriction.
Install pain. If pip install insightface fails outright, that's the normal experience for anyone on an older InsightFace version - it's not you. Update to 1.0+ first; if you're stuck on an older environment, the ReActor troubleshooting page (linked in FaceShaper's own README) covers the usual fixes.
Detection missing faces, or grabbing the wrong one when there are several in frame. detection_threshold controls the former. The latter isn't this node's job - it's handled downstream, in FaceShaperCropper's face_index and face_index_order settings.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| onnx_device | COMBO | CPU | 4 options: CPU, CUDA, ROCM, CoreML |
| keep_model_loaded | BOOLEAN | true | — |
| detection_thresholdopt | FLOAT | 0.500.05–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| cropper | FSMCROPPER | — |