ComfyUI Node

Face Enhancement

The face-specific restoration pass

By Haoming02·Created 2 years ago·Updated about a year ago· 66
Face Enhancement
  • faces
  • FACES
hrfalse
gpu_id0

Face Enhancement takes the faces Face Detection (Stage2) found and runs a dedicated restoration pass on just those crops. It's the node that actually fixes faces in this pipeline - Stage2 only locates them, Stage4 only pastes them back - this is where the enhancement happens. You'd reach for the whole three-node chain (Stage2 → Stage3 → Stage4) specifically because Global Restoration on its own tends to leave faces soft; running a face-specific model on the cropped regions recovers detail that a whole-frame restoration pass smooths away.

If that sounds like the old "Restore Faces" checkbox from Automatic1111 - GFPGAN or CodeFormer, running a dedicated face-restoration GAN on detected face regions - it's the same general idea, and roughly the same generation of technology. This pack's Face Enhancement isn't GFPGAN or CodeFormer specifically; it's the face-restoration network from the Bringing-Old-Photos-Back-to-Life paper. But if you've used either of those before and know the pattern (detect a face, run a specialized network on it, blend it back), you already understand the shape of what this three-node chain does.

How it works

It takes the FACES output from Stage2 - face crops plus their landmark data - and runs each one through a face-specific restoration network trained separately from the Global model. That's the whole point of splitting detection, enhancement, and alignment into three nodes: a model trained specifically on faces does a better job on faces than a general-purpose restoration pass asked to handle an entire photo at once.

Inputs and outputs

  • faces (FACES) - must come from Face Detection (Stage2); this node can't take a raw IMAGE.
  • hr (BOOLEAN, default false) - the higher-parameters toggle, same as elsewhere in this pack.
  • gpu_id (STRING, default "0") - set -1 for CPU if you lack an Nvidia GPU or hit an out-of-memory error here.

Output is FACES - the enhanced version, still in the pack's internal format. It goes to exactly one place: Face Align (Stage4), which needs both this output and the original image to merge the enhanced faces back in.

Installing it

ComfyUI Manager: search "ComfyUI Old Photo Restoration," install, restart. Manual path:

cd ComfyUI/custom_nodes
git clone https://github.com/Haoming02/comfyui-old-photo-restoration

then restart and verify lib_bopb2l exists (pull backend.zip from Releases if it doesn't).

This node's checkpoints: download face_checkpoints.zip from the Releases page of Haoming02/sd-webui-old-photo-restoration (again, the author's earlier A1111 extension repo, not this one) and extract the checkpoints folder itself into lib_bopb2l/Face_Enhancement/. Same trap as the Global checkpoints - grab the folder, not just the loose files inside it, or it fails to load without a clear error message.

Common issues

Out of memory on this stage specifically. Running a second model (on top of Global Restoration) adds up on VRAM-constrained setups. One user on the pack's own launch thread reported an OOM; another said the whole pipeline ran fine on 4GB. If you're tight on VRAM, gpu_id -1 forces CPU for this stage - slower, but it'll get through it.

Enhanced faces look plasticky or over-smoothed. This is a known trait of this generation of face-restoration GAN (same family as GFPGAN/CodeFormer) - they trade fine skin texture for a cleaner, more symmetric result. If that's too aggressive for your photo, it's a limitation of the model, not a setting to fix; there's no strength slider here, only hr.

Node errors immediately with no faces enhanced. Check that Stage2 actually found faces first - if Face Detection's output is empty (no faces on the photo, or detection missed them), Face Enhancement has nothing to work with.

Categoryold-photo

Inputs (3)

NameTypeDefaultDescription
facesFACES
hrBOOLEANfalse
gpu_idSTRING0

Outputs (1)

NameTypeDescription
FACESFACES