Cloud AI image upscalers bill per image and ship your files off-box. If that bothers you – privacy, batch jobs, or just not wanting another subscription – run the engine yourself. Real-ESRGAN v0.3.0 (tagged Sep 2022, still Latest on GitHub as of early 2026) is still the local workhorse most people reach for on real photos and anime.
This is a deployment guide, not a feature brochure. Opinion up front: start with the NCNN portable build. Switch to full PyTorch only when you need face enhance, flexible outscale, scripting, multi-GPU, or the tiny general-x4v3 model with denoise.
Pick a Path Before You Touch Python
NCNN portable – zip, extract, one binary. No CUDA toolkit, no venv. Vulkan on Intel / AMD / NVIDIA. Weak spots: mild tile-boundary seams, and it does not match every flag on inference_realesrgan.py (README calls out the block inconsistency and missing parity).
PyTorch / v0.3.0 source – full CLI, --face_enhance, --outscale, -dn denoise on general-x4v3, multi-GPU bits from the v0.3.0 notes. Heavier setup. Python 3.9-3.11 is the sane band; 3.13+ still fights basicsr.
Worth a pause: do you need “pretty enough offline upscale in five minutes,” or a scriptable pipeline you will keep for months? That answer picks the path. Everything below assumes you already know you want local 2-4× work, not another SaaS trial.
System Reality Check (Not Just the README Line)
Official docs only lock Python ≥ 3.7 and PyTorch ≥ 1.7 (Anaconda/Miniconda suggested). Usable speed is stricter.
| Component | Minimum | Recommended |
|---|---|---|
| OS | Windows 10 / modern Linux / macOS | Same + current GPU drivers |
| CPU | x86-64 or Apple Silicon | Modern multi-core |
| RAM | Enough for OS + browser + model load (plan on 8 GB class machines struggling under load) | 16 GB+ |
| GPU / VRAM | None (CPU works, slow); any Vulkan GPU for NCNN | NVIDIA ~4 GB+ VRAM with CUDA torch, or solid Vulkan GPU |
| Disk | Code + one model | Room for several .pth files and big outputs |
| Python / torch | 3.7+ / 1.7+ | 3.9-3.11 + matching CUDA wheel (avoid 3.13+ without patches) |
Community runs put comfortable RealESRGAN_x4plus jobs roughly in the 2-4 GB VRAM band with tiling. No-tile or huge inputs climb fast. NCNN sidesteps CUDA and rides Vulkan instead.
Official Places to Download (Skip Random Mirrors)
- Repo + docs: github.com/xinntao/Real-ESRGAN
- v0.3.0 release notes (general-x4v3,
-dn, video auto-download, multi-GPU): releases/tag/v0.3.0 - Training paper: arXiv:2107.10833
- NCNN Vulkan project: Real-ESRGAN-ncnn-vulkan
Portable binaries the main README still points at (assets under v0.2.5.0 – dated 2022, still the linked builds as of early 2026 docs):
# Windows
https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.5.0/realesrgan-ncnn-vulkan-20220424-windows.zip
# Linux
https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.5.0/realesrgan-ncnn-vulkan-20220424-ubuntu.zip
# macOS
https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.5.0/realesrgan-ncnn-vulkan-20220424-macos.zip
Default photo weights (model zoo / README):
https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth
PyPI also ships pip install realesrgan at package version 0.3.0 if you want the library without cloning – less control over scripts.
Path A – NCNN Portable (Get a File Out Fast)
- Grab the zip for your OS.
- Extract somewhere stable (
C:toolsrealesrganor~/tools/realesrgan). - Terminal in that folder. Drop a small JPG beside the binary.
# Windows
.realesrgan-ncnn-vulkan.exe -i sample.jpg -o sample_x4.png -n realesrgan-x4plus -s 4 -t 400
# Linux / macOS
./realesrgan-ncnn-vulkan -i sample.jpg -o sample_x4.png -n realesrgan-x4plus -s 4 -t 400
Flags worth knowing: -s 2|3|4, -t tile, -g GPU id, -n realesrgan-x4plus-anime or realesr-animevideov3.
The catch is quality parity. NCNN can leave faint seams on hard edges and color can drift vs the PyTorch path. Fine for quick social crops. Critical print work? Move to Path B.
Path B – PyTorch Source Install (v0.3.0 Full CLI)
conda create -n realesrgan python=3.10 -y
conda activate realesrgan
# Install torch FIRST - pick the wheel from https://pytorch.org
# CUDA 11.8 example:
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118
# CPU-only:
# pip install torch torchvision
git clone https://github.com/xinntao/Real-ESRGAN.git
cd Real-ESRGAN
pip install basicsr facexlib gfpgan
pip install -r requirements.txt
python setup.py develop
requirements.txt (official) pins the ecosystem: basicsr≥1.4.2, facexlib≥0.2.5, gfpgan≥1.3.5, numpy, opencv-python, Pillow, torch≥1.7, torchvision, tqdm.
Breakage you will hit on bleeding-edge stacks: KeyError: '__version__' from basicsr/gfpgan get_version(), or missing torchvision.functional_tensor. GitHub issues (#891, #859, #756 and friends) keep repeating the same story. Order matters – torch first, then basicsr stack. Community escape hatch after the rest: pip install basicsr-fixed, or patch the setup.py version exec. Prefer 3.10-3.11; treat 3.13+ as “needs a workaround as of recent reports.”
mkdir -p weights
wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth -P weights
# curl -L <url> -o weights/RealESRGAN_x4plus.pth
Smoke Tests That Actually Mean Something
mkdir -p inputs results
# put a small test shot in inputs/
python inference_realesrgan.py -n RealESRGAN_x4plus -i inputs -o results --tile 400
The command most people run on a real photo:
python inference_realesrgan.py -n RealESRGAN_x4plus -i photo.jpg -o out/ --outscale 4 --tile 400
v0.3.0 tiny general model with denoise – docs bury this: -dn (0-1) only behaves when both base and wdn weights are present:
wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.5.0/realesr-general-x4v3.pth -P weights
wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.5.0/realesr-general-wdn-x4v3.pth -P weights
python inference_realesrgan.py -n realesr-general-x4v3 -i inputs -dn 0.5
Faces (real skin only – FAQ says skip GFPGAN on anime):
python inference_realesrgan.py -n RealESRGAN_x4plus -i portrait.jpg --face_enhance --tile 300
Anime weights when line art matters more than photo grain:
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i cel.png -o results --tile 400
python -c "import realesrgan; print('OK')"
python -c "import torch; print(torch.cuda.is_available(), torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'CPU')"
ls -lh results/
NCNN: progress lines + an output file, no Vulkan device errors. Weird black frames? Try -g 1, update drivers, or abandon ship for PyTorch.
First download can crawl on a slow link. After that the whole loop is offline.
Errors You Will See (Copy-Paste Strings)
CUDA out of memory. Tried to allocate …
FAQ + issues (#184, #314, #861) all say: shrink --tile (try 400, then 200). Here is the ugly edge – tiling does not always save you. Pre-process can still load the full frame to GPU before tiles exist, so monster inputs OOM no matter how small --tile is. Downscale the source first, pre-tile yourself, or bounce to NCNN.
slow_conv2d_cpu / compute_indices_weights_nearest not implemented for ‘Half’
Defaults lean fp16. Add --fp32. Required on pure CPU per the FAQ.
ModuleNotFoundError, basicsr version noise, functional_tensor
Reinstall in order. Then basicsr-fixed if torchvision moved out from under you.
Face enhance wrecks drawings
Turn it off. GFPGAN targets real faces; on anime it burns VRAM and invents skin texture nobody asked for.
Upgrade, Keep Weights, Leave No Trace
v0.3.0 remains the latest tagged release as of early 2026. Refresh a clone with:
cd Real-ESRGAN
git pull
pip install -r requirements.txt --upgrade
python setup.py develop
Weights are dumb .pth files in weights/. Keep them. No DB migration.
conda deactivate
conda env remove -n realesrgan
# or: pip uninstall realesrgan basicsr facexlib gfpgan
rm -rf Real-ESRGAN
# NCNN: delete the extracted folder
FAQ
Is Real-ESRGAN v0.3.0 still worth installing in 2025/2026?
Yes – if you want free, offline 2-4× on photos and anime without a meter running. Heavier diffusion upscalers exist. This one stays light. Hate CLIs? Point a GUI such as Upscayl at the same idea later.
NCNN or PyTorch – what do you actually use day to day?
NCNN for “friend sent a phone pic, need it bigger before dinner.” PyTorch when the folder has fifty frames, I need -dn 0.5 on general-x4v3, or face restore on a real portrait. I keep both installs. Five-minute Vulkan win first; full env when the binary’s seams show up.
How much VRAM, and which tile size?
On a 4 GB NVIDIA card, typical photos survive with --tile 200-400. 8 GB+ is where people start raising tile size or dropping tiles for max quality. The escape hatch is realesr-general-x4v3 (tiny, dual weights if you want -dn). If OOM continues after tiny tiles, stop blaming the flag – the input resolution is the problem. Downscale or use NCNN. Remember the pre-process full-frame load: tile size is necessary, not always sufficient.
Drop one test image next to the NCNN binary – or into inputs/ – and run the smoke command. Sharp larger file out? You own a local AI image upscaler. No account.