Face Restore Model Loader
Point ComfyUI at your CodeFormer/GFPGAN weights
- FACERESTORE_MODEL
This node does one small, unglamorous job: it loads a face-restoration model file off disk so JN_FaceRestoreWithModel has something to run. It's the loader half of a loader/applier pair, the same shape as a checkpoint loader feeding a KSampler - nothing happens visually here, it just hands off a FACERESTORE_MODEL object. Both nodes ship in JNComfy (jn-jairo/jn_comfyui), a large single-author pack, and this face-restore corner of it is a reimplementation of the well-known facerestore_cf node (credited directly in the pack's README).
Why it's a separate node
ComfyUI's convention is to split "load the weights" from "do the thing with the weights" so you can load a model once and reuse it across multiple applier nodes, or swap models without rebuilding the rest of your graph. It's the same reason checkpoint loading and sampling are different nodes. Here it means you can load CodeFormer once and feed it into several FaceRestoreWithModel nodes at different strengths without paying the load cost twice.
The one input that matters
model_name- an enum that lists whatever.pthfiles you've got sitting in ComfyUI's face-restore models folder. There's no default bundled with the pack - this dropdown is empty until you put a weight file there yourself.
The single output is FACERESTORE_MODEL, which plugs straight into JN_FaceRestoreWithModel's facerestore_model input.
Where the model files actually go
The pack's own README doesn't spell this out, but since this node is a direct reimplementation of facerestore_cf, it follows the same convention: face-restoration weights live in ComfyUI/models/facerestore_models/. Create that folder if it doesn't exist, and drop in the model you want:
codeformer.pth- CodeFormer, generally the better-regarded of the two, tends to preserve more of the original identity.GFPGANv1.4.pth- GFPGAN, the other classic, restores more aggressively and can drift identity a bit further from the source.
You don't need to touch the face detection models (retinaface/YOLOv5, chosen on the applier node) - those download automatically on first use into ComfyUI/models/facedetection/. This loader is only for the restoration weights, not the detector.
How to install it
Via ComfyUI Manager: search "JNComfy", install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/jn-jairo/jn_comfyui
then restart. This is a genuinely obscure pack - there's no reddit chatter about it that we could turn up, and no entry in our knowledge base, so budget for reading the source if you hit something odd rather than finding a forum thread about it.
Common issues & troubleshooting
Dropdown is empty / "no model_name choices." This is the expected state on a fresh install. It's not broken - it's telling you it found zero files in models/facerestore_models/. Download codeformer.pth or GFPGANv1.4.pth (search either name, both are widely mirrored from the original CodeFormer/GFPGAN releases) and place them in that folder, then restart ComfyUI or refresh node definitions so the enum picks them up.
Model loads but the applier node errors out. Double check you're actually feeding the FACERESTORE_MODEL output into JN_FaceRestoreWithModel's facerestore_model input and not, say, a regular checkpoint slot - the type is specific to this node pair and won't silently connect to unrelated model inputs.
cv2 / opencv import failures at load time. Face-restoration model loading in this family of nodes runs through the facelib package, which needs opencv-python. If ComfyUI errors on import rather than on the model file itself, that's the dependency to check first - pip install opencv-python in the same environment ComfyUI runs in.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | 0 options: |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| FACERESTORE_MODEL | FACERESTORE_MODEL | — |