Blind Face Restoration
GFPGAN's generative facial prior recovers severely degraded faces that simple sharpening cannot fix — true blind face restoration built on StyleGAN2.
GFPGAN is an open-source blind face restoration model from Tencent ARC, published at CVPR 2021. We publish tested, sourced guides on how it works, how to install it, and when a different model is the better answer - plus a free browser photo enhancer that never uploads your images.
Sharpen, de-haze, and clean up a photo directly in your browser. Every pixel is processed locally on your own device - nothing is uploaded, stored, or sent to a server.
What this tool is: a classical image-enhancement filter — tone mapping, colour recovery, artifact smoothing, and an unsharp mask — implemented in JavaScript and run on your device. It sharpens and cleans photos well, but it is not the GFPGAN neural network and it does not reconstruct facial detail that is not already present in your image. To run the real GFPGAN model, see our installation guide or run it hosted on Replicate.
From a degraded, blurry input to a crystal-clear, high-fidelity portrait — every stage is transparent, measurable, and takes less than one second.
The pipeline detects landmarks and normalizes pose so restoration starts from stable geometry.
GFPGAN rebuilds detail while preserving expression, identity, and structure.
The restored face is blended back into the frame and prepared for final delivery.
New to the term? Read the full Face Restoration guide — what it means, how AI approaches it, and every related walkthrough on this site.
GFPGAN uses a generative facial prior to rebuild degraded faces. We document how that works, how to run it, and where it falls short — sourced to the original research and our own testing.
GFPGAN's generative facial prior recovers severely degraded faces that simple sharpening cannot fix — true blind face restoration built on StyleGAN2.
GFPGAN is built around preserving the subject's identity — the same person with a sharper face, rather than a plausible stranger.
GFPGAN restores the face, then hands the frame to Real-ESRGAN for upscaling. We explain why that order matters, and when you need only one of them.
The code and weights are published openly by Tencent ARC. You can run GFPGAN on your own machine at no cost — our install guide walks through every step.
v1.2, v1.3 and v1.4 trade speed against output character. We cover which checkpoint suits which kind of photo, and where to get each one.
Dependency breakage, missing weights, CUDA memory limits — we document the errors that actually stop people, with the fix and the reason for each.
We publish guides about a model we did not build. Every technical claim on this site traces back to the original research, the reference implementation, or our own documented testing — and each one is linked so you can check it yourself.
Peer-reviewed paper
The paper that introduced GFPGAN. Xintao Wang, Yu Li, Honglun Zhang and Ying Shan present the Generative Facial Prior — using a pretrained face GAN to supply realistic facial detail during restoration.
Reference implementation
The official implementation and released model weights, maintained by the ARC Lab at Tencent PCG. This is the canonical source for the v1.2, v1.3 and v1.4 checkpoints and for the current licence terms.
Hosted demo
GFPGAN runs as a hosted inference endpoint on Replicate and as a Hugging Face Space. Both execute the actual network on a server GPU — unlike the browser filter on this page, which is a local image enhancer.
Downstream adoption
GFPGAN ships as a selectable face-restoration backend in AUTOMATIC1111's Stable Diffusion WebUI and is available through ComfyUI extensions — one of the clearest signals of the model's practical adoption.
GFPGAN is developed by the ARC Lab at Tencent PCG and is not affiliated with this website. We are an independent documentation site. Read our editorial policy for how we test, source, and correct what we publish.
GFP-GAN Model and Runtime Matrix
| Variant | Target Resolution | Identity Fidelity | Runtime |
|---|---|---|---|
| gfpgan 1.2 | 512px | High | Fast |
| gfpgan 1.3 | 512px | High+ | Fast |
| gfpgan 1.4 | 1024px | Very High | Balanced |
| gfpgan 1.5 | 1024px | Ultra | Balanced |
Higher = faster (relative scale)
Identity Fidelity
Step through each stage of the restoration pipeline. Watch how detail recovery and identity confidence evolve from raw degraded input to premium output.
Pipeline Stages
Locate facial regions, align landmarks, and normalise crop geometry to 512×512.
Before / After Lens
Everything you need to know about GFP-GAN — from model selection to integrating with production pipelines.
GFPGAN — short for Generative Facial Prior Generative Adversarial Network — is an AI face restoration model developed by Tencent ARC and published at CVPR 2021. It rebuilds realistic detail in degraded, blurry, old, or compressed portrait photos. Unlike basic sharpening tools, GFPGAN understands what human faces should look like and reconstructs missing detail from scratch — eyes, skin texture, hair, and lips — while keeping the original person identifiable. The code and model weights are published openly by Tencent ARC on GitHub, and you can run the model locally or through a hosted endpoint such as Replicate.
GFPGAN works by injecting a generative facial prior — rich face knowledge extracted from a pre-trained StyleGAN2 model — directly into its restoration network. When you upload a degraded photo, the model detects and aligns each face, encodes whatever information remains in the damaged image, then uses the StyleGAN2 prior to fill in what is missing. Finally, the restored face is blended back into the original image. This four-stage pipeline produces natural-looking results because the model draws on patterns learned from millions of real faces rather than just interpolating pixels.
Yes. GFPGAN uses StyleGAN2 priors as its core restoration engine. A pre-trained StyleGAN2 generator contains a deep knowledge of natural face structure — texture, geometry, and lighting — learned from large face datasets. GFPGAN extracts this knowledge as a generative facial prior and injects it into the restoration network through spatial feature transform (SFT) layers. Because GFPGAN uses StyleGAN2 as a prior rather than a direct generator, it can reconstruct realistic face detail while still being guided by the specific identity in the degraded input photo.
GFPGAN works best on portrait photos containing human faces. It handles old scanned prints, blurry or motion-blurred shots, heavy JPEG compression, low-light grainy images, and low-resolution face crops. It processes every face in a photo automatically — including group shots. For best results, use a source image where the face is as large and unobstructed as possible.
The photo enhancer on this site is completely free and runs entirely in your browser using the Canvas API — your photos are never uploaded, and there is no account, installation, or usage limit. It is a sharpening and clean-up filter rather than the GFPGAN network itself. GFPGAN the model is also free: the weights are published openly and you can run them locally or through a hosted endpoint such as Replicate.
GFPGAN uses a StyleGAN2 generative prior injected through SFT layers, making it excellent for severely degraded and old photos. CodeFormer uses a codebook dictionary lookup with a fidelity weight slider, giving it an edge on identity preservation for modern portraits with mild damage. GFPGAN is faster and simpler to install locally. For most users restoring old or damaged photos, GFPGAN is the better starting point.