Skip to main content
Real-ESRGAN provides specialized models for anime content, trained specifically to handle the unique characteristics of anime artwork, manga, and illustrations.

RealESRGAN_x4plus_anime_6B

This model is optimized specifically for anime images with a smaller network architecture (6 RRDB blocks) for efficient processing while maintaining high quality.

Model Specifications

PropertyValue
Scale4x
ArchitectureRRDBNet
RRDB Blocks6 (vs 23 in general model)
Features64
Growth Channels32
OptimizationAnime-specific training data
DownloadRealESRGAN_x4plus_anime_6B.pth

Key Features

Anime-Optimized

Trained specifically on anime images for better line preservation and color handling

Compact Network

Only 6 RRDB blocks (vs 23 in general model) for faster processing

Sharp Lines

Preserves crisp anime line art without over-smoothing

Vibrant Colors

Maintains anime color characteristics and gradients

Usage

PyTorch Inference

# Download the 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

NCNN (Portable Executable)

For Windows, Linux, or MacOS without Python installation:
1

Download NCNN Executable

Download the portable executable for your platform:
2

Extract and Run

# Windows
./realesrgan-ncnn-vulkan.exe -i input.jpg -o output.png -n realesrgan-x4plus-anime

# Linux/MacOS
./realesrgan-ncnn-vulkan -i input.jpg -o output.png -n realesrgan-x4plus-anime

Comparisons with waifu2x

Real-ESRGAN anime model provides significant improvements over waifu2x, especially in detail preservation and artifact reduction.
Comparison with waifu2x using -n 2 -s 4 settings

Visual Comparison Examples

Anime comparison 1 Anime comparison 2 Anime comparison 3 Anime comparison 4 Anime comparison 5

Advantages Over waifu2x

Better Detail Recovery

Recovers fine details in hair, clothing textures, and background elements

Reduced Artifacts

Fewer compression artifacts and smoother gradients

Line Preservation

Maintains crisp line art without introducing halos or blur

Color Accuracy

Better preservation of original anime color characteristics

Best Practices

For Anime Images

The anime model excels at preserving clean line art:
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i manga_pages
Works great for colored anime artwork:
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i anime_art
Ideal for upscaling anime screenshots:
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i screenshots
Use tiling for large manga pages or illustrations:
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i inputs -t 512

Command Options

# Basic usage
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i inputs -o outputs

# With tiling (for large images)
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i inputs -t 512

# Custom output scale (2x instead of 4x)
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i inputs -s 2

# Save as PNG
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i inputs --ext png

Model Architecture Comparison

Anime vs General Model

FeatureRealESRGAN_x4plus_anime_6BRealESRGAN_x4plus
RRDB Blocks623
ParametersFewerMore
SpeedFasterSlower
Memory UsageLowerHigher
Training DataAnime-specificGeneral images
Best ForAnime, manga, illustrationsNatural photos
The anime model’s smaller architecture (6 blocks) makes it approximately 3-4x faster than the general model while maintaining high quality for anime content.

Discriminator Model

If you need to fine-tune the anime model on your own dataset:
PropertyValue
DiscriminatorRealESRGAN_x4plus_anime_6B_netD.pth
Corresponding GeneratorRealESRGAN_x4plus_anime_6B
This discriminator model is used during GAN training and is not needed for inference.

Performance Tips

Batch Processing

Process multiple images efficiently:
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i input_folder

GPU Memory

Use tiling for large images:
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i inputs -t 400

Custom Scale

Output at different scales:
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i inputs -s 2

Format Control

Control output format:
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i inputs --ext png

Next Steps

Video Models

Learn about anime video upscaling

General Models

Explore models for natural images

Build docs developers (and LLMs) love