Documentation Index Fetch the complete documentation index at: https://mintlify.com/xinntao/Real-ESRGAN/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Real-ESRGAN provides a specialized model optimized for anime images, illustrations, and artwork. The RealESRGAN_x4plus_anime_6B model is significantly smaller than the general model while delivering excellent results for anime content.
RealESRGAN_x4plus_anime_6B Model
Key Features
Optimized for Anime : Trained specifically on anime and illustration data
Smaller Size : Only 6 RRDB blocks vs. 23 blocks in the general model (~17MB vs ~64MB)
Fast Processing : Faster inference due to smaller architecture
High Quality : Preserves anime-style details and aesthetics
Download and Install
Download Model
wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.2.4/RealESRGAN_x4plus_anime_6B.pth -P weights
Run Inference
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i inputs
Check Results
Enhanced anime images are saved in the results folder with 4x upscaling.
Usage Examples
Basic Upscaling
Single Image
Batch Processing
Custom Output Scale
PNG Output
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i anime_image.jpg
Advanced Options
With Tiling (Large Images)
Custom Suffix
FP32 Precision
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i large_anime.png --tile 400
Model Specifications
Property Value Architecture RRDBNet with 6 blocks Upscale Factor 4x Model Size ~17MB Input Channels 3 (RGB) Output Channels 3 (RGB) Feature Channels 64 Growth Channels 32 Training Data Anime images and illustrations
Comparison with Other Models
vs RealESRGAN_x4plus
vs waifu2x
vs realesr-animevideov3
Feature Anime 6B x4plus General Anime Quality Excellent Good General Images Good Excellent Model Size 17MB 64MB Speed Faster Slower Best For Anime/Illustrations Photos/Natural images
Real-ESRGAN anime model provides comparable or better quality than waifu2x with these advantages:
More accurate detail reconstruction
Better handling of compression artifacts
Sharper edges and cleaner lines
Native PyTorch implementation for GPU acceleration
See detailed comparisons in the source documentation . Feature Anime 6B AnimeVideo v3 Image Quality Excellent Very Good Video Quality N/A Excellent Model Size 17MB ~8MB (XS) Best For Static images Video frames
Use RealESRGAN_x4plus_anime_6B for static anime images and realesr-animevideov3 for video processing.
Common Use Cases
Upscaling Anime Screenshots
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i screenshots -o upscaled
Perfect for enhancing low-resolution anime screenshots from streaming services.
Processing Manga Panels
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i manga_pages -o enhanced --ext png
Preserves fine line details in manga artwork.
Enhancing Anime Artwork
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i artwork.jpg --outscale 4 --ext png
Upscale digital artwork and illustrations while maintaining anime aesthetic.
Processing Game Assets
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i game_assets -o enhanced_assets --tile 400
Upscale anime-style game sprites and textures. Use tiling for large textures.
Tips for Best Results
Image Format Use PNG format for anime images when possible to avoid JPEG compression artifacts: python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i input.jpg --ext png
Transparent Images The anime model handles RGBA images with transparency: python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i anime_with_alpha.png
Output is automatically saved as PNG to preserve the alpha channel.
Face Enhancement Not Recommended The --face_enhance option is designed for realistic faces and may not work well with anime faces. It’s recommended to not use face enhancement with anime models: # Don't use --face_enhance with anime images
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i anime.jpg
Choosing Output Scale For anime images:
2x : Moderate enhancement, good for already decent quality
4x : Standard upscaling for most anime content
Higher : Use for very low resolution sources
# For moderate quality anime
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i anime.jpg --outscale 2
# For low quality anime
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i anime.jpg --outscale 4
Memory Usage
The anime model uses less memory than the general model:
Standard Processing
Large Images
# No tiling needed for most images
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i anime.jpg
Batch Processing
Process multiple anime images efficiently:
# Process entire folder
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i anime_collection -o upscaled_collection
# With custom settings
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i anime_collection \
-o upscaled_collection --ext png --suffix enhanced
GPU Selection
Use specific GPU for processing:
# Use GPU 0
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i anime.jpg --gpu-id 0
# Use GPU 1
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i anime.jpg --gpu-id 1
NCNN Executable Alternative
For users who prefer the portable NCNN executable:
Download NCNN Executable
Download the appropriate version for your platform:
Run NCNN Version
./realesrgan-ncnn-vulkan.exe -i anime.jpg -o output.png -n realesrgan-x4plus-anime
The NCNN version doesn’t require CUDA or PyTorch installation.
Troubleshooting
Results look over-smoothed
This is normal for the anime model as it’s trained to reduce noise. If you want to preserve more texture:
Use the general model instead:
python inference_realesrgan.py -n RealESRGAN_x4plus -i anime.jpg
Or use a lower output scale:
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i anime.jpg --outscale 2
Ensure you’re using PNG output for best color preservation: python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i anime.jpg --ext png
Use tiling to reduce memory usage: python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i anime.png --tile 400
Try smaller tile sizes (256, 300) if still encountering issues.
Next Steps
Anime Videos Learn to upscale anime videos with realesr-animevideov3
General Images Explore models for real-world photos
NCNN Executable Use the portable executable without Python