Skip to main content

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

1

Download Model

wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.2.4/RealESRGAN_x4plus_anime_6B.pth -P weights
2

Run Inference

python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i inputs
3

Check Results

Enhanced anime images are saved in the results folder with 4x upscaling.

Usage Examples

Basic Upscaling

python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i anime_image.jpg

Advanced Options

python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i large_anime.png --tile 400

Model Specifications

PropertyValue
ArchitectureRRDBNet with 6 blocks
Upscale Factor4x
Model Size~17MB
Input Channels3 (RGB)
Output Channels3 (RGB)
Feature Channels64
Growth Channels32
Training DataAnime images and illustrations

Comparison with Other Models

FeatureAnime 6Bx4plus General
Anime QualityExcellentGood
General ImagesGoodExcellent
Model Size17MB64MB
SpeedFasterSlower
Best ForAnime/IllustrationsPhotos/Natural images

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 FormatUse 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 ImagesThe 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 RecommendedThe --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 ScaleFor 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

Performance Optimization

Memory Usage

The anime model uses less memory than the general model:
# 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:
1

Download NCNN Executable

Download the appropriate version for your platform:
2

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

This is normal for the anime model as it’s trained to reduce noise. If you want to preserve more texture:
  1. Use the general model instead:
    python inference_realesrgan.py -n RealESRGAN_x4plus -i anime.jpg
    
  2. 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

Build docs developers (and LLMs) love