talira

CodeFormer

A face restoration model that repairs blurry, low-quality and old photos of faces.

source availableS-Lab License 1.0self-hostablefree

CodeFormer (NeurIPS 2022, "Towards Robust Blind Face Restoration with Codebook Lookup Transformer") restores degraded faces in photos and videos, with a setting that trades fidelity for quality. Its checkpoints also cover face inpainting and colorization of cropped, aligned faces, and it can enhance the background or upsample the restored face with Real-ESRGAN. It runs in PyTorch from the repository's scripts, with pretrained models from its GitHub releases.

Problems it solves

  • fix blurry faces in old family photos
  • restore faces in a low-quality video
  • clean up distorted faces in AI-generated images

Limitations

  • Its S-Lab License 1.0 allows non-commercial use only; commercial use needs the contributors' permission1
  • Its makers warn that several websites offering CodeFormer aren't theirs and use the models without a licence2
  • Restores faces; whole-image enhancement relies on Real-ESRGAN2

Alternatives

The same job

These do what CodeFormer does.

  1. GFPGAN Tencent ARC's practical face restoration model for real-world photos.

Compare CodeFormer with the top 3