Flux FaceIR Load RetinaFace
The unglamorous RetinaFace loader that every FaceIR whole-image workflow starts with
- retinaface_model
This node restores nothing. It's the boring first step that makes the flashy ones work, and honestly that's the whole job. Flux FaceIR Load RetinaFace loads the face detector weights that Flux FaceIR Detect And Align Face runs on, so if you're doing full-image (as opposed to already-cropped) restoration, this is where your graph starts.
If you only feed the pack aligned face crops - the aligned_face_restore.json workflow - you don't need it at all. Detection only matters when there's a whole photo to find the face in.
How it works
The pack registers a face_detectors model folder under ComfyUI/models, reads whatever .pth file is there, and builds a RetinaFace detector on the backbone you pick. That prepared object comes out as a RETINAFACE_MODEL, which is the custom type the rest of the pipeline consumes. It's a loader: weights in, ready-to-run detector out.
The inputs that actually matter
Most of the dropdowns have one right answer:
retinaface_name- the weights file frommodels/face_detectors. After you've dropped inretinaface_r34.pthit's the default.network- leave it onresnet34. This is the trap: the dropdown lists seven backbones (resnet18/50, mobilenet variants…), but you only downloaded the r34 weights. Picking another backbone doesn't download anything; it just breaks.device-autois right.cuda,cpu, ormpsonly exist for when auto guesses wrong.manual_retinaface_path- an escape hatch if your weights live somewhere theface_detectorsfolder can't see. Empty by default; leave it empty unless you have a reason.
The single output, retinaface_model, wires straight into Flux FaceIR Detect And Align Face. That's it.
Installing it
Install the pack once, then grab the detector weights:
cd ComfyUI/custom_nodes
git clone https://github.com/cosmicrealm/ComfyUI-Flux-FaceIR.git
cd ComfyUI-Flux-FaceIR
python install.py
Or search Flux FaceIR in ComfyUI Manager / run comfy node install flux-faceir. Restart ComfyUI after. Then:
mkdir -p ComfyUI/models/face_detectors
wget -O ComfyUI/models/face_detectors/retinaface_r34.pth \
https://github.com/yakhyo/retinaface-pytorch/releases/download/v0.0.1/retinaface_r34.pth
Heads-up for the full pipeline: the detector is the small file. The actual restoration needs the FLUX.2-Klein base 4B model, the Qwen3-4B text encoder, the flux2 VAE, and the FaceIR LoRA - several gigabytes total. This node just gets you past detection.
Where people get burned
- "RetinaFace model path is empty" - the node can't find weights in
face_detectors. You skipped the wget step. Fix: download the file, then fully restart ComfyUI so the dropdown refreshes. - Weights load, detection silently fails - check you didn't touch
network.retinaface_r34.pthis a resnet34 model; run it as anything else and you're loading garbage into a differently-shaped net. - One genuine Windows gotcha from the wild: dependencies installed into the system Python instead of the portable install's
python_embededcause nodes to vanish entirely. If a node shows up as "missing," re-runpip install -r requirements.txtwith the full path topython_embeded\python.exe.
RetinaFace is old, proven, and license-friendly here (no Ultralytics AGPL in sight, unlike the YOLO detector route). For the detecting step of a restoration loop, that's exactly what you want.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| retinaface_name | COMBO | [manual path] | 1 options: [manual path] |
| network | COMBO | resnet34 | 7 options: resnet34, resnet18, resnet50, mobilenetv2, mobilenetv1, mobilenetv1_0.50, +1 |
| device | COMBO | auto | 4 options: auto, cuda, cpu, mps |
| manual_retinaface_path | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| retinaface_model | RETINAFACE_MODEL | — |