youcutai
S-Lab NTU (open source) via fal.aiedit

CodeFormer: Identity-Preserving Face Restoration

CodeFormer is a transformer-based face restoration model that uses a learned discrete codebook of facial features to reconstruct sharp, natural faces from degraded inputs. Its fidelity weight lets youcut.ai balance restoration strength against likeness, which is why restored relatives still look like themselves. It runs in Photo Restoration, as the face pass in the Photo Enhancer, and when face enhancement is enabled in the Image Upscaler.

Strengths

  • • Preserves identity better than GAN-only restorers
  • • Handles extreme degradation (tiny, blurred, scratched faces)
  • • Adjustable fidelity/quality trade-off
  • • Open source

Limitations

  • • Can over-smooth skin at high restoration strength
  • • Only affects faces; background needs other models
  • • Profile and heavily occluded faces are harder

Best for

  • • Old family photos
  • • Low-resolution group shots
  • • Blurry portraits from phones
Specs
TaskBlind face restoration
Fidelity weight0–1 (youcut default 0.7)
Latency~1–3 s
Provider keyfal-ai/codeformer

Try CodeFormer in

Frequently asked questions

Will the restored face still look like the person?+

Yes in most cases. CodeFormer's fidelity control is set to favor likeness on youcut.ai. Extremely degraded faces necessarily involve some reconstruction.

How is CodeFormer different from GFPGAN?+

Both restore faces, but CodeFormer's codebook approach is more robust to severe degradation and offers an explicit fidelity dial, reducing the "different person" effect.

Does it fix the whole photo?+

CodeFormer handles faces. youcut.ai combines it with scratch removal, denoising and Clarity Upscaler for the rest of the image.

Is it applied automatically?+

Yes in Photo Restoration and Photo Enhancer when faces are detected. In the Image Upscaler you enable it with the "Enhance faces" toggle.

Can it restore multiple faces in a group photo?+

Yes, every detected face is restored independently and blended back.