# CodeFormer

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

Source: https://talira.ai/catalog/codeformer-fy0ma57j
Every listing: https://talira.ai/catalog.md

- Kind: Source available
- Types: AI model
- Categories: [media / images / face restoration](https://talira.ai/categories/media/images/face-restoration)
- Licence: S-Lab License 1.0 (source-available)[^1]
- Pricing: Free and open source[^1]
- Pricing notes: Free for non-commercial use under the S-Lab License 1.0; commercial use needs the contributors' permission.
- Free tier: yes[^1]
- Self-hostable: yes[^2]
- Made by: [S-Lab, Nanyang Technological University](https://talira.ai/orgs/ntu-s-lab.md)

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](https://talira.ai/catalog/real-esrgan-1abe5hfd.md). It runs in PyTorch from the repository's scripts, with pretrained models from its GitHub releases.

## Links

- Website: https://shangchenzhou.com/projects/CodeFormer/
- GitHub: https://github.com/sczhou/CodeFormer

## 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' permission[^1]
- Its makers warn that several websites offering CodeFormer aren't theirs and use the models without a licence[^2]
- Restores faces; whole-image enhancement relies on Real-ESRGAN[^2]

## Trust

Overall: 0.34 out of 1.
Signals: maintenance 0.06, adoption 0.85, momentum 0.77, community 0.24, backing 0.30, extensibility 0.00.

- latest release v0.1.0 4.3 years ago
- 18.3k GitHub stars
- 3 contributors
- made by S-Lab, Nanyang Technological University

Warnings:

- last commit 12 months ago

## Alternatives

- [GFPGAN](https://talira.ai/catalog/gfpgan-hrtqedxp.md): Tencent ARC's practical face restoration model for real-world photos.

## Sources

[^1]: https://github.com/sczhou/CodeFormer/blob/master/LICENSE (checked 30 Nov 2026)
[^2]: https://github.com/sczhou/CodeFormer (checked 30 Nov 2026)
