Image Upscaling & Restoration using GFPGAN / RestoreFormerPlusPlus / CodeFormer / GPEN Algorithm
GFPGAN: Towards Real-World Blind Face Restoration and Upscalling of the image with a Generative Facial Prior.
RestoreFormer++: Towards Real-World Blind Face Restoration from Undegraded Key-Value Pairs.
CodeFormer: Towards Robust Blind Face Restoration with Codebook Lookup Transformer (NeurIPS 2022).
GPEN: GAN Prior Embedded Network for Blind Face Restoration in the Wild.
Practically, the aforementioned algorithm is used to restore your **old photos** or improve **AI-generated faces**.
To use it, simply just upload the concerned image.
Face Restoration version
Face Restoration and RealESR can be freely combined in different ways, or one can be set to "None" to use only the other model. Face Restoration is primarily used for face restoration in real-life images, while RealESR serves as a background restoration model.
UpScale version
Face Detection type
If set to True, only the face closest to the center of the image will be kept.
Examples
Pages:
Face Model Name | Info | Download URL |
---|---|---|
GFPGANv1.4.pth | GFPGAN: Towards Real-World Blind Face Restoration and Upscalling of the image with a Generative Facial Prior. GFPGAN aims at developing a Practical Algorithm for Real-world Face Restoration. It leverages rich and diverse priors encapsulated in a pretrained face GAN (e.g., StyleGAN2) for blind face restoration. |
download |
RestoreFormer++.ckpt | RestoreFormer++: Towards Real-World Blind Face Restoration from Undegraded Key-Value Pairs. RestoreFormer++ is an extension of RestoreFormer. It proposes to restore a degraded face image with both fidelity and realness by using the powerful fully-spacial attention mechanisms to model the abundant contextual information in the face and its interplay with reconstruction-oriented high-quality priors. |
download |
CodeFormer.pth | CodeFormer: Towards Robust Blind Face Restoration with Codebook Lookup Transformer (NeurIPS 2022). CodeFormer is a Transformer-based model designed to tackle the challenging problem of blind face restoration, where inputs are often severely degraded. By framing face restoration as a code prediction task, this approach ensures both improved mapping from degraded inputs to outputs and the generation of visually rich, high-quality faces. |
download |
GPEN-BFR-512.pth | GPEN: GAN Prior Embedded Network for Blind Face Restoration in the Wild. GPEN addresses blind face restoration (BFR) by embedding a GAN into a U-shaped DNN, combining GAN’s ability to generate high-quality images with DNN’s feature extraction. This design reconstructs global structure, fine details, and backgrounds from degraded inputs. Simple yet effective, GPEN outperforms state-of-the-art methods, delivering realistic results even for severely degraded images. |
download |
GPEN-BFR-1024.pt | The same as GPEN but for 1024 resolution. | download |
GPEN-BFR-2048.pt | The same as GPEN but for 2048 resolution. | download |
GFPGANv1.3.pth | The same as GFPGAN but legacy model | download |
GFPGANv1.2.pth | The same as GFPGAN but legacy model | download |
RestoreFormer.ckpt | The same as RestoreFormer++ but legacy model | download |
Upscale Model | Info, Type: SRVGG, Model execution speed: Fast | Download URL |
---|---|---|
realesr-general-x4v3.pth | Compression Removal, General Upscaler, JPEG, Realistic, Research, Restoration xinntao: add realesr-general-x4v3 and realesr-general-wdn-x4v3. They are very tiny models for general scenes, and they may more robust. But as they are tiny models, their performance may be limited. |
download |
realesr-animevideov3.pth | Anime, Cartoon, Compression Removal, General Upscaler, JPEG, Realistic, Research, Restoration xinntao: update the RealESRGAN AnimeVideo-v3 model, which can achieve better results with a faster inference speed. |
download |
4xLSDIRCompact.pth | Realistic Phhofm: Upscale small good quality photos to 4x their size. This is my first ever released self-trained sisr upscaling model. |
download |
4xLSDIRCompactC.pth | Compression Removal, JPEG, Realistic, Restoration Phhofm: 4x photo upscaler that handler jpg compression. Trying to extend my previous model to be able to handle compression (JPG 100-30) by manually altering the training dataset, since 4xLSDIRCompact cant handle compression. Use this instead of 4xLSDIRCompact if your photo has compression (like an image from the web). |
download |
4xLSDIRCompactR.pth | Compression Removal, Realistic, Restoration Phhofm: 4x photo uspcaler that handles jpg compression, noise and slight. Extending my last 4xLSDIRCompact model to Real-ESRGAN, meaning trained on synthetic data instead to handle more kinds of degradations, it should be able to handle compression, noise, and slight blur. |
download |
4xLSDIRCompactN.pth | Realistic Phhofm: Upscale good quality input photos to x4 their size. The original 4xLSDIRCompact a bit more trained, cannot handle degradation. I am releasing the Series 3 from my 4xLSDIRCompact models. In general my suggestion is, if you have good quality input images use 4xLSDIRCompactN3, otherwise try 4xLSDIRCompactC3 which will be able to handle jpg compression and a bit of blur, or then 4xLSDIRCompactCR3, which is an interpolation between C3 and R3 to be able to handle a bit of noise additionally. |
download |
4xLSDIRCompactC3.pth | Compression Removal, JPEG, Realistic, Restoration Phhofm: Upscale compressed photos to x4 their size. Able to handle JPG compression (30-100). I am releasing the Series 3 from my 4xLSDIRCompact models. In general my suggestion is, if you have good quality input images use 4xLSDIRCompactN3, otherwise try 4xLSDIRCompactC3 which will be able to handle jpg compression and a bit of blur, or then 4xLSDIRCompactCR3, which is an interpolation between C3 and R3 to be able to handle a bit of noise additionally. |
download |
4xLSDIRCompactR3.pth | Realistic, Restoration Phhofm: Upscale (degraded) photos to x4 their size. Trained on synthetic data, meant to handle more degradations. I am releasing the Series 3 from my 4xLSDIRCompact models. In general my suggestion is, if you have good quality input images use 4xLSDIRCompactN3, otherwise try 4xLSDIRCompactC3 which will be able to handle jpg compression and a bit of blur, or then 4xLSDIRCompactCR3, which is an interpolation between C3 and R3 to be able to handle a bit of noise additionally. |
download |
4xLSDIRCompactCR3.pth | Phhofm: I am releasing the Series 3 from my 4xLSDIRCompact models. In general my suggestion is, if you have good quality input images use 4xLSDIRCompactN3, otherwise try 4xLSDIRCompactC3 which will be able to handle jpg compression and a bit of blur, or then 4xLSDIRCompactCR3, which is an interpolation between C3 and R3 to be able to handle a bit of noise additionally. | download |
2xParimgCompact.pth | Realistic Phhofm: A 2x photo upscaling compact model based on Microsoft's ImagePairs. This was one of the earliest models I started training and finished it now for release. As can be seen in the examples, this model will affect colors. |
download |
1xExposureCorrection_compact.pth | Restoration Phhofm: This model is meant as an experiment to see if compact can be used to train on photos to exposure correct those using the pixel, perceptual, color, color and ldl losses. There is no brightness loss. Still it seems to kinda work. |
download |
1xUnderExposureCorrection_compact.pth | Restoration Phhofm: This model is meant as an experiment to see if compact can be used to train on underexposed images to exposure correct those using the pixel, perceptual, color, color and ldl losses. There is no brightness loss. Still it seems to kinda work. |
download |
1xOverExposureCorrection_compact.pth | Restoration Phhofm: This model is meant as an experiment to see if compact can be used to train on overexposed images to exposure correct those using the pixel, perceptual, color, color and ldl losses. There is no brightness loss. Still it seems to kinda work. |
download |
2x-sudo-UltraCompact.pth | Anime, Cartoon, Restoration sudo: Realtime animation restauration and doing stuff like deblur and compression artefact removal. My first attempt to make a REALTIME 2x upscaling model while also applying teacher student learning. (Teacher: RealESRGANv2-animevideo-xsx2.pth) |
download |
2x_AnimeJaNai_HD_V3_SuperUltraCompact.pth | Anime, Compression Removal, Restoration the-database: Real-time 2x Real-ESRGAN Compact/UltraCompact/SuperUltraCompact models designed for upscaling 1080p anime to 4K. The aim of these models is to address scaling, blur, oversharpening, and compression artifacts while upscaling to deliver a result that appears as if the anime was originally mastered in 4K resolution. |
download |
2x_AnimeJaNai_HD_V3_UltraCompact.pth | Anime, Compression Removal, Restoration the-database: Real-time 2x Real-ESRGAN Compact/UltraCompact/SuperUltraCompact models designed for upscaling 1080p anime to 4K. The aim of these models is to address scaling, blur, oversharpening, and compression artifacts while upscaling to deliver a result that appears as if the anime was originally mastered in 4K resolution. |
download |
2x_AnimeJaNai_HD_V3_Compact.pth | Anime, Compression Removal, Restoration the-database: Real-time 2x Real-ESRGAN Compact/UltraCompact/SuperUltraCompact models designed for upscaling 1080p anime to 4K. The aim of these models is to address scaling, blur, oversharpening, and compression artifacts while upscaling to deliver a result that appears as if the anime was originally mastered in 4K resolution. |
download |
Upscale Model | Info, Type: RRDB, Model execution speed: Normal | Download URL |
---|---|---|
RealESRGAN_x4plus_anime_6B.pth | Anime, Cartoon, Compression Removal, General Upscaler, JPEG, Realistic, Research, Restoration xinntao: We add RealESRGAN_x4plus_anime_6B.pth, which is optimized for anime images with much smaller model size. More details and comparisons with waifu2x are in anime_model.md |
download |
RealESRGAN_x2plus.pth | Compression Removal, General Upscaler, JPEG, Realistic, Research, Restoration xinntao: Add RealESRGAN_x2plus.pth model |
download |
RealESRNet_x4plus.pth | Compression Removal, General Upscaler, JPEG, Realistic, Research, Restoration xinntao: This release is mainly for storing pre-trained models and executable files. |
download |
RealESRGAN_x4plus.pth | Compression Removal, General Upscaler, JPEG, Realistic, Research, Restoration xinntao: This release is mainly for storing pre-trained models and executable files. |
download |
Upscale Model | Info, Type: ESRGAN, Model execution speed: Normal | Download URL |
---|---|---|
4x-AnimeSharp.pth | Anime, Cartoon, Text Kim2091: Interpolation between 4x-UltraSharp and 4x-TextSharp-v0.5. Works amazingly on anime. It also upscales text, but it's far better with anime content. |
download |
4x_IllustrationJaNai_V1_ESRGAN_135k.pth | Anime, Cartoon, Compression Removal, Dehalftone, General Upscaler, JPEG, Manga, Restoration the-database: Model for color images including manga covers and color illustrations, digital art, visual novel art, artbooks, and more. DAT2 version is the highest quality version but also the slowest. See the ESRGAN version for faster performance. |
download |
2x-sudo-RealESRGAN.pth | Anime, Cartoon sudo: Tried to make the best 2x model there is for drawings. I think i archived that. And yes, it is nearly 3.8 million iterations (probably a record nobody will beat here), took me nearly half a year to train. It can happen that in one edge is a noisy pattern in edges. You can use padding/crop for that. I aimed for perceptual quality without zooming in like 400%. Since RealESRGAN is 4x, I downscaled these images with bicubic. Pretrained: Pretrained_Model_G: RealESRGAN_x4plus_anime_6B.pth / RealESRGAN_x4plus_anime_6B.pth (sudo_RealESRGAN2x_3.332.758_G.pth) |
download |
2x-sudo-RealESRGAN-Dropout.pth | Anime, Cartoon sudo: Tried to make the best 2x model there is for drawings. I think i archived that. And yes, it is nearly 3.8 million iterations (probably a record nobody will beat here), took me nearly half a year to train. It can happen that in one edge is a noisy pattern in edges. You can use padding/crop for that. I aimed for perceptual quality without zooming in like 400%. Since RealESRGAN is 4x, I downscaled these images with bicubic. Pretrained: Pretrained_Model_G: RealESRGAN_x4plus_anime_6B.pth / RealESRGAN_x4plus_anime_6B.pth (sudo_RealESRGAN2x_3.332.758_G.pth) |
download |
4xNomos2_otf_esrgan.pth | Compression Removal, JPEG, Realistic, Restoration Phhofm: Restoration, 4x ESRGAN model for photography, trained using the Real-ESRGAN otf degradation pipeline. |
download |
4xNomosWebPhoto_esrgan.pth | Realistic, Restoration Phhofm: Restoration, 4x ESRGAN model for photography, trained with realistic noise, lens blur, jpg and webp re-compression. ESRGAN version of 4xNomosWebPhoto_RealPLKSR, trained on the same dataset and in the same way. |
download |
Upscale Model | Info, Type: DAT, Model execution speed: Slow | Download URL |
---|---|---|
4xNomos8kDAT.pth | Anime, Compression Removal, General Upscaler, JPEG, Realistic, Restoration Phhofm: A 4x photo upscaler with otf jpg compression, blur and resize, trained on musl's Nomos8k_sfw dataset for realisic sr, this time based on the DAT arch, as a finetune on the official 4x DAT model. |
download |
4x-DWTP-DS-dat2-v3.pth | Dehalftone, Restoration umzi.x.dead: DAT descreenton model, designed to reduce discrepancies on tiles due to too much loss of the first version, while getting rid of the removal of paper texture |
download |
4xBHI_dat2_real.pth | Compression Removal, JPEG, Realistic Phhofm: 4x dat2 upscaling model for web and realistic images. It handles realistic noise, some realistic blur, and webp and jpg (re)compression. Trained on my BHI dataset (390'035 training tiles) with degraded LR subset. |
download |
4xBHI_dat2_otf.pth | Compression Removal, JPEG Phhofm: 4x dat2 upscaling model, trained with the real-esrgan otf pipeline on my bhi dataset. Handles noise and compression. |
download |
4xBHI_dat2_multiblur.pth | Phhofm: the 4xBHI_dat2_multiblur checkpoint (trained to 250000 iters), which cannot handle compression but might give just slightly better output on non-degraded input. | download |
4xBHI_dat2_multiblurjpg.pth | Compression Removal, JPEG Phhofm: 4x dat2 upscaling model, trained with down_up,linear, cubic_mitchell, lanczos, gauss and box scaling algos, some average, gaussian and anisotropic blurs and jpg compression. Trained on my BHI sisr dataset. |
download |
4x_IllustrationJaNai_V1_DAT2_190k.pth | Anime, Cartoon, Compression Removal, Dehalftone, General Upscaler, JPEG, Manga, Restoration the-database: Model for color images including manga covers and color illustrations, digital art, visual novel art, artbooks, and more. DAT2 version is the highest quality version but also the slowest. See the ESRGAN version for faster performance. |
download |
4x-PBRify_UpscalerDAT2_V1.pth | Compression Removal, DDS, Game Textures, Restoration Kim2091: Yet another model in the PBRify_Remix series. This is a new upscaler to replace the previous 4x-PBRify_UpscalerSIR-M_V2 model. This model far exceeds the quality of the previous, with far more natural detail generation and better reconstruction of lines and edges. |
download |
4xBHI_dat2_otf_nn.pth | Compression Removal, JPEG Phhofm: 4x dat2 upscaling model, trained with the real-esrgan otf pipeline but without noise, on my bhi dataset. Handles resizes, and jpg compression. |
download |
Upscale Model | Info, Type: HAT, Model execution speed: Slow | Download URL |
---|---|---|
4xNomos8kSCHAT-L.pth | Anime, Compression Removal, General Upscaler, JPEG, Realistic, Restoration Phhofm: 4x photo upscaler with otf jpg compression and blur, trained on musl's Nomos8k_sfw dataset for realisic sr. Since this is a big model, upscaling might take a while. |
download |
4xNomos8kSCHAT-S.pth | Anime, Compression Removal, General Upscaler, JPEG, Realistic, Restoration Phhofm: 4x photo upscaler with otf jpg compression and blur, trained on musl's Nomos8k_sfw dataset for realisic sr. HAT-S version/model. |
download |
4xNomos8kHAT-L_otf.pth | Faces, General Upscaler, Realistic, Restoration Phhofm: 4x photo upscaler trained with otf, handles some jpg compression, some blur and some noise. |
download |
4xBHI_small_hat-l.pth | Phhofm: 4x hat-l upscaling model for good quality input. This model does not handle any degradations. This model is rather soft, I tried to balance sharpness and faithfulness/non-artifacts. For a bit sharper output, but can generate a bit of artifacts, you can try the 4xBHI_small_hat-l_sharp version, also included in this release, which might still feel soft if you are used to sharper outputs. |
download |
Upscale Model | Info, Type: RealPLKSR_dysample, Model execution speed: Normal | Download URL |
---|---|---|
4xHFA2k_ludvae_realplksr_dysample.pth | Anime, Compression Removal, Restoration Phhofm: A Dysample RealPLKSR 4x upscaling model for anime single-image resolution. |
download |
4xArtFaces_realplksr_dysample.pth | ArtFaces Phhofm: A Dysample RealPLKSR 4x upscaling model for art / painted faces. |
download |
4x-PBRify_RPLKSRd_V3.pth | Compression Removal, DDS, Debanding, Dedither, Dehalo, Game Textures, Restoration Kim2091: This update brings a new upscaling model, 4x-PBRify_RPLKSRd_V3. This model is roughly 8x faster than the current DAT2 model, while being higher quality. It produces far more natural detail, resolves lines and edges more smoothly, and cleans up compression artifacts better. As a result of those improvements, PBR is also much improved. It tends to be clearer with less defined artifacts. |
download |
4xNomos2_realplksr_dysample.pth | Compression Removal, JPEG, Realistic, Restoration Phhofm: A Dysample RealPLKSR 4x upscaling model that was trained with / handles jpg compression down to 70 on the Nomosv2 dataset, preserves DoF. This model affects / saturate colors, which can be counteracted a bit by using wavelet color fix, as used in these examples. |
download |
Upscale Model | Info, Type: RealPLKSR, Model execution speed: Normal | Download URL |
---|---|---|
2x-AnimeSharpV2_RPLKSR_Sharp.pth | Anime, Compression Removal, Restoration Kim2091: This is my first anime model in years. Hopefully you guys can find a good use-case for it. RealPLKSR (Higher quality, slower) Sharp: For heavily degraded sources. Sharp models have issues depth of field but are best at removing artifacts |
download |
2x-AnimeSharpV2_RPLKSR_Soft.pth | Anime, Compression Removal, Restoration Kim2091: This is my first anime model in years. Hopefully you guys can find a good use-case for it. RealPLKSR (Higher quality, slower) Soft: For cleaner sources. Soft models preserve depth of field but may not remove other artifacts as well |
download |
4xPurePhoto-RealPLSKR.pth | AI Generated, Compression Removal, JPEG, Realistic, Restoration asterixcool: Skilled in working with cats, hair, parties, and creating clear images. Also proficient in resizing photos and enlarging large, sharp images. Can effectively improve images from small sizes as well (300px at smallest on one side, depending on the subject). Experienced in experimenting with techniques like upscaling with this model twice and then reducing it by 50% to enhance details, especially in features like hair or animals. |
download |
2x_Text2HD_v.1-RealPLKSR.pth | Compression Removal, Denoise, General Upscaler, JPEG, Restoration, Text asterixcool: The upscale model is specifically designed to enhance lower-quality text images, improving their clarity and readability by upscaling them by 2x. It excels at processing moderately sized text, effectively transforming it into high-quality, legible scans. However, the model may encounter challenges when dealing with very small text, as its performance is optimized for text of a certain minimum size. For best results, input images should contain text that is not excessively small. |
download |
2xVHS2HD-RealPLKSR.pth | Compression Removal, Dehalo, Realistic, Restoration, Video Frame asterixcool: An advanced VHS recording model designed to enhance video quality by reducing artifacts such as haloing, ghosting, and noise patterns. Optimized primarily for PAL resolution (NTSC might work good as well). |
download |
4xNomosWebPhoto_RealPLKSR.pth | Realistic, Restoration Phhofm: 4x RealPLKSR model for photography, trained with realistic noise, lens blur, jpg and webp re-compression. |
download |
Upscale Model | Info, Type: DRCT, Model execution speed: Slow | Download URL |
---|---|---|
4xNomos2_hq_drct-l.pth | General Upscaler, Realistic Phhofm: An drct-l 4x upscaling model, similiar to the 4xNomos2_hq_atd, 4xNomos2_hq_dat2 and 4xNomos2_hq_mosr models, trained and for usage on non-degraded input to give good quality output. |
download |
Upscale Model | Info, Type: ATD, Model execution speed: Slow | Download URL |
---|---|---|
4xNomos2_hq_atd.pth | General Upscaler, Realistic Phhofm: An atd 4x upscaling model, similiar to the 4xNomos2_hq_dat2 or 4xNomos2_hq_mosr models, trained and for usage on non-degraded input to give good quality output. |
download |
Upscale Model | Info, Type: MoSR, Model execution speed: Normal | Download URL |
---|---|---|
4xNomos2_hq_mosr.pth | General Upscaler, Realistic Phhofm: A 4x MoSR upscaling model, meant for non-degraded input, since this model was trained on non-degraded input to give good quality output. |
download |
2x-AnimeSharpV2_MoSR_Sharp.pth | Anime, Compression Removal, Restoration Kim2091: This is my first anime model in years. Hopefully you guys can find a good use-case for it. MoSR (Lower quality, faster), Sharp: For heavily degraded sources. Sharp models have issues depth of field but are best at removing artifacts |
download |
2x-AnimeSharpV2_MoSR_Soft.pth | Anime, Compression Removal, Restoration Kim2091: This is my first anime model in years. Hopefully you guys can find a good use-case for it. MoSR (Lower quality, faster), Soft: For cleaner sources. Soft models preserve depth of field but may not remove other artifacts as well |
download |
Upscale Model Name | Info, Type: SRFormer, Model execution speed: Slow | Download URL |
---|---|---|
4xNomos8kSCSRFormer.pth | Anime, Compression Removal, General Upscaler, JPEG, Realistic, Restoration Phhofm: 4x photo upscaler with otf jpg compression and blur, trained on musl's Nomos8k_sfw dataset for realisic sr. |
download |
4xFrankendataFullDegradation_SRFormer460K_g.pth | Compression Removal, Denoise, Realistic, Restoration Crustaceous D: 4x realistic upscaler that may also work for general purpose usage. It was trained with OTF random degradation with a very low to very high range of degradations, including blur, noise, and compression. Trained with the same Frankendata dataset that I used for the pretrain model. |
download |
4xFrankendataPretrainer_SRFormer400K_g.pth | Realistic, Restoration Crustaceous D: 4x realistic upscaler that may also work for general purpose usage. It was trained with OTF random degradation with a very low to very high range of degradations, including blur, noise, and compression. Trained with the same Frankendata dataset that I used for the pretrain model. |
download |
1xFrankenfixer_SRFormerLight_g.pth | Realistic, Restoration Crustaceous D: A 1x model designed to reduce artifacts and restore detail to images upscaled by 4xFrankendata_FullDegradation_SRFormer. It could possibly work with other upscaling models too. |
download |