Overview
Real-ESRGAN provides therealesr-animevideov3 model specifically optimized for anime video super-resolution. This lightweight model (XS size) is designed to process video frames efficiently while maintaining temporal consistency.
Quick Start
Model Specifications
realesr-animevideov3
| Property | Value |
|---|---|
| Architecture | SRVGGNetCompact |
| Size | XS (~8MB) |
| Conv Layers | 16 |
| Upscale Factor | 4x (supports 1x, 2x, 3x, 4x) |
| Best For | Anime videos, animation |
| Speed | Fast (optimized for video) |
Video Inference Script
Theinference_realesrgan_video.py script is specifically designed for video processing with additional features:
Basic Usage
Multi-GPU and Multi-Processing
For faster processing, use multiple GPUs and processes:The total number of processes = number of GPUs ×
num_process_per_gpuMulti-processing helps improve GPU utilization as video processing is often bottlenecked by I/O operations.Command-Line Arguments
Video-Specific Options
Input video file, image, or folder of frames
Model to use. Options:
realesr-animevideov3(recommended for anime videos)RealESRGAN_x4plus_anime_6BRealESRGAN_x4plus- Other image models
Output folder for the enhanced video
Final upsampling scale (1, 2, 3, or 4 recommended)
Suffix for output video filename
FPS of output video. If not specified, uses the input video’s FPS.
Path to ffmpeg binary (use if ffmpeg is not in PATH)
Performance Options
Number of processes per GPUIncrease this to improve GPU utilization. The program is often I/O bound, so GPUs are not fully utilized with a single process.
Extract all frames first before processingUse this if you encounter ffmpeg errors during multi-processing.
Tile size for processing. Use if you encounter CUDA out of memory errors.
Tile padding size
Pre-padding size at each border
Use FP32 precision instead of FP16
Additional Options
Enable GFPGAN face enhancement
Denoise strength (only for
realesr-general-x4v3 model)Advanced Workflows
Method 1: Direct Video Processing (Recommended)
Process video directly with automatic frame handling:- Extracts frames using ffmpeg
- Processes frames with Real-ESRGAN
- Merges frames back into video with audio
Method 2: Extract-Process-Merge Workflow
Manual control over each step:Method 3: Using Extract Frame First
Use this if you encounter ffmpeg errors with multi-processing:NCNN Executable for Videos
For users who prefer the portable NCNN executable:Performance Optimization
GPU Utilization
Memory Management
Using Tiling
For high-resolution videos that cause CUDA out of memory errors:Tips for Best Results
Troubleshooting
FFmpeg errors during multi-processing
FFmpeg errors during multi-processing
Use the
--extract_frame_first option:CUDA out of memory
CUDA out of memory
Solutions:
-
Use tiling:
-
Reduce processes per GPU:
-
Use a smaller scale:
Very slow processing
Very slow processing
For large videos (>1080p output):
-
Use multi-processing:
-
Consider using multiple GPUs:
- Use smaller scale or lower resolution input
No audio in output
No audio in output
The script should automatically copy audio. If it doesn’t:
-
Manually merge with audio:
-
Check if original video has audio:
Model Comparison for Videos
| Model | Size | Speed | Quality | Best For |
|---|---|---|---|---|
realesr-animevideov3 | 8MB | Fast | Excellent | Anime videos (recommended) |
RealESRGAN_x4plus_anime_6B | 17MB | Medium | Excellent | High-quality anime frames |
RealESRGAN_x4plus | 64MB | Slow | Good | General video content |
realesr-animevideov3 is recommended due to its small size and optimization for video content.
Next Steps
Anime Images
Learn about the anime image model
NCNN Executable
Use portable executable for video frame processing
General Images
Explore models for non-anime content