pixtreme-upscale
Multi-backend deep learning upscalers for pixtreme
Overview
pixtreme-upscale provides GPU-accelerated deep learning super-resolution with support for ONNX, PyTorch, and TensorRT backends. Integrates with Spandrel for automatic model architecture detection.
Features
- Multi-Backend Support: ONNX Runtime, PyTorch, TensorRT
- Model Conversion: PyTorch → ONNX → TensorRT pipeline
- Spandrel Integration: Automatic architecture detection for 100+ models
- Zero-Copy: Direct GPU memory operations
Installation
Requirements:
- Python >= 3.12
- CUDA Toolkit 12.x
- NVIDIA GPU with compute capability >= 6.0
# Base installation (ONNX + PyTorch)
pip install pixtreme-upscale
# With TensorRT support
pip install pixtreme-upscale[tensorrt]
Requires pixtreme-core, PyTorch, ONNX Runtime, and CUDA Toolkit 12.x.
Quick Start
import pixtreme_upscale as pu
import pixtreme_core as px
# Read image
img = px.imread("input.jpg")
# ONNX backend (fastest compatibility)
upscaler = pu.OnnxUpscaler("model.onnx")
upscaled = upscaler.get(img)
# PyTorch backend (most flexible)
upscaler = pu.TorchUpscaler("model.pth")
upscaled = upscaler.get(img)
# TensorRT backend (fastest performance)
pu.onnx_to_trt("model.onnx", "model.trt", precision="fp32")
upscaler = pu.TrtUpscaler("model.trt")
upscaled = upscaler.get(img)
# Save result
px.imwrite("output.jpg", upscaled)
Input Handling
Each upscaler's get() method processes the supplied image as a single inference input; it does not tile or merge images internally. pixtreme-core provides separate tile_image() and merge_tiles() APIs for tiling workflows.
Model Conversion
from pixtreme_upscale.utils.model_convert import torch_to_onnx, onnx_to_trt
# PyTorch → ONNX
torch_to_onnx("model.pth", "model.onnx", input_shape=(1, 3, 1080, 1920))
# ONNX → TensorRT
# TensorRT 11 builder math mode is fp32 or tf32. For fp16/bf16 inference,
# export those tensor dtypes into the ONNX model before building the engine.
onnx_to_trt("model.onnx", "model.trt", precision="tf32")
Supported Models
Works with Spandrel-supported architectures:
- ESRGAN, Real-ESRGAN, RealESRGAN+
- SwinIR, HAT, OmniSR
- And 100+ more architectures
License
MIT License - see LICENSE file for details.
Links
- Repository: https://github.com/sync-dev-org/pixtreme
Metadata
Release files for pixtreme-upscale 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pixtreme_upscale-0.9.0.tar.gz | 24.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pixtreme_upscale-0.9.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 44.3 kB
Release files / pixtreme_upscale-0.9.0.tar.gz
| Download URL | pixtreme_upscale-0.9.0.tar.gz |
|---|---|
| Size | 24.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5ed639551141853161f3e3725b3fb369254a135e5c20c676f6437b757e33311d
|
|
BLAKE2b-256 checksum How to use checksums |
72ed439bd49187f7a776f437958ce0e14c9c3b16ac8efd0f12dcba292458621d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.22
|
Release files / pixtreme_upscale-0.9.0-py3-none-any.whl
| Download URL | pixtreme_upscale-0.9.0-py3-none-any.whl |
|---|---|
| Size | 19.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4cf64f49f08981521a149968292ca55705cfe8b73f850ede7e48ad5ef6de8354
|
|
BLAKE2b-256 checksum How to use checksums |
4cb42862a5f487887f9082370c4bdc026fafa430290a0c3850336828e0528ef2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.22
|
Security for pixtreme-upscale 0.9.0
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.