
GFPGAN vs CodeFormer vs GPEN: Face Restorers Compared
GFPGAN, CodeFormer, GPEN, RestoreFormer++ and VQFR compared: who made them, input sizes, fidelity controls, licenses and settings in VisoMaster Studio.
GFPGAN, CodeFormer and GPEN are blind face restoration models: they take a degraded face and produce a cleaner one, each using a different kind of learned face prior. In VisoMaster Studio they run on the swapped face after the swap, alongside GFPGAN 1024, RestoreFormer++ and VQFR v2. The practical differences are the size each model works at, whether it has a fidelity control, and its license. Which looks right depends on your footage, so compare them on your own clip.
Where restoration fits in a face swap
The swap model redraws the inner face, sometimes at a small size such as Inswapper's 128 × 128 (see face swap models compared). Studio aligns that face to a 512 × 512 crop, and the restorer works on this crop before it is blended back into the frame. Restorers only change the face; whole-frame upscalers such as Real-ESRGAN are a separate step.
In the panel on the right you can turn face restoration on and set its strength. Strength is the blend between the restored face and the unrestored swap, from 0 to 100; the default is 100. The restorer model, the fidelity weight and a second restorer are in Advanced settings. The default model is GFPGAN v1.4.
The restorers at a glance
| Model in Studio | Authors and paper | Size the model runs at in Studio | Fidelity control | License stated by the authors |
|---|---|---|---|---|
| GFPGAN v1.4 | Wang et al., Tencent ARC, CVPR 2021 | 512 | No | Apache-2.0, with third-party parts under their own licenses |
| GFPGAN 1024 | Third-party retraining by LeslieZhoa | 512 in, 1024 out | No | Repository: MIT |
| CodeFormer | Zhou et al., S-Lab NTU, NeurIPS 2022 | 512 | Yes | NTU S-Lab License 1.0, non-commercial |
| GPEN 256, 512, 1024, 2048 | Yang et al., DAMO Academy, CVPR 2021 | 256, 512, 1024 or 2048 | No | No license file in the repository |
| RestoreFormer++ | Wang et al., TPAMI 2023 | 512 | No | Apache-2.0 |
| VQFR v2 | Gu et al., Tencent ARC, ECCV 2022 | 512 | Yes | Apache-2.0, with third-party parts under their own licenses |
Each of these produced an output in an automated test run of Studio 0.3.0 on an Apple Silicon Mac. That run checked that every model works; it did not rank quality or measure speed. Each model keeps its own license regardless of Studio's GPL-3.0 source license.
GFPGAN
GFPGAN comes from Xintao Wang, Yu Li, Honglun Zhang and Ying Shan at Tencent ARC ("Towards Real-World Blind Face Restoration with Generative Facial Prior", CVPR 2021). Its README says it uses the priors in a pretrained face GAN, such as StyleGAN2, for blind face restoration. The model zoo describes v1.4 as producing slightly more details and better identity than v1.3, and notes that a newer version (v1.3 versus v1.2) is not always better, so the right model depends on your purpose and input.
GFPGAN is under Apache-2.0, but its LICENSE file lists third-party components with their own terms, including NVIDIA's StyleGAN2 license and code adapted from DFDNet under CC BY-NC-SA 4.0.
GFPGAN 1024 is not a Tencent ARC release. It is a retrained GFPGAN by the GitHub user LeslieZhoa that takes a 512 input and returns a 1024 output; Studio uses an ONNX conversion of it. Studio scales the 1024 result back to 512 before blending, so the face still ends up at the 512 crop size.
CodeFormer
CodeFormer is by Shangchen Zhou, Kelvin C.K. Chan, Chongyi Li and Chen Change Loy at S-Lab, Nanyang Technological University ("Towards Robust Blind Face Restoration with Codebook Lookup Transformer", NeurIPS 2022). As the title says, it restores a face by having a Transformer look up entries in a learned codebook.
CodeFormer has a fidelity weight w between 0 and 1. Its README says a smaller w tends to give a higher-quality result and a larger w a higher-fidelity one. Studio exposes this as the fidelity weight in Advanced settings, with a default of 0.9.
The license is the NTU S-Lab License 1.0, which permits redistribution and use for non-commercial purposes and asks you to contact the authors for commercial use.
GPEN
GPEN is by Tao Yang, Peiran Ren, Xuansong Xie and Lei Zhang of DAMO Academy, Alibaba ("GAN Prior Embedded Network for Blind Face Restoration in the Wild", CVPR 2021). The name describes the approach: a GAN prior embedded inside the restoration network. The 256 and 512 models are on the repository; the README says the 1024 and 2048 models were published on ModelScope in February 2023, and that the public 512 model is not the authors' best "due to commercial issues". The repository has no license file, so check with the authors before commercial use.
How Studio runs GPEN matters when you choose a size. The face crop is 512 × 512:
- GPEN 256 shrinks the crop to 256, restores it, and scales the result back up to 512.
- GPEN 512 works on the crop directly.
- GPEN 1024 and 2048 enlarge the crop to 1024 or 2048, restore it, and scale the result back down to 512.
So a larger GPEN model does not give you a larger face in the output; it changes which trained model processes the face and how much work each frame takes.
RestoreFormer++ and VQFR v2
RestoreFormer++ is by Zhouxia Wang and co-authors (TPAMI 2023), an extension of RestoreFormer (CVPR 2022). Its README says it uses fully-spatial attention with reconstruction-oriented high-quality priors, and adds an extended degradation model to train on more realistic degraded faces. It is Apache-2.0 and runs at 512 in Studio.
VQFR is by Yuchao Gu and co-authors from Nankai University, Tencent ARC Lab and other institutes (ECCV 2022 oral). It combines a vector-quantized dictionary with a parallel decoder. The v2 model adds a fidelity ratio from 0 (best quality) to 1 (best fidelity), which Studio controls with the same fidelity weight setting used for CodeFormer. It is Apache-2.0 with third-party components listed in its LICENSE file.
Second restorer
Studio can run a second restorer with its own model, alignment, fidelity weight and blend. By default it runs right after the first one; an option applies it at the end of the pipeline instead, after the face editor and before the final blur and compression steps. Both restorers can use any model in the list.
How to compare restorers on your own footage
- Set up the swap first and pick a frame that matters: a close-up, motion blur, teeth or eyes.
- Turn on face restoration in the right-hand panel.
- In Advanced settings, choose the restorer model. For CodeFormer and VQFR v2, also try the fidelity weight.
- Switch to the compare view to see the result next to the original, and check the same frame with each model. The first use of a model downloads it.
- Adjust the strength for the model you keep, and add a second restorer only if it improves the frames you care about.

Use parameter markers if one part of a clip needs different restoration from the rest. With several people in a shot, each face keeps its own settings; see how to swap multiple faces in a video. For how this lineup compares with FaceFusion's, see VisoMaster vs FaceFusion, and for Mac setup see VisoMaster on Mac.
Consent and acceptable use
Only use faces you have the right to use: your own, or someone who has given consent. Label synthetic media and follow local law. VisoMaster Studio's rules are in the acceptable use policy.
FAQ
Which restorer should I use?
There is no single answer. GFPGAN's own README says the right model depends on your purpose and input. Start with the default, GFPGAN v1.4, then try CodeFormer, GPEN and the others on the same frame in the compare view.
Does GPEN 2048 make the face sharper than GPEN 512?
Not because of output size. In Studio the result of every GPEN model is scaled back to the 512 × 512 face crop. The 2048 model is a different trained model working on an enlarged crop, so compare it on your footage.
What does the fidelity weight do?
It applies to CodeFormer and VQFR v2 only. Both projects describe lower values as favouring restoration quality and higher values as staying closer to the input face. Studio's default is 0.9.
Can I use CodeFormer for commercial work?
CodeFormer's S-Lab License 1.0 covers non-commercial use; for commercial use it asks you to contact the authors. GFPGAN, VQFR and RestoreFormer++ are Apache-2.0 (GFPGAN and VQFR with third-party parts), and the GPEN repository has no license file. Check each license yourself.
Get the installers at visomaster.studio/download.
Author

Categories
More Posts

How to Face Swap a Video Locally on Mac or Windows
Face swap a video on your own computer with VisoMaster Studio: add a reference photo, map it to a face, check masks and restoration, then export.


Face Swap Models Compared: Inswapper, SimSwap, Ghost
Inswapper, SimSwap, GhostFace, CSCS, AlphaFace and InStyleSwapper compared: input size, recognition model, license and options in VisoMaster Studio.


DeepFaceLive DFM Models: What They Are and How to Use Them
What a DeepFaceLive .dfm model is, how DeepFaceLab and DeepFaceLive differ, and how to import and use .dfm files in VisoMaster Studio on Mac or Windows.
