← all repositories
TencentARC/GFPGAN

Fixing blurry faces by borrowing StyleGAN's memory

A Tencent research project that restores degraded faces by tapping into the rich priors locked inside a pretrained StyleGAN2 model.

GFPGAN
Velocity · 7d
+20
★ / day
Trend
steady
star history

What it does GFPGAN takes low-quality, damaged, or compressed face images and reconstructs realistic facial details. It handles the “blind” restoration problem — meaning it works without knowing exactly how the image was degraded — by using a pretrained face GAN as a structural guide.

The interesting bit Instead of learning to generate faces from scratch, the model hijacks the diverse facial priors already compressed inside StyleGAN2. It essentially asks: “What plausible face could have degraded into this mess?” The current “clean” version drops the original CUDA extensions, so it runs on CPU and Windows without compiling custom kernels.

Key highlights

  • Multiple model versions (V1 through V1.4) with different trade-offs: V1.3 aims for naturalness, V1.2 skews sharper with “beauty makeup” effects
  • Optional background upsampling via Real-ESRGAN integration
  • Training code included, with a simplified config that skips face-component landmarks
  • Distributed training support via PyTorch launch
  • Apache 2.0 license

Caveats

  • V1.3 can subtly shift identity; V1.2 can look unnatural — the README explicitly warns you need to pick based on your input
  • The original paper model requires separate installation via PaperModel.md
  • Training demands the FFHQ dataset and several auxiliary pretrained models (StyleGAN2, ArcFace, landmark data)

Verdict Worth a look if you’re building photo enhancement tools, video cleanup pipelines, or researching face super-resolution. Skip if you need guaranteed identity preservation or already get acceptable results from simpler interpolation-based upscalers.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.