HD FaceIndex
ComfyUI Node Guide
- input_image
- INT
This is the one node in the whole hd_node pack that explains why the README makes you go install insightface before anything else works. Everything else in this pack - the masks, the levels, the crop, even the upscaler - is plain image math that needs nothing exotic. HD FaceIndex is the exception: it takes an input_image and hands back a single INT, and the only realistic way a ComfyUI node produces a face-related number from a photo is by running a face detector over it. Given the README's own one-line summary of the pack's purpose - "judge whether it's the back [of the head]" is item one on its short list - the honest read is that this node is that check: point it at a photo, and it tells you, as a number, whether there's a usable face in it.
Why that's a real thing to want. If you're running a batch of portraits through any kind of face-detail or face-swap pass, you don't want to burn GPU time sampling a crop for a photo where the subject's back is to the camera - there's no face there to detail. A cheap upfront check that returns an int you can gate the rest of the graph on (skip the expensive pass, route to a fallback, flag the image for review) is a completely sensible thing to bolt onto a face pipeline, and it's the kind of small utility node that never gets its own README section because it's infrastructure for the author's other three nodes, not a feature in its own right.
What the output actually means, in numbers. This is the honest gap: the schema gives you the type (INT) and nothing else - no tooltip, no documented range. I can tell you what the node is for, from the README's framing, but not what specific values mean (whether 0 means "no face," whether it counts faces, whether it's a confidence-style score). The practical move is to test it: wire the output into a Show Any / Int display node, run it against a clean front-facing photo and an obvious back-of-head shot, and read off the two numbers you get. That takes thirty seconds and beats guessing.
Installing it. Same pack, same steps as every other HD node: search "hd-nodes-comfyui" or "HD Nodes" in ComfyUI Manager, or git clone https://github.com/xiaoxiaodesha/hd_node into custom_nodes and restart. This is the node that makes the pack's insightface requirement non-negotiable, so it's worth understanding what you're actually signing up for.
The insightface install, honestly. InsightFace has a well-earned reputation as one of the worst dependencies to install in this whole ecosystem, and it's the same library sitting under ReActor, InstantID, PuLID, and every other no-training face tool - they're all the same detection/recognition backbone with different front ends. For years, installing it meant compiling from source because prebuilt wheels lagged behind current Python versions, and on Windows that meant pulling in Visual Studio with the C++ desktop-development workload and the Windows SDK - exactly the sequence this pack's README warns you about. The genuinely good news: InsightFace 1.0, released May 2026, ended that three-year wheel drought and dropped the C++ build requirement from the default install. If you're setting this up fresh today, pip install insightface into ComfyUI's Python environment should just work without touching Visual Studio at all - most install guides floating around still describe the old, painful process, so don't follow one that sends you toward a compiler unless a plain pip install actually fails first.
If it still won't load. Confirm insightface imported successfully before touching anything else - check the ComfyUI console on startup for an import error near where the HD nodes register. Because custom node packs typically register everything from one file, a broken insightface import here can knock out every HD node, not just this one; if HD-Image-Levels or HD-SmoothEdge have also vanished from your node search, that's the tell. And if a downstream detection model the node relies on isn't cached yet, expect a one-time download on first run - that's normal for any insightface-backed node, not specific to this one.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| input_image | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |