How to Use Real-ESRGAN: x2, x4 and Anime Models Explained

Real-ESRGAN is a free, open-source AI upscaler. Most people searching for it want one of three things: which model to download, how to run it, or a way to skip the install. This guide covers all three, with the real commands and an honest look at where it works and where it does not.

What Real-ESRGAN Is

Real-ESRGAN comes from Xintao Wang and colleagues at Tencent ARC Lab, and the paper is called "Training Real-World Blind Super-Resolution with Pure Synthetic Data" (2021). The idea is simple. The model was trained on clean images that were deliberately damaged with blur, noise and JPEG compression, so it learned to repair the kind of damage real photos actually have. That is why it handles a compressed image from a chat app better than older upscalers that assumed a clean source.

It is also not one model. The project ships several, and picking the wrong one is a reason a photo can come back with the wrong texture.

Which Real-ESRGAN Model Should You Pick?

ModelScaleMade forNote
RealESRGAN_x4plus4xPhotos and general imagesThe default. Start here.
RealESRGAN_x2plus2xPhotos that are already fairly largeA gentler step when 4x is more than you need.
RealESRGAN_x4plus_anime_6B4xAnime and drawn illustrationsA smaller model tuned for line art and flat colour.
realesr-animevideov32x to 4xAnimation videoA small, fast model for anime frames.
realesr-general-x4v34xGeneral scenes on modest hardwareA tiny model with a -dn option to trade smoothing against noise.

The scale is the factor applied to width and height. A x4 model turns a 1000×750 photo into 4000×3000, and a 1920×1080 frame into 7680×4320. Use x2 when the image is already big. Upscaling by more than you need costs time and gives the model more room to invent texture.

Option 1: The Portable App (No Python)

This is the easiest local route. The project publishes a portable build for Windows, Linux and macOS that works on Intel, AMD and Nvidia GPUs. It bundles the binaries and models, so you do not need CUDA or PyTorch.

  1. Download the build for your system from the official releases page and unzip it.
  2. Open a terminal in that folder.
  3. Run the upscale with the model name you picked:
./realesrgan-ncnn-vulkan -i input.jpg -o output.png -n realesrgan-x4plus

On Windows the file is realesrgan-ncnn-vulkan.exe. Useful options are -s for the scale (2, 3 or 4), -t for tile size, and -f for the output format. You can also point -i at a folder to process every image in it. Model names for this build are realesrgan-x4plus, realesrnet-x4plus, realesrgan-x4plus-anime and realesr-animevideov3.

One caveat from the project itself: this build crops the image into tiles, processes them separately and stitches them back, so you can sometimes see faint seams, and results differ slightly from the Python version.

Option 2: The Python Script

The Python route gives you every option, including arbitrary output sizes and face enhancement. The upstream README lists Python 3.7 and PyTorch 1.7 as minimums. Those are historical requirements, not a promise that every newer combination works. Use a separate environment and check the project issues for dependency errors. [1]

  1. Clone the repository and move into it.
  2. Install the dependencies.
  3. Put a test image in the inputs folder. The script downloads missing official weights on its first run. [2]
  4. Run the inference script.
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

python inference_realesrgan.py -n RealESRGAN_x4plus -i inputs --outscale 3.5

Results land in a results folder. The script accepts images with an alpha channel, grayscale images and 16-bit images.

The Settings That Change the Result

  • --outscale (Python). Runs the selected checkpoint at its native scale, then resizes to the factor you give using Lanczos interpolation. For x4plus that means a x4 pass followed by resizing, not a model trained specifically for 3.5x. [1]
  • --tile (-t). Splits the image into pieces so a large file fits in GPU memory. If you hit an out-of-memory error, set a tile size such as 400 or lower. Smaller tiles use less memory and raise the chance of visible seams.
  • --face_enhance. Adds a face restoration pass (GFPGAN) for portraits. It can fix soft faces. It can also change how a face looks, so compare against the original before you keep it.
  • -dn (general-x4v3 only). Sets denoising strength. Lower values keep more grain and texture. Higher values smooth more.
  • --fp32. Uses full precision instead of half. Slower and heavier on memory, and only worth trying if half precision gives black or broken output on your GPU.

Where Real-ESRGAN Falls Short

It is a good model, and it is also a few years old. In practice you will run into these limits:

  • Heavy damage. It repairs blur and compression, but it cannot rebuild detail that is gone. A very small or very noisy file comes back smoother, not richer.
  • Text and logos. Letters can soften or warp. A model that holds edges hard is a better fit for screenshots, packaging and anything with small type.
  • Video. It works on single frames, so video means extracting frames, upscaling them and putting the clip back together. The animation model helps for anime, and live footage needs more care to avoid flicker between frames.
  • Your hardware. A x4 pass on a large image can run out of memory on a small GPU, and the CPU route is slow.

Option 3: Run the Job Online on UpRes

If you have one image to fix and no wish to install anything, a browser tool is faster. UpRes does not offer Real-ESRGAN itself. Its picker has models chosen by job, and for an everyday photo that is Flare, which upscales up to 4x and is the fast default.

  1. Open the free demo. It needs no account and the result is watermarked. Files up to 10 MB are accepted.
  2. Upload a photo and run the demo. In the signed-in app, choose Flare for photos, Prism for text and products, Lumen for print work, or Mirage for generated detail.
  3. Run it and check the result at full size, not zoomed out.
  4. For more runs, create a free account and upload your original in the app. The free plan gives 5 upscales a month with no credit card. See pricing for the paid plans.

Local Real-ESRGAN vs UpRes

Real-ESRGAN, localUpRes, online
CostFree, open sourceFree plan, paid plans for more
SetupDownload an app, or install Python and PyTorchOpen a web page
HardwareYour own GPUCloud GPU, nothing on your machine
Largest output you controlAny size your memory allows, using tilesUp to 8K
Model choiceThe Real-ESRGAN family and anything you add yourselfFlare, Prism, Lumen, Mirage and others, picked by job
Batch and automationScriptable, you build itBatch upload and an API
PrivacyFiles never leave your machineFiles are uploaded to process them

Which One Should You Use?

Run Real-ESRGAN yourself if you enjoy the tooling, want to script your own pipeline, need files to stay on your machine, or want to fine-tune the model on your own data. It is free and it is good at what it does.

Use an online tool if you have a handful of images, no suitable GPU, or a result that matters more than the process. If you are not sure, try one image both ways. The free demo takes a minute and shows whether the difference matters for your files. For the wider question of how upscaling works, read how to upscale images without losing quality, and for a comparison against another tool built on Real-ESRGAN, see UpRes vs Upscayl.

Frequently Asked Questions

What is the difference between Real-ESRGAN x2 and x4?

The number is the scale factor. A x2 model doubles width and height, so 1920×1080 becomes 3840×2160. A x4 model quadruples them, so 1920×1080 becomes 7680×4320. The x4 model is the default in the Python script. Pick x2 when the image is already large or you only need a modest bump.

Can Real-ESRGAN upscale to an arbitrary size like 3x?

Yes, with the Python script. With a x4 checkpoint, the --outscale option runs that model and then resizes the result to the factor you ask for, for example 3.5. The portable app takes a scale of 2, 3 or 4 with -s, and it does not support every option the Python script does.

Do I need a GPU to run Real-ESRGAN?

The portable app needs a GPU that supports Vulkan (Intel, AMD or Nvidia) but no CUDA or PyTorch install. The Python route is built on PyTorch and is far more practical with a GPU. If you have neither, running the job in a browser on a cloud GPU avoids the setup.

Which Real-ESRGAN model is best for anime and illustrations?

RealESRGAN_x4plus_anime_6B is the image model tuned for anime and drawn art, and realesr-animevideov3 is the small model for animation video. For photos, use RealESRGAN_x4plus instead.

Is Real-ESRGAN available on UpRes?

No. UpRes does not list Real-ESRGAN in its model picker. For everyday photos use Flare, for text and products Prism, for print Lumen, and for generated detail Mirage. The free plan includes 5 upscales a month with no credit card.

Sources

  1. Real-ESRGAN official README: model names, portable downloads, installation and inference options.
  2. Official inference script: checkpoint scales, weight downloads and denoising controls.

Related Reading

Free tier available

Try one photo free. No install, no account for the demo.

5 free upscales per month. Creator from $9/mo. No watermarks on paid plans.