人脸分析模型
The face-analysis loader that powers the pack's crop nodes — insightface or auraface
- ANALYSIS_MODELS
LamFaceAnalysisModels (人脸分析模型) is a loader. It doesn't detect a single face itself - it initializes a face-analysis backend and hands it to the nodes that need one, most importantly ImageCropFaces, whose ANALYSIS_MODELS input only accepts this node's output. You choose the library and the compute provider, and out comes a ready-to-use analysis bundle.
The reason it exists: ComfyUI_Lam's face-cropping machinery can run on two different detection backends, and this node is the switch. On the one side is insightface - the library under nearly every identity tool in the ecosystem (IP-Adapter FaceID, InstantID, PuLID, ReActor, Roop all sit on it). On the other is auraface, a lighter alternative backend the pack supports for when insightface won't cooperate. If you've ever fought insightface's installation, you know exactly why a fallback exists.
How it works
It takes the two choices and builds the analysis model:
- library (enum:
insightface/auraface) - which detection + embedding backend to load. - provider (enum:
CPU,CUDA,DirectML,OpenVINO,ROCM,CoreML) - where it runs. CPU is the safe default; pick your accelerator if the build supports it.
The output, ANALYSIS_MODELS, is the opaque bundle that ImageCropFaces consumes. You never read it directly - it's a dependency wire, not a value. That's the whole interface, and it's honestly refreshing: two dropdowns instead of twenty.
Install - where this node gets interesting
Pack install as usual:
cd ComfyUI/custom_nodes
git clone https://github.com/yanlang0123/ComfyUI_Lam
and restart. The catch is the backend. The README wants you to extract the bundled insightface.rar into python_embeded\Lib\site-packages, and insightface is one of the most reliably annoying installs in local generation - years of missing PyPI wheels meant source builds on Windows, usually with Visual Studio build tools. (The 1.0 release in 2026 finally dropped the C++ build requirement, which helps enormously.) If insightface won't import, that's the first thing to fix - and it's also why the auraface option is worth trying as the escape hatch when the pain outweighs the benefit.
Also keep in mind the licensing wrinkle if you're building anything to sell: insightface's weights are non-commercial even though the code is MIT. For personal use, fine. For a product, that's a real question - another reason to know the alternative backend exists.
Common issues
- Nothing to pick from / node errors on load - the insightface import failed at ComfyUI startup. The pack's nodes can error out entirely if its bundled backend is broken. Check the console log for an import traceback.
- ImageCropFaces input stays red - you need this node's output specifically, not a model file or an image.
- Face detection is slow - it's running on CPU. Switch the provider to CUDA if your build supports it.
- Completely different results switching backends - expected; insightface (RetinaFace/SCRFD detectors) and auraface detect differently. Pick one and stay consistent for reproducible workflows.
It's a two-dropdown loader, and its job is to make the crop nodes work. Get the backend installed once, and it's set-and-forget.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| library | COMBO | 2 options: insightface, auraface | |
| provider | COMBO | 6 options: CPU, CUDA, DirectML, OpenVINO, ROCM, CoreML |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| ANALYSIS_MODELS | ANALYSIS_MODELS | — |