Skip to content

irhdab/realesrgan-gui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Real-ESRGAN Mac GUI

A simple, user-friendly graphical interface for Real-ESRGAN on macOS. This GUI provides an easy way to upscale images using Real-ESRGAN's powerful AI models without touching the command line.

License Python Platform

Screenshot 2025-11-07 at 22 20 20

Features

  • Drag-and-drop support for easy file management
  • Multiple AI models (RealESRGAN_x4plus, anime models, and more)
  • Customizable upscale ratio (1x to 8x)
  • Optional face enhancement for portrait images
  • Batch processing support for multiple images
  • Real-time log output to monitor progress
  • Simple, clean interface built with PySide6

Prerequisites

Required Software

  1. macOS (tested on macOS 10.15+)
  2. Python 3.8 or higher
  3. Real-ESRGAN repository - You need a local clone of the official Real-ESRGAN repository

Setting Up Real-ESRGAN

If you haven't already set up Real-ESRGAN, follow these steps:

# Clone the Real-ESRGAN repository
git clone https://github.com/xinntao/Real-ESRGAN.git
cd Real-ESRGAN

# Install Real-ESRGAN dependencies
pip3 install basicsr
pip3 install facexlib
pip3 install gfpgan
pip3 install -r requirements.txt
python setup.py develop

# Download pre-trained models
wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth -P weights
wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.2.4/RealESRGAN_x4plus_anime_6B.pth -P weights

Installation

  1. Download the GUI script:

    curl -O https://raw.githubusercontent.com/[your-repo]/realesrgan_gui.py
  2. Install GUI dependencies:

    pip3 install PySide6

Usage

Starting the Application

python3 realesrgan_gui.py

First-Time Setup

  1. Click "Set inference_realesrgan.py" button
  2. Navigate to your Real-ESRGAN clone directory
  3. Select the inference_realesrgan.py file (usually at ~/Real-ESRGAN/inference_realesrgan.py)

Processing Images

  1. Add images:

    • Click "Add File/Folder" button, OR
    • Drag and drop image files directly onto the file list
  2. Configure settings:

    • Model: Choose the AI model based on your content type
      • RealESRGAN_x4plus - General photos and images
      • RealESRGAN_x4plus_anime_6B - Anime and illustrations
      • RealESRNet_x4plus - More conservative upscaling
    • Outscale: Set the upscaling ratio (1-8x)
    • Face enhance: Check this for better results on portraits
  3. Set output location (optional):

    • Click "Choose Output Folder" to specify where upscaled images will be saved
    • Default: ./results in the current directory
  4. Start processing:

    • Click "Start" to begin upscaling
    • Monitor progress in the log window
    • Use "Stop" button to cancel if needed

Tips for Best Results

  • For photos: Use RealESRGAN_x4plus with face enhancement enabled for portraits
  • For anime/drawings: Use RealESRGAN_x4plus_anime_6B for sharper, cleaner results
  • Upscale ratio: Start with 4x for most cases; higher ratios work best with very low-resolution images
  • Batch processing: You can add multiple images; the GUI will process them sequentially

Supported Models

Model Best For File Size
RealESRGAN_x4plus General images, photos ~65MB
RealESRGAN_x4plus_anime_6B Anime, illustrations, art ~17MB
RealESRNet_x4plus Conservative upscaling ~65MB

Troubleshooting

"Script not found" error

  • Make sure you've set the correct path to inference_realesrgan.py
  • Verify the Real-ESRGAN repository is properly installed
  • Check that the path doesn't contain spaces or special characters

"No module named..." errors

  • Ensure all Real-ESRGAN dependencies are installed
  • Try reinstalling: pip3 install basicsr facexlib gfpgan

GUI doesn't start

  • Verify Python version: python3 --version (must be 3.8+)
  • Reinstall PySide6: pip3 install --upgrade PySide6

Slow processing

  • GPU acceleration is automatically used if available
  • Processing time depends on image size and upscale ratio
  • Larger images and higher ratios take longer

File Structure

.
├── realesrgan_gui.py    # This GUI application
├── results/             # Default output folder (created automatically)
└── Real-ESRGAN/         # Your Real-ESRGAN clone (required)
    ├── inference_realesrgan.py
    ├── weights/
    └── ...

Technical Details

  • GUI Framework: PySide6 (Qt for Python)
  • Backend: Calls Real-ESRGAN's inference_realesrgan.py as a subprocess
  • Threading: Uses worker threads to prevent UI freezing during processing
  • Logging: Real-time output capture from the Real-ESRGAN process

Limitations

  • Currently processes one image at a time (sequential batch processing)
  • Requires a local Real-ESRGAN installation
  • No built-in model downloader (manual setup required)
  • macOS only (Linux/Windows would need minor modifications)

Contributing

Contributions are welcome! Feel free to:

  • Report bugs
  • Suggest new features
  • Submit pull requests

License

This GUI wrapper is provided as-is. Please refer to the Real-ESRGAN license for the underlying AI models and processing code.

About

Python GUI for Real-ESRGAN

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages