Skip to content

Repository files navigation

Image & Video Enhancer

Python PyTorch Platform License CUDA

AI-powered desktop application for image and video enhancement with intelligent upscaling and quality improvement.

FeaturesInstallationGPU GuideUsageTroubleshooting


Features

Feature Description
Image Upscaling 2x, 4x, 8x resolution enhancement using Real-ESRGAN AI models
Anime Mode Specialized model optimized for anime/cartoon/illustration content
Face Enhancement Automatic facial detail restoration with GFPGAN
Video Processing Frame-by-frame video enhancement with FFmpeg integration
Batch Processing Process multiple images simultaneously
Smart GPU Detection Automatic optimization based on your hardware
Multi-language UI English, Russian, Ukrainian interface
Real-time Preview Before/after comparison with split view
Memory Optimization Intelligent tile-based processing for large images

System Requirements

Minimum (CPU Mode)

  • Windows 10/11 (64-bit)
  • Python 3.10 or higher
  • 8 GB RAM
  • 2 GB free disk space

Recommended (GPU Mode)

  • NVIDIA GPU with CUDA support (GTX 10 series or newer)
  • 6+ GB VRAM (8+ GB recommended)
  • 16 GB RAM
  • SSD for faster model loading

Installation

Quick Install (Automatic)

The installer will automatically detect your GPU and install the appropriate PyTorch version.

Option 1: Batch Script (CMD)

install.bat

Option 2: PowerShell

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
.\install.ps1

Manual Installation

Step 1: Clone the Repository

git clone https://github.com/YOUR_USERNAME/imagerworker.git
cd imagerworker

Step 2: Create Virtual Environment

python -m venv .venv

Step 3: Activate Virtual Environment

PowerShell:

.\.venv\Scripts\Activate.ps1

CMD:

.\.venv\Scripts\activate.bat

Step 4: Install Dependencies

Choose the appropriate requirements file for your GPU:

GPU Series CUDA Version Requirements File
RTX 50 (Blackwell) CUDA 12.9 requirements/requirements_cuda129.txt
RTX 40 (Ada Lovelace) CUDA 12.4 requirements/requirements_cuda124.txt
RTX 30 (Ampere) CUDA 12.1 requirements/requirements_cuda121.txt
RTX 20 / GTX 16/10 CUDA 11.8 requirements/requirements_cuda118.txt
CPU Only requirements/requirements_cpu.txt
pip install -r requirements/requirements_cudaXXX.txt

Step 5: Download AI Models

Download the model files and place them in the models/ directory:

models/
├── x2.pth              # 2x upscaling (Real-ESRGAN)
├── x4.pth              # 4x upscaling (Real-ESRGAN)
├── x4-anime.pth        # 4x anime model (Real-ESRGAN Anime)
└── gfpgan/
    ├── GFPGANv1.3.pth  # Face enhancement v1.3
    └── GFPGANv1.4.pth  # Face enhancement v1.4

Model Download Links:


GPU Compatibility Guide

NVIDIA RTX 50 Series (Blackwell)

Models: RTX 5070, 5070 Ti, 5080, 5090

pip install -r requirements/requirements_cuda129.txt
Spec Value
CUDA Version 12.9
Compute Capability 10.0
TF32 Support Yes
FP16 Support Yes
Recommended Tile Size 1280-1536
Recommended Batch 6-8

NVIDIA RTX 40 Series (Ada Lovelace)

Models: RTX 4060, 4070, 4070 Ti, 4080, 4090

pip install -r requirements/requirements_cuda124.txt
Spec Value
CUDA Version 12.4
Compute Capability 8.9
TF32 Support Yes
FP16 Support Yes
Recommended Tile Size 1024-1536
Recommended Batch 4-8

NVIDIA RTX 30 Series (Ampere)

Models: RTX 3060, 3070, 3080, 3090, 3060 Ti, 3070 Ti

pip install -r requirements/requirements_cuda121.txt
Spec Value
CUDA Version 12.1
Compute Capability 8.6
TF32 Support Yes
FP16 Support Yes
Recommended Tile Size 768-1024
Recommended Batch 2-4

NVIDIA RTX 20 Series (Turing)

Models: RTX 2060, 2070, 2080, 2060 Super, 2070 Super, 2080 Super, 2080 Ti

pip install -r requirements/requirements_cuda118.txt
Spec Value
CUDA Version 11.8
Compute Capability 7.5
TF32 Support No
FP16 Support Yes
Recommended Tile Size 512-800
Recommended Batch 1-2

NVIDIA GTX 16 Series (Turing)

Models: GTX 1650, 1650 Super, 1660, 1660 Super, 1660 Ti

pip install -r requirements/requirements_cuda118.txt
Spec Value
CUDA Version 11.8
Compute Capability 7.5
TF32 Support No
FP16 Support Yes
VRAM 4-6 GB
Recommended Tile Size 512
Recommended Batch 1

Note: Limited VRAM may cause slower processing on large images.


NVIDIA GTX 10 Series (Pascal)

Models: GTX 1050, 1060, 1070, 1080, 1050 Ti, 1070 Ti, 1080 Ti

pip install -r requirements/requirements_cuda118.txt
Spec Value
CUDA Version 11.8
Compute Capability 6.1
TF32 Support No
FP16 Support No (CC < 7.0)
Recommended Tile Size 512
Recommended Batch 1

Warning: GTX 10 series does NOT support FP16 acceleration. Processing will be slower. Consider CPU mode for very large images.


CPU Only (No NVIDIA GPU)

For AMD, Intel, or systems without compatible NVIDIA GPU

pip install -r requirements/requirements_cpu.txt
Spec Value
Performance Slow (5-20x slower than GPU)
Recommended Tile Size 512
Recommended Batch 1

Performance Reference

GPU VRAM 1080p Image 4K Image Performance
RTX 5090 32 GB ~1s ~4s Excellent
RTX 5080 16 GB ~1.5s ~5s Excellent
RTX 5070 Ti 16 GB ~2s ~6s Excellent
RTX 4090 24 GB ~2s ~6s Excellent
RTX 4080 16 GB ~3s ~10s Excellent
RTX 4070 Ti 12 GB ~4s ~12s Very Good
RTX 3090 24 GB ~4s ~15s Very Good
RTX 3080 10 GB ~5s ~18s Very Good
RTX 3070 8 GB ~6s ~22s Good
RTX 2080 Ti 11 GB ~8s ~30s Good
RTX 2070 8 GB ~10s ~40s Moderate
GTX 1080 Ti 11 GB ~15s ~60s Moderate
GTX 1070 8 GB ~20s ~80s Slow
CPU (8-core) ~60s ~240s Very Slow

Times are approximate for 4x upscaling with face enhancement.


Usage

Running the Application

Using run script:

run.bat

or

.\run.ps1

Manually:

.venv\Scripts\activate
python main.py

Interface Overview

The application has several tabs:

  1. Image Processing - Single image enhancement
  2. Video Processing - Video upscaling
  3. Status - GPU/CPU monitoring, VRAM usage
  4. About - Application info and settings

Processing Options

Option Description
Scale Factor 2x, 4x, or 8x upscaling
Model Type Standard or Anime-optimized
Face Enhancement Enable/disable GFPGAN
Use CPU Force CPU processing (for large images)

Project Structure

imagerworker/
├── main.py                 # Entry point
├── install.bat             # Auto-installer (CMD)
├── install.ps1             # Auto-installer (PowerShell)
├── run.bat                 # Run script (CMD)
├── run.ps1                 # Run script (PowerShell)
│
├── requirements/           # GPU-specific requirements
│   ├── requirements_cuda129.txt    # RTX 50 Series
│   ├── requirements_cuda124.txt    # RTX 40 Series
│   ├── requirements_cuda121.txt    # RTX 30 Series
│   ├── requirements_cuda118.txt    # RTX 20/GTX 16/10
│   └── requirements_cpu.txt        # CPU only
│
├── gui/                    # User interface
│   ├── main_window.py
│   ├── image_processing_tab_widget.py
│   ├── video_tab_widget.py
│   ├── status_tab_widget.py
│   └── ...
│
├── processing/             # Image/video processing
│   ├── pipeline.py
│   ├── preprocessor.py
│   ├── postprocessor.py
│   └── ...
│
├── managers/               # Resource management
│   ├── model_manager.py
│   ├── gpu_capabilities.py
│   └── resource_manager.py
│
├── models/                 # AI model weights (.pth)
├── assets/                 # Icons, translations
├── styles/                 # Qt themes
└── utils/                  # Helpers

Troubleshooting

"CUDA out of memory" Error

  • Close other GPU-intensive applications (games, browsers with hardware acceleration)
  • Reduce image resolution before processing
  • Enable "Use CPU" checkbox for very large images (8K+)
  • Try reducing tile size in settings

"CUDA not available" Warning

  1. Verify NVIDIA drivers: nvidia-smi
  2. Check CUDA Toolkit installation
  3. Verify PyTorch CUDA support:
import torch
print(torch.cuda.is_available())  # Should be True
print(torch.version.cuda)         # Should match your CUDA version

Slow Processing

  • Ensure "Use CPU" is not accidentally enabled
  • Check if correct PyTorch version is installed for your GPU
  • Monitor VRAM in Status tab - if near 100%, reduce tile size
  • Close background applications

Application Won't Start

  1. Check logs/app.log for error details
  2. Verify all dependencies installed: pip list
  3. Try reinstalling: pip install -r requirements/requirements_cudaXXX.txt --force-reinstall

Models Not Found

Ensure models are in the correct location:

models/x2.pth
models/x4.pth
models/x4-anime.pth
models/gfpgan/GFPGANv1.3.pth
models/gfpgan/GFPGANv1.4.pth

PyTorch/CUDA Version Mismatch

If you upgraded your GPU or CUDA, reinstall PyTorch:

pip uninstall torch torchvision torchaudio
pip install -r requirements/requirements_cudaXXX.txt

Building Standalone Executable

pip install pyinstaller
pyinstaller build.spec

The executable will be in dist/VideoUpscaler/.

Note: The build will be large (~2-3 GB) due to PyTorch and AI models.


Technologies Used


License

MIT License - see LICENSE for details.


Author

Magerko | Telegram: @magerdev1


Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Acknowledgments

About

AI-powered desktop application for image and video enhancement with intelligent upscaling and quality improvement.

Resources

Stars

23 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages