tileupscale

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.
Homepage: tileupscale.dev
PyPI distribution tileupscale. Import and command stay upscale. Not related to other projects named "upscaler" on GitHub or PyPI.
Install
pip install tileupscale
pip install "tileupscale[server]" # web UI + job API
pip install "tileupscale[mcp]" # MCP tools for agents
# or: pipx install tileupscale
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
- CLI reference
- HTTP and MCP API
- Development, desktop build, layout
- Android skeleton
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.
Verify
uv run pytest -q
Or: python -m manager verify upscale --tier prereq. Contract: project.manifest.yaml.