# CodeFormer

> CodeFormer restores blurry or damaged faces, with a weight (-w) that trades fidelity against quality, plus optional Real-ESRGAN background and face upscaling, video input, and colorization and inpainting for cropped faces. It is a Python research project (conda, PyTorch, CUDA). Code and weights are under the NTU S-Lab License 1.0, which allows non-commercial use only, so it cannot replace a paid tool for client work. It does not upscale general photos on its own. Last commit Nov 2025; weights released Aug 2022.

- Repository: https://github.com/sczhou/CodeFormer
- Official docs: https://github.com/sczhou/CodeFormer#readme
- Checked: 2026-10-16

## What it replaces
- Topaz Gigapixel: Photo upscaling up to 16x, Face recovery on blurry or low-res faces (partial). Strong face recovery for personal use only; whole-image upscaling relies on Real-ESRGAN. Command line, non-commercial.

## Facts, with sources

| Question | Status | Answer | Source | Checked |
|---|---|---|---|---|
| Runs on my machine? | Confirmed | Yes, Python scripts on your machine | https://github.com/sczhou/CodeFormer#readme | 2026-10-16 |
| Code licence | No | NTU S-Lab License 1.0 (non-commercial) | https://github.com/sczhou/CodeFormer/blob/master/LICENSE | 2026-10-16 |
| Model weights licence | No | Weights fall under the same S-Lab non-commercial licence | https://github.com/sczhou/CodeFormer#license | 2026-10-16 |
| Commercial use | No | No, non-commercial licence for code and weights | https://github.com/sczhou/CodeFormer/blob/master/LICENSE | 2026-10-16 |
| Paid services needed? | Confirmed | None required | https://github.com/sczhou/CodeFormer#readme | 2026-10-16 |
| Hardware | Confirmed | PyTorch 1.7.1+ with CUDA 10.1+; VRAM not stated | https://github.com/sczhou/CodeFormer#dependencies-and-installation | 2026-10-16 |
| Operating systems | Partial | Not stated; the README has a note for Windows/Mac users (ffmpeg for video) | https://github.com/sczhou/CodeFormer#readme | 2026-10-16 |
| Setup effort | Confirmed | Medium, conda environment, pip requirements, download weights with a script | https://github.com/sczhou/CodeFormer#dependencies-and-installation | 2026-10-16 |

GitHub: 18180 stars, 3723 forks, last push 2025-11-18, archived: no.
---
Source: RepoQuarry (https://repoquarry.dev/projects/codeformer). Data licence: CC BY 4.0. Quotes are from project documentation and belong to their authors.
