Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Local AI Image Upscaler — AMD GPU (Vulkan)

License: MIT Python 3.10+ Platform: Windows GPU: Vulkan Engine: Real-ESRGAN NCNN

Local upscaler for AI-generated images, aimed at high-quality print output. Uses Real-ESRGAN NCNN Vulkan — no CUDA, no cloud, native AMD GPU support on Windows.

Tested on AMD Radeon RX 9060 XT, Windows 11.


Quickstart

pip install -r requirements.txt

# Photorealistic / AI photo-realistic (best quality)
python upscale.py my_image.png

# AI art, illustration, anime
python upscale.py my_image.png --model anime

# Fast preview
python upscale.py my_image.png --model fast

# 2x instead of 4x
python upscale.py my_image.png --scale 2

# Process a whole folder
python upscale.py images/ --model photo

# Custom output folder
python upscale.py my_image.png --output ~/Pictures/upscaled

The NCNN binary and models (~43 MB) are downloaded automatically on first run. By default, results land in output/.


Benchmark — AMD RX 9060 XT

Input: 768×1364px → Output: 3072×5456px (4× scale, >4K on the long edge)

Model Time Resolution PNG size Recommended use
photo (x4plus) 9.6s 3072×5456px 19.6 MB Photorealistic images, AI portraits
anime (x4plus-anime) 3.8s 3072×5456px 17.7 MB AI art, illustration, cartoon
fast (animevideo) 1.6s 3072×5456px 21.4 MB Previews, batch processing

All models autodetect the GPU via Vulkan (fp16 enabled).

Print DPI guide

Output resolution 300 DPI (photo quality) 150 DPI (wall poster)
3072×5456px (4×) ~10" × 18" ~20" × 36"
1536×2728px (2×) ~5" × 9" ~10" × 18"

Available models

File in bin/models/ --model flag Scale Weight
realesrgan-x4plus photo 4× 32 MB
realesrgan-x4plus-anime anime 4× 8.6 MB
realesr-animevideov3-x2/x3/x4 fast 2/3/4× 1.2 MB

Manual install (optional)

The script auto-downloads the binary + models on first use. To do it manually:

upscale.py          <- main script (single Python file)
requirements.txt    <- only pillow
bin/
  realesrgan-ncnn-vulkan.exe   <- NCNN binary
  vcomp140.dll                 <- Visual C++ runtime
  models/
    realesrgan-x4plus.bin/.param         <- photo model (32 MB)
    realesrgan-x4plus-anime.bin/.param   <- anime model (8.6 MB)
    realesr-animevideov3-x*.bin/.param   <- fast models (1.2 MB × 3)

Sources:


Dependencies

pillow   -> only for reading image dimensions and mode (display info)

The actual upscaling is done by the NCNN binary compiled with Vulkan. No PyTorch, CUDA, ROCm, or heavy ML libraries required.


Why Real-ESRGAN NCNN Vulkan

Full research notes (alternatives evaluated, findings, what doesn't work on AMD Windows): see RESEARCH.md.

TL;DR: AMD GPU on Windows = Vulkan or nothing. NCNN Vulkan gives quality on par with Topaz / Aiarty without paying and without uploading anything to the cloud.


Credits

License

MIT — see LICENSE.

About

Local AI image upscaler for AMD GPUs on Windows. Real-ESRGAN NCNN + Vulkan, no CUDA, no cloud.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages