# GFPGAN

> GFPGAN restores faces in old or low-quality photos using a pretrained StyleGAN2 prior, and can upscale the rest of the image with Real-ESRGAN. It is a Python command-line research project (PyTorch, NVIDIA GPU optional); many GUIs and ComfyUI nodes reuse its weights. The main code is Apache-2.0, but its licence file lists StyleGAN2- and DFDNet-derived parts under non-commercial terms, and the weights have no separate licence. It can shift identity slightly. Mature but inactive: last release v1.3.8 (Sep 2022), last commit Jul 2024.

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

## What it replaces
- Topaz Gigapixel: Photo upscaling up to 16x, Face recovery on blurry or low-res faces (partial). Face recovery is its main job; background upscaling goes through Real-ESRGAN. Command line only.

## Facts, with sources

| Question | Status | Answer | Source | Checked |
|---|---|---|---|---|
| Runs on my machine? | Confirmed | Yes, Python script on your machine | https://github.com/TencentARC/GFPGAN#zap-quick-inference | 2026-10-16 |
| Code licence | Partial | Apache-2.0, except StyleGAN2- and DFDNet-derived parts under non-commercial licences | https://github.com/TencentARC/GFPGAN/blob/master/LICENSE | 2026-10-16 |
| Model weights licence | Unknown | The repository declares Apache-2.0 with third-party exceptions, but a separate blanket grant for all released checkpoints was not verified; original StyleGAN2-related components have additional restrictions | https://github.com/TencentARC/GFPGAN/blob/master/LICENSE | 2026-10-16 |
| Commercial use | Partial | Unclear; bundled third-party code includes NVIDIA and DFDNet non-commercial terms | https://github.com/TencentARC/GFPGAN/blob/master/LICENSE | 2026-10-16 |
| Paid services needed? | Confirmed | None required | https://github.com/TencentARC/GFPGAN#readme | 2026-10-16 |
| Hardware | Confirmed | PyTorch; NVIDIA GPU with CUDA optional; the clean version needs no custom CUDA extensions | https://github.com/TencentARC/GFPGAN#wrench-dependencies-and-installation | 2026-10-16 |
| Operating systems | Partial | Linux listed; Windows and macOS not documented | https://github.com/TencentARC/GFPGAN#wrench-dependencies-and-installation | 2026-10-16 |
| Setup effort | Confirmed | Medium, clone repo, pip install basicsr, facexlib and requirements, download weights | https://github.com/TencentARC/GFPGAN#installation | 2026-10-16 |

GitHub: 37697 stars, 6288 forks, last push 2024-07-26, archived: no.
---
Source: RepoQuarry (https://repoquarry.dev/projects/gfpgan). Data licence: CC BY 4.0. Quotes are from project documentation and belong to their authors.
