Skip to main content

upscale

CI Release PyPI License: MIT

Local AI image upscale. Chains Real-ESRGAN passes (via spandrel) to reach any target scale, with feather-blended overlapping tiles so large outputs have no seams. Runs on CPU or an NVIDIA GPU; nothing leaves your machine except the one-time model download.

upscale hero

Before/after: 160px source upscaled 4x

Not related to other projects named "upscaler" on GitHub or PyPI. The package, the import name and the command are all upscale.

Install

pip install upscale
pip install "upscale[server]"   # web UI + job API
pip install "upscale[mcp]"      # MCP tools for agents
# or: pipx install upscale

The pip install pulls PyTorch (large, slow first install). A PyTorch-free build exists only as the Windows desktop app (ONNX Runtime); see docs/develop.md.

From a clone:

pip install -e .
pip install -e ".[server,mcp]"
# tip without cloning: pip install "git+https://github.com/wwylon/upscale.git"

First win

upscale upscale input.png output.png --scale 4 --cpu

Use --target-size 8000 for a target long edge instead of a factor, drop --cpu to use the GPU, and --fast for the quick SPAN model. Models download on first use and are hash-verified.

upscale models list              # built-in models
upscale suggest input.png        # heuristic model pick
upscale serve                    # local web UI at http://127.0.0.1:8787/en/
upscale mcp                      # MCP tools over stdio

Equivalent module form: python -m upscale upscale ...

Highlights

  • Exact scale (--scale) or target long edge (--target-size); extra passes only when needed
  • Tile size chosen from free VRAM; very large frames spill to disk between passes
  • Swappable models: Real-ESRGAN family, HAT, SPAN, community weights, or your own .pth
  • Large outputs saved as BigTIFF; alpha preserved
  • Web UI in several languages; Windows desktop build uses ONNX Runtime (no PyTorch)
  • No telemetry

Library

from upscale import UpscaleConfig, execute

execute(UpscaleConfig(input="in.png", output="out.png", scale=4, cpu=True))

Documentation

Tests

Local gate (also in CONTRIBUTING.md / publish.manifest.yaml):

uv sync --locked --extra dev --extra server --extra mcp
uv run ruff check upscale tests
uv run mypy --follow-imports=silent upscale/schema.py upscale/job_prep.py upscale/config.py upscale/naming.py upscale/api
uv run pytest -q
uv run python scripts/cpu_smoke.py

GitHub Actions are disabled to save minutes; run the gate locally (or workflow_dispatch if re-enabled) before publish.

MIT licensed. See CONTRIBUTING.md and SECURITY.md.

Metadata

Release files for upscale 0.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for upscale 0.5.2
File Size Uploaded Provenance Actions
upscale-0.5.2.tar.gz 129.7 kB Without provenance Details for upscale-0.5.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for upscale 0.5.2
File Interpreter ABI Platform Actions
upscale-0.5.2-py3-none-any.whl Python 3 none any Details for upscale-0.5.2-py3-none-any.whl

Total release size: 246.7 kB

Release files / upscale-0.5.2.tar.gz

Download URL upscale-0.5.2.tar.gz
Size 129.7 kB
Tags Source
SHA-256 checksum
How to use checksums
eddf544e76abd0a070eda4bc4e22f1dfef1d0901d93829518089726bca228f2f
BLAKE2b-256 checksum
How to use checksums
d8883a179b027c2af2fdc8cfd1c7e49a98ab09e374f0b500f9941981ff52c756
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.11

Release files / upscale-0.5.2-py3-none-any.whl

Download URL upscale-0.5.2-py3-none-any.whl
Size 117.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
63659b0bd0feaeebc9ccf3314f524de813f8100df044944fafa76e6990c9ac8d
BLAKE2b-256 checksum
How to use checksums
664886ab62d1b2751b63b902daba5fc13d2195c79e4554cd667cb3a93c0554ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.11

Security for upscale 0.5.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page