realesrgan
Real-ESRGAN aims at developing Practical Algorithms for General Image Restoration
What it is and what it does
Real-ESRGAN is a practical image and video restoration tool that enlarges low-resolution content using deep neural networks. It extends ESRGAN with models trained purely on synthetic data, making it robust to real-world degradation without requiring paired high/low-resolution training data. The package includes general-purpose upscaling models and specialized anime video models, plus integration with GFPGAN for face enhancement.
You use it by instantiating an upsampler with a chosen model and calling enhance() on input images or frames. It handles grayscale, 16-bit, and alpha-channel images, supports arbitrary output scales via LANCZOS4 resizing, and offers a tile option for processing large images. The package depends on torch, torchvision, basicsr, gfpgan, facexlib, numpy, opencv-python, Pillow, and tqdm.
Use it for:
- Upscale low-resolution photographs or screenshots by 2x to 4x without training custom models.
- Restore anime images and videos using the specialized anime models.
- Enhance faces in portraits or video frames by combining Real-ESRGAN with integrated GFPGAN.
- Process archived or degraded video footage frame-by-frame to improve visual quality.
- Batch upscale images with tile mode to handle memory constraints on large files.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Real-ESRGAN upscales images and videos using deep learning models trained on synthetic data, with specialized support for anime content and face enhancement through integrated GFPGAN.
Yes, if you need practical image or video upscaling. Real-ESRGAN is well-established with no known vulnerabilities, permissively licensed, and requires only standard Python dependencies. The dormant maintenance status is not a blocker—the package is feature-complete and stable. Install it if you have a GPU or can tolerate CPU inference; expect to download model weights on first use.
Install
realesrgan on PyPI
pip
pip install realesrganuv
uv add realesrganpoetry
poetry add realesrganInstalling realesrgan
Before you install
Low friction: pure Python wheel with no compiled dependencies. Maintenance is dormant (last commit 2024-08-06, 1424 days since release), but the repo remains active with no known vulnerabilities. Nine runtime dependencies include torch, torchvision, and opencv-python, which are substantial but standard for computer vision work.
License in practice
BSD-3-Clause is permissive: you can use, modify, and distribute this package freely in commercial or private projects, provided you include the license notice and disclaim liability.
Quickstart
pip install realesrgan
from realesrgan import RealESRGANer
upsampler = RealESRGANer(scale=4, model_name='RealESRGAN_x4plus')
output, _ = upsampler.enhance(input_img, outscale=4)
Requires PyTorch >= 1.7; model weights are downloaded on first use and can be several hundred MB.
Verify before relying
- Whether pre-trained model weights are automatically cached or must be manually downloaded.
- Exact memory and disk requirements for different model variants (x2plus, x4plus, anime_6B, etc.).
- Performance characteristics (inference time, VRAM usage) on typical hardware.
- Supported input and output formats beyond what the fact sheet explicitly documents.
Package facts
| License | BSD-3-Clause License (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 9 — basicsr, facexlib, gfpgan, numpy, opencv-python, Pillow, torch, torchvision, tqdm |
| Maintenance | dormant — 1,424 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 184,216/month — #10,043 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: realesrgan-0.3.0-py3-none-any.whl
Keywords: computer vision, pytorch, image restoration, super-resolution, esrgan, real-esrgan
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
basicsrBasicSR is a PyTorch-based toolbox for image…
permissive · top 15,000 on PyPI
gfpganGFPGAN restores and enhances degraded faces in…
permissive · top 15,000 on PyPI
rembgRemoves image backgrounds using deep learning…
permissive · top 5,000 on PyPI
ncnnncnn is a neural network inference framework…
permissive · top 15,000 on PyPI
resize-rightResizes images or tensors in NumPy or PyTorch…
permissive · top 15,000 on PyPI
facexlibFacexlib provides a collection of PyTorch-based…
permissive · top 5,000 on PyPI
icevisionIceVision provides a unified framework for…
permissive · top 15,000 on PyPI
segmentation-models-pytorchProvides PyTorch-based neural network models…
permissive · top 15,000 on PyPI
nvidia-modeloptApplies state-of-the-art model optimization…
permissive · top 15,000 on PyPI
runwareClient library for the Runware inference API,…
permissive · top 5,000 on PyPI