AI Photo Restoration 2026: GFPGAN (38k Stars) vs CodeFormer - Bring Old Photos Back to Life, Free
Grandma's 1980s photo is blurry, scratched and faded. Paid restoration services charge per photo. Two open-source models restore faces and details locally and free - here is how they compare in 2026.
## The short answer
The two open-source AI photo restoration models that matter in 2026 are **GFPGAN** (37,645 stars) - the practical face restoration workhorse - and **CodeFormer** (18,089 stars), which handles a wider range of degradations with a controllable fidelity knob. Both run locally, free, and restore old or damaged photos in seconds.
## GFPGAN - the face specialist
- Purpose-built for restoring faces in old photos (blur, low-res, scratches).
- Practical API and pre-trained models for 1.x and 2.x.
- Simple usage:
```bash
pip install gfpgan
# or use the inference script
python inference_gfpgan.py -i inputs/ -o results/ -v 1.3
```
- Strong on faces; background and text get less attention.
## CodeFormer - the all-rounder
- Handles faces, backgrounds, text, and complex degradation together.
- Key feature: a fidelity weight (w=0 to 1) - low w gives more dramatic restoration, high w stays closer to the original.
- From the NeurIPS 2022 paper "Towards Robust Blind Face Restoration with Codebook Lookup Transformer".
- Recommended CLI usage:
```bash
python inference_codeformer.py -w 0.5 --input_path inputs --output_path results
```
## Practical comparison
| Aspect | GFPGAN | CodeFormer |
|:-------|:-------|:-----------|
| Faces | Excellent | Excellent |
| Text/backgrounds | OK | Better |
| Control knob | Little | Fidelity weight |
| Speed | Fast | Fast |
## Tips for best results
1. Run face restoration first, then upscale with Real-ESRGAN (see our guide) for a full pipeline.
2. For heavily damaged photos, try CodeFormer with w=0.3-0.5, then compare with w=0.7.
3. Batch process old family albums - both tools handle folders.
## FAQ
**Are these really free?** Yes - open source (CodeFormer has a non-commercial license; GFPGAN is for non-commercial use - check licenses for commercial work).
**Do they work on non-face photos?** GFPGAN focuses on faces; CodeFormer handles general restoration better.
**Can they fix color?** They improve clarity and details; color grading is often still needed manually.
## Related
- [AI Image Upscaler 2026: Real-ESRGAN](/post/ai-image-upscaler-real-esrgan-20260802)
- [AI Photo Restoration (Photoshop tools)](/post/ai-image-upscaler-comparison-2026)
Related Articles
2026-07-31
Three Cobblers Beat Zhuge Liang: Hermes MoA Perfectly Embodies This Old Saying
2026-07-29
Win11 KB5095093: Point-in-Time Restore, Pause Updates by Date, Screen Tint, and More
2026-07-24
Win11 26H2 Preview Officially Launches: Build 26300 Now Rolling Out
