Super-resolution image scaling using ESRGAN (Enhanced Super-Resolution Generative Adversarial Networks).
This tool upscales PNG and JPEG images by 4× using the ESRGAN model. It uses the 4x-ESRGAN.safetensors weights file converted from the PyTorch model at https://openmodeldb.info/models/4x-ESRGAN.
sscale input.jpg -o output.pngFor GPU acceleration, build with the appropriate feature flag:
- Linux:
cargo build --release --features cudaorcargo build --release --features cudnn - macOS:
cargo build --release --features metal
CPU inference is supported but significantly slower.