Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

Real-ESRGAN

> 编程语言
Open source

Real-ESRGAN aims at developing Practical Algorithms for General Image/Video Restoration.

36.4K stars0 likes4 views
WebsiteGitHub

About

Real-ESRGAN aims at developing Practical Algorithms for General Image/Video Restoration.

🔥 AnimeVideo-v3 model (动漫视频小模型). Please see [anime video models] and [comparisons]
🔥 RealESRGAN_x4plus_anime_6B for anime images (动漫插图模型). Please see [anime_model]

  1. :boom: Update online Replicate demo:
  2. Online Colab demo for Real-ESRGAN: | Online Colab demo for for Real-ESRGAN (anime videos):
  3. Portable Windows / Linux / MacOS executable files for Intel/AMD/Nvidia GPU. You can find more information here. The ncnn implementation is in Real-ESRGAN-ncnn-vulkan

Real-ESRGAN aims at developing Practical Algorithms for General Image/Video Restoration.
We extend the powerful ESRGAN to a practical restoration application (namely, Real-ESRGAN), which is trained with pure synthetic data.

🌌 Thanks for your valuable feedbacks/suggestions. All the feedbacks are updated in feedback.md.


If Real-ESRGAN is helpful, please help to ⭐ this repo or recommend it to your friends 😊
Other recommended projects:
▶️ GFPGAN: A practical algorithm for real-world face restoration
▶️ BasicSR: An open-source image and video restoration toolbox
▶️ facexlib: A collection that provides useful face-relation functions.
▶️ HandyView: A PyQt5-based image viewer that is handy for view and comparison
▶️ HandyFigure: Open source of paper figures


📖 Real-ESRGAN: Training Real-World Blind Super-Resolution with Pure Synthetic Data

[Paper]   [YouTube Video]   [B站讲解]   [Poster]   [PPT slides]
Xintao Wang, Liangbin Xie, Chao Dong, Ying Shan
Tencent ARC Lab; Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences


🚩 Updates

  • ✅ Add the realesr-general-x4v3 model - a tiny small model for general scenes. It also supports the -dn option to balance the noise (avoiding over-smooth results). -dn is short for denoising strength.
  • ✅ Update the RealESRGAN AnimeVideo-v3 model. Please see anime video models and comparisons for more details.
  • ✅ Add small models for anime videos. More details are in anime video models.
  • ✅ Add the ncnn implementation Real-ESRGAN-ncnn-vulkan.
  • ✅ 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
  • ✅ Support finetuning on your own data or paired data (i.e., finetuning ESRGAN). See here
  • ✅ Integrate GFPGAN to support face enhancement.
  • ✅ Integrated to Huggingface Spaces with Gradio. See Gradio Web Demo. Thanks @AK391
  • ✅ Support arbitrary scale with --outscale (It actually further resizes outputs with LANCZOS4). Add RealESRGAN_x2plus.pth model.
  • ✅ The inference code supports: 1) tile options; 2) images with alpha channel; 3) gray images; 4) 16-bit images.
  • ✅ The training codes have been released. A detailed guide can be found in Training.md.

👀 Demos Videos

Bilibili

  • 大闹天宫片段
  • Anime dance cut 动漫魔性舞蹈
  • 海贼王片段

YouTube

🔧 Dependencies and Installation

  • Python >= 3.7 (Recommend to use Anaconda or Miniconda)
  • PyTorch >= 1.7

Installation

  1. Clone repo

    bash
    git clone https://github.com/xinntao/Real-ESRGAN.git
    cd Real-ESRGAN
  2. Install dependent packages

    bash
    # Install basicsr - https://github.com/xinntao/BasicSR
    # We use BasicSR for both training and inference
    pip install basicsr
    # facexlib and gfpgan are for face enhancement
    pip install facexlib
    pip install gfpgan
    pip install -r requirements.txt
    python setup.py develop

⚡ Quick Inference

There are usually three ways to inference Real-ESRGAN.

  1. Online inference
  2. Portable executable files (NCNN)
  3. Python script

Online inference

  1. You can try in our website: ARC Demo (now only support RealESRGAN_x4plus_anime_6B)
  2. Colab Demo for Real-ESRGAN | Colab Demo for Real-ESRGAN (anime videos).

Portable executable files (NCNN)

You can download Windows / Linux / MacOS executable files for Intel/AMD/Nvidia GPU.

This executable file is portable and includes all the binaries and models required. No CUDA or PyTorch environment is needed.

You can simply run the following command (the Windows example, more information is in the README.md of each executable files):

bash
./realesrgan-ncnn-vulkan.exe -i input.jpg -o output.png -n model_name

We have provided five models:

  1. realesrgan-x4plus (default)
  2. realesrnet-x4plus
  3. realesrgan-x4plus-anime (optimized for anime images, small model size)
  4. realesr-animevideov3 (animation video)

You can use the -n argument for other models, for example, ./realesrgan-ncnn-vulkan.exe -i input.jpg -o output.png -n realesrnet-x4plus

Usage of portable executable files

  1. Please refer to Real-ESRGAN-ncnn-vulkan for more details.
  2. Note that it does not support all the functions (such as outscale) as the python script inference_realesrgan.py.
…

Note that it may introduce block inconsistency (and also generate slightly different results from the PyTorch implementation), because this executable file first crops the input image into several tiles, and then processes them separately, finally stitches together.

Python script

Usage of python script

  1. You can use X4 model for arbitrary output size with the argument outscale. The program will further perform cheap resize operation after the Real-ESRGAN output.
…

Inference general images

Download pre-trained models: RealESRGAN_x4plus.pth

bash
wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth -P weights

Inference!

bash
python inference_realesrgan.py -n RealESRGAN_x4plus -i inputs --face_enhance

Results are in the results folder

Inference anime images

Pre-trained models: RealESRGAN_x4plus_anime_6B
More details and comparisons with waifu2x are in anime_model.md

bash
# download model
wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.2.4/RealESRGAN_x4plus_anime_6B.pth -P weights
# inference
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i inputs

Results are in the results folder


BibTeX

@InProceedings{wang2021realesrgan,
    author    = {Xintao Wang and Liangbin Xie and Chao Dong and Ying Shan},
    title     = {Real-ESRGAN: Training Real-World Blind Super-Resolution with Pure Synthetic Data},
    booktitle = {International Conference on Computer Vision Workshops (ICCVW)},
    date      = {2021}
}

📧 Contact

If you have any question, please email [email protected] or [email protected].

🧩 Projects that use Real-ESRGAN

If you develop/use Real-ESRGAN in your projects, welcome to let me know.

  • NCNN-Android: RealSR-NCNN-Android by tumuyan
  • VapourSynth: vs-realesrgan by HolyWu
  • NCNN: Real-ESRGAN-ncnn-vulkan

    GUI

  • Waifu2x-Extension-GUI by AaronFeng753
  • Squirrel-RIFE by Justin62628
  • Real-GUI by scifx
  • Real-ESRGAN_GUI by net2cn
  • Real-ESRGAN-EGUI by WGzeyu
  • anime_upscaler by shangar21
  • Upscayl by Nayam Amarshe and TGS963

🤗 Acknowledgement

Thanks for all the contributors.

  • AK391: Integrate RealESRGAN to Huggingface Spaces with Gradio. See Gradio Web Demo.
  • Asiimoviet: Translate the README.md to Chinese (中文).
  • 2ji3150: Thanks for the detailed and valuable feedbacks/suggestions.
  • Jared-02: Translate the Training.md t

Issues· 649 open

View all issuesOpen on GitHub
  • #677

    License/Terms of RealESRGan checkpoints?

    Updated Sep 27, 2026
  • #1012

    can you provide arm64 realesrgan-ncnn-vulkan?

    Updated Sep 25, 2026
  • #1011

    Verify evals on Papers with Code

    Updated Sep 14, 2026
  • #1004

    Question regarding commercial use of RealESRGANv2-animevideo for freelance work

    Updated Aug 26, 2026
  • #1003

    已经通过ncnn和webassembly实现了浏览器版本

    Updated Jul 18, 2026
  • #1002

    优化文字增强什么时候发布

    Updated Jul 17, 2026
  • #985

    Can someone actually explain how to use?

    Updated May 20, 2026
  • #996

    улучшить пдф

    Updated May 11, 2026
  • #978

    Real-ESRGAN 能否用于视频播放器的实时超分?有没有现成的工作流?(Feasibility of Real-ESRGAN for real-time video super-resolution in players?)

    Updated May 8, 2026
  • #995

    картинка

    Updated Apr 28, 2026

> Tags

Pythonaminedenoiseesrganimage-restoration

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 30, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言