upscale-qt
Small PyQt6 app to upscale an image with an ESRGAN model through sd-cli (stable-diffusion.cpp). A slider wipe compares before and after, and the result can be saved as a new file or written over the original.
Requirements
- Python 3
- PyQt6
sd-clifrom stable-diffusion.cpp, plus one or more ESRGAN upscaler models in a folder
Install
Symlink the script and menu entry into your home directory, so later updates of the repo apply without reinstalling (~/bin must be on PATH):
ln -s "$PWD/upscale-qt" ~/bin/upscale-qt
ln -s "$PWD/upscale-qt.desktop" ~/.local/share/applications/upscale-qt.desktop
update-desktop-database ~/.local/share/applications
The menu entry uses the zoom-in icon from your icon theme and registers for common image types, so "Open with" works from a file manager.
For a right-click "Upscale with upscale-qt" item in file managers that read freedesktop file-manager actions (pcmanfm-qt, Caja, Nemo), with exactly one image selected:
ln -s "$PWD/upscale-qt-action.desktop" ~/.local/share/file-manager/actions/upscale-qt.desktop
To uninstall, remove the symlinks.
Usage
./upscale-qt [image]
- Open an image (Ctrl+O, or pass it as argument). EXIF rotation is applied.
- Pick a model and Upscale (Ctrl+U). Expect roughly 25 seconds per megapixel of input; the result is 4x in each direction.
- The view shows before left of the divider and after right of it. Drag the divider to wipe, drag elsewhere to pan, mouse wheel to zoom, double-click to fit.
- Save As (Ctrl+Shift+S) writes a new file. Overwrite replaces the original after a confirmation, in the same format. EXIF metadata is not kept.
- Clear (Ctrl+W) empties the view and deletes the temp files. It asks first if the upscaled image was not saved.
- Settings holds the upscalers folder.
- Ctrl+Q quits. Quitting or closing the window asks first if an upscale is running or the upscaled image was not saved.
Model descriptions
Put a models.txt next to the models to show what each one is for in the dropdown:
# filename = what it is for
some_model_x4.pth = Clean photos: people, nature
other_model_x4.pth = Noisy or compressed photos
Models without a line show their filename.
License
Copyright (C) 2026 Danilo M. danix@danix.xyz
GPLv2 only. See LICENSE for the full text.
Development Approach
This project is developed using AI-assisted tools. Code is generated with the help of AI based on human-provided specifications, design decisions, and iterative feedback.
All contributions are reviewed, tested, and curated by the maintainer before being included in the codebase. AI is used as a productivity and exploration tool, while human oversight remains central to all decisions.
The goal is to combine the flexibility of AI-assisted development with standard open-source practices such as transparency, review, and accountability.
