PhotoMaker InsightFace Loader
The V2 gatekeeper with the annoying install
- INSIGHTFACE
PhotoMaker V2 works better than V1 at one specific job - likeness - and the reason is a second identity signal that needs a whole extra piece of software to run. PhotoMakerInsightFaceLoader is that piece: it loads InsightFace, the face-recognition library that V2 uses to extract biometric face embeddings from your reference photos. If you're on V1, you don't need this node at all. If you're on V2, nothing happens without it.
Why the extra machinery? V1 conditions on CLIP image embeddings - "what the image looks like." V2 adds ArcFace embeddings - "who this face is." Recognition-based identity is a much stronger signal for matching a specific person, which is the whole "Plus" upgrade. The trade is that InsightFace is the single most complained-about dependency in the ComfyUI ecosystem, and this node is where you feel it.
What it does
One input, one output:
- provider -
CPU,CUDA, orROCM. CPU always works and is fine for a few reference images; CUDA is faster if your onnxruntime install has GPU support. - INSIGHTFACE (output) - a face-analysis model that you wire into
PhotoMakerEncodePlus'sinsightface_optinput.
Under the hood it instantiates InsightFace's FaceAnalysis with the buffalo_l model set, rooted at ComfyUI/models/insightface/. On first run it downloads the model files there automatically - you don't hunt down a download link, but you do need the folder writable. The pack also ships a detection fallback that retries face detection at progressively smaller sizes, which rescues faces in small or low-res reference photos that a fixed detection size would miss.
The install, and it's the whole story
Install the pack normally - ComfyUI Manager, search "PhotoMaker Plus", or:
cd ComfyUI/custom_nodes
git clone https://github.com/shiimizu/ComfyUI-PhotoMaker-Plus.git
Then the real work: this node needs onnxruntime and insightface installed in ComfyUI's Python environment. The pack's requirements.txt is explicit: onnxruntime, onnxruntime-gpu (on Linux x86_64), insightface, and a numpy<2 pin. On the portable Windows build, do it inside the embedded Python:
cd ComfyUI_windows_portable
.\python_embeded\python.exe -m pip install onnxruntime insightface "numpy<2"
On a regular install:
pip install onnxruntime insightface "numpy<2"
InsightFace famously fights back on some setups - prebuilt wheels missing for your Python version, conflicts with numpy, CUDA/provider mismatch on the GPU provider. If CUDA gives you grief, select CPU in the dropdown and move on; for a handful of reference images the speed difference is negligible, and the CPU provider sidesteps the entire onnxruntime-gpu class of failures.
Gotchas worth planning around
- License, before you ship anything commercial. The InsightFace Python library is MIT, but the pretrained
buffalo_lONNX models are not - they carry a non-commercial license. That restriction travels with anything built on ArcFace embeddings, and PhotoMaker V2 is one of those things. This is the same trap that affects InstantID and PuLID, and it's a real reason some people stick with V1 or look for non-recognition alternatives. (The KB's identity-preservation essay covers the MediaPipe/FaceNet escape routes - neither directly applies to this pack, so plan around the license rather than around a workaround.) - "No face detected in input image pool." The encode node throws this when InsightFace can't find a face in your reference. Give it a clear, well-lit frontal shot.
- V2 needs the whole chain. LoaderPlus →
PhotoMakerInsightFaceLoader→ encode node'sinsightface_opt. Forget any link and you'll hit either "InsightFace is required for PhotoMaker V2" or weak identity.
Small node, outsized reputation. Treat the install as the actual task and the node itself as the easy part.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| provider | COMBO | 3 options: CPU, CUDA, ROCM |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INSIGHTFACE | INSIGHTFACE | — |