Overview
Real-ESRGAN provides several models optimized for general real-world images, including photos, screenshots, and natural scenes. This guide covers model selection and best practices for general image super-resolution.
Recommended Models
RealESRGAN_x4plus (Primary)
The default and most versatile model for general images.
Download Model
Basic Usage
With Face Enhancement
wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth -P weights
Specifications:
Upscale Factor : 4x
Architecture : RRDBNet (23 blocks)
Model Size : ~64MB
Best For : Photos, natural images, general scenes
realesr-general-x4v3 (Denoise Control)
A smaller, faster model with controllable denoising strength.
Download Models
Weak Denoise (Keep Texture)
Balanced
Strong Denoise (Smooth)
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
Specifications:
Upscale Factor : 4x
Architecture : SRVGGNetCompact (32 conv layers)
Model Size : ~17MB (much smaller than x4plus)
Best For : Images where you want to control noise vs. detail trade-off
Denoise Strength : 0 (keep noise/texture) to 1 (strong denoise)
The realesr-general-x4v3 model requires both the base model and the denoise model (wdn) for the -dn option to work.
RealESRGAN_x2plus (2x Upscaling)
For moderate upscaling when 4x is too aggressive.
wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth -P weights
Specifications:
Upscale Factor : 2x
Architecture : RRDBNet (23 blocks)
Best For : Images that need moderate enhancement
RealESRNet_x4plus (No GAN)
ESRGAN model without GAN training - produces smoother results.
wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.1/RealESRNet_x4plus.pth -P weights
Specifications:
Upscale Factor : 4x
Architecture : RRDBNet (23 blocks)
Best For : When you want smoother results without GAN artifacts
Model Comparison
Use Case Recommended Model Notes General photos RealESRGAN_x4plusBest overall quality Photos with faces RealESRGAN_x4plus + --face_enhanceCombines super-resolution with GFPGAN Noisy images realesr-general-x4v3 with high --denoise_strengthControl noise reduction Textured images realesr-general-x4v3 with low --denoise_strengthPreserve texture details Quick processing realesr-general-x4v3Smaller, faster model Moderate upscaling RealESRGAN_x2plus2x instead of 4x Smooth results RealESRNet_x4plusNo GAN artifacts
Model Size Speed Quality realesr-general-x4v3~17MB Fast Good RealESRGAN_x2plus~64MB Medium Very Good RealESRGAN_x4plus~64MB Medium Excellent RealESRNet_x4plus~64MB Medium Excellent (smooth)
Common Usage Patterns
Standard Workflow
Prepare Images
Place your images in the inputs folder: mkdir -p inputs
cp /path/to/your/images/ * inputs/
Run Inference
Process with the appropriate model: python inference_realesrgan.py -n RealESRGAN_x4plus -i inputs -o results
Check Results
Enhanced images are saved in the results folder with the _out suffix.
Advanced Examples
Custom Scale
With Tiling (Large Images)
PNG Output
Custom Suffix
Full Precision
# Upscale to exactly 3.5x
python inference_realesrgan.py -n RealESRGAN_x4plus -i input.jpg --outscale 3.5
Tips for Best Results
CUDA Out of Memory For high-resolution images, use the --tile option: python inference_realesrgan.py -n RealESRGAN_x4plus -i large_image.jpg --tile 400
Smaller tile sizes use less memory but may introduce slight artifacts at tile boundaries.
Denoise Strength Guidelines When using realesr-general-x4v3:
0.0-0.3 : Preserve original texture and noise (good for film grain)
0.4-0.6 : Balanced (default is 0.5)
0.7-1.0 : Strong noise reduction (good for compressed images)
Arbitrary Output Scale Use --outscale for any target size: # Exactly 1.5x
python inference_realesrgan.py -n RealESRGAN_x4plus -i input.jpg --outscale 1.5
# Exactly 10x
python inference_realesrgan.py -n RealESRGAN_x4plus -i input.jpg --outscale 10
The model upscales to its native scale (e.g., 4x), then resizes to your target using LANCZOS4.
Batch Processing
Process entire folders efficiently:
# Process all images in a folder
python inference_realesrgan.py -n RealESRGAN_x4plus -i input_folder -o output_folder
# With custom settings
python inference_realesrgan.py -n RealESRGAN_x4plus -i input_folder -o output_folder \
--outscale 4 --tile 400 --ext png
The script automatically processes all supported images in the input folder.
Special Image Types
RGBA Images (With Transparency)
Real-ESRGAN automatically handles alpha channels:
python inference_realesrgan.py -n RealESRGAN_x4plus -i image_with_alpha.png
Alpha channels are upsampled using the method specified by --alpha_upsampler (default: realesrgan)
Output is always saved as PNG to preserve transparency
Grayscale Images
Grayscale images are supported natively:
python inference_realesrgan.py -n RealESRGAN_x4plus -i grayscale.jpg
16-bit Images
High bit-depth images are automatically handled:
python inference_realesrgan.py -n RealESRGAN_x4plus -i 16bit_image.png
Multi-GPU Usage
Specify GPU device:
# Use GPU 0
python inference_realesrgan.py -n RealESRGAN_x4plus -i input.jpg --gpu-id 0
# Use GPU 1
python inference_realesrgan.py -n RealESRGAN_x4plus -i input.jpg --gpu-id 1
Memory Management
Low Memory
Balanced
High Memory
# Use smaller tiles and general model
python inference_realesrgan.py -n realesr-general-x4v3 -i input.jpg --tile 256
# Default settings with moderate tiling
python inference_realesrgan.py -n RealESRGAN_x4plus -i input.jpg --tile 400
# No tiling for best quality (requires sufficient VRAM)
python inference_realesrgan.py -n RealESRGAN_x4plus -i input.jpg
Next Steps
Face Enhancement Enhance faces in your photos with GFPGAN integration
Anime Images Learn about specialized models for anime content