RRDB_PSNR_x4 optimized for Arm-based Cloud CPU
RRDB_PSNR_x4, a 4x image super-resolution model, optimized for Arm-based Cloud CPU systems and delivered as an ExecuTorch .pte artifact.
Summary
This repository contains an Arm-optimized version of kadirnar/RRDB_PSNR_x4 for 4x image super-resolution. The model is provided in the ExecuTorch .pte format running on the ExecuTorch runtime, targeting Cloud CPU systems.
This version is intended to demonstrate efficient inference on Arm-based platforms while preserving the original model's intended behavior. Arm has evaluated this model on Urban100 and measured performance on a representative evaluation target.
The optimization is a mixed-precision INT8 recipe: the bulk of the RRDB backbone is quantized to INT8, while the upsampling tail and the first three RRDB body blocks are held in FP32, and post-conversion graph surgery removes quantize/dequantize pairs that the XNNPACK quantizer inserts around concatenation nodes inside those FP32 blocks.
Key results
| Area | Result |
|---|---|
| Model format | ExecuTorch .pte |
| Target device class | Cloud CPU |
| Reference device | AWS Graviton G4 (Neoverse-V2, Ubuntu 24.04.4 LTS) |
| Primary performance result | 704.42 ms p50 latency per 128x128 tile, 1.42 frames/sec |
| Accuracy result | 26.81 dB PSNR on Urban100 |
| Size / memory result | 23.176 MB, 2.76x smaller than the FP32 baseline |
Original model
| Field | Value |
|---|---|
| Original model | kadirnar/RRDB_PSNR_x4 |
| Original source | Hugging Face |
| Original developer | ESRGAN (Xintao Wang et al.) |
| Original model card | kadirnar/RRDB_PSNR_x4 |
| Original license | Apache-2.0 |
Model files
| File | Description |
|---|---|
esrgan_x4_graviton_executorch_optimized.pte |
Arm-optimized model for deployment |
example.py |
Minimal inference example |
pyproject.toml |
Pinned runtime dependencies for example.py, resolved with uv |
uv.lock |
Locked dependency resolution for pyproject.toml |
config.yaml |
Model I/O contract used by the example |
benchmarks/ |
FP32 baseline and Arm-optimized benchmark records |
Performance
Performance was measured on the reference configuration below. Results are intended to make the optimization reproducible but do not guarantee identical performance on every Arm-based system.
Reference configuration
| Field | Value |
|---|---|
| Device / platform | AWS Graviton G4 |
| CPU / accelerator | Neoverse-V2, 16 cores, 32 GB system memory, CPU execution |
| OS | Linux Ubuntu 24.04.4 LTS |
| Runtime | ExecuTorch 1.1.0 |
| Backend / delegate | XNNPACK, KleidiAI |
| Batch size | 1 |
| Precision | INT8 static PTQ — per-channel symmetric weights, per-tensor affine activations (mixed precision: upsampling tail and first three RRDB body blocks held in FP32) |
| Runs | 10 warmup + 100 measured |
Performance results
| Metric | Original / baseline | Arm-optimized | Improvement |
|---|---|---|---|
| p50 latency | 1762.73 ms | 704.42 ms | 2.50x faster |
| p90 latency | 1764.72 ms | 779.70 ms | 2.26x faster |
| p99 latency | 1771.11 ms | 819.72 ms | 2.16x faster |
| Throughput | 0.57 frames/sec | 1.42 frames/sec | 2.49x |
| Model load time | 66.29 ms | 36.67 ms | 1.81x faster |
| Time to first inference | 1968.65 ms | 906.88 ms | 2.17x faster |
| Model size | 64.073 MB | 23.176 MB | 2.76x smaller |
| Peak memory | 799.74 MB | 795.07 MB | 1.01x less |
Latency is measured per 128x128 input tile at a 4x scale factor.
Accuracy
Accuracy was evaluated using the same preprocessing, input resolution, and evaluation protocol described below. Where possible, the optimized model is compared against the original model under the same evaluation conditions.
Evaluation setup
| Field | Value |
|---|---|
| Dataset | Urban100 |
| Split | N/A |
| Number of samples | 100 |
| Metric(s) | PSNR (dB), SSIM |
| Evaluation runtime | ExecuTorch |
Accuracy results
| Metric | Original / baseline | Arm-optimized | Change |
|---|---|---|---|
| PSNR (dB) | 27.03 | 26.81 | -0.22 |
| SSIM | 0.8176 | 0.8109 | -0.0067 |
Accuracy was measured using the evaluation setup described above. Users should re-evaluate the model on their own data before production use.
Arm optimization approach
Arm optimized this model for efficient inference on Arm-based platforms using a hardware-aware conversion and validation flow.
For this release, Arm used:
| Optimization area | Applied? | Notes |
|---|---|---|
| Model conversion | Yes | Converted to the ExecuTorch .pte format for the ExecuTorch runtime |
| Quantization | Yes | Mixed-precision INT8 static PTQ: per-channel symmetric weights and per-tensor affine activations for the quantized portion of the RRDB backbone, calibrated on 100 randomly selected Urban100 samples; the upsampling tail and the first three RRDB body blocks are held in FP32 to keep accuracy within acceptable ranges |
| Runtime/backend selection | Yes | XNNPACK delegate with KleidiAI kernels, CPU execution backend |
| Graph/runtime compatibility updates | Yes | Performed as part of the ExecuTorch export pipeline: post-conversion graph surgery removes the quantize/dequantize pairs the XNNPACK quantizer inserts around concatenation nodes inside the blocks that are held in FP32 |
| Accuracy validation | Yes | Compared against the original model or published baseline |
| Performance validation | Yes | Measured on the reference Arm platform |
The goal of this process is to improve deployment characteristics such as latency, memory use, model size, and runtime compatibility while preserving the model's intended behavior. Detailed conversion scripts, calibration configuration, or backend-specific implementation details may be provided separately where appropriate.
Using this model
Install dependencies
Dependencies are declared in pyproject.toml, which ships with this repository. Resolve and install them into a local virtual environment with uv:
uv python install
uv sync --frozen
Run the example
uv run example.py
The ordinary command runs inference without writing files. To save the generated image and summary, provide explicit output paths:
uv run example.py --output output.png --summary-output summary.json
Expected input
| Property | Value |
|---|---|
| Input shape | [1, 3, 128, 128] |
| Input type | float32 |
| Input range | [0.0, 1.0] |
| Preprocessing | Convert an RGB image to a [0, 1] float32 tensor; images larger than one tile are split into 128x128 tiles automatically |
Expected output
| Property | Value |
|---|---|
| Output shape | [1, 3, 512, 512] |
| Output type | float32 |
| Postprocessing | Clamp to [0.0, 1.0] at a 4x spatial scale factor; adjacent tiles overlap by 8 pixels and are blended by averaging |
Intended use
This model is intended for developers evaluating 4x image super-resolution workloads on Arm-based platforms. It is suitable as a reference implementation for benchmarking, prototyping, and integration exploration.
Limitations
- Performance depends on the target device, runtime version, backend/delegate support, memory configuration, and system load.
- With the pinned runtime, TorchAO reports that its optional C++ extensions are incompatible with the installed Torch version, ExecuTorch reports that
InternalConsistencyverification is unavailable, and CPUinfo may fall back from/sys/devices/soc0/image_versionto MIDR. These warnings did not affect XNNPACK registration, model loading, or inference on the reference platform. - Accuracy was evaluated on Urban100 and may not generalize to all domains.
- This release preserves the original model's intended task and behavior, but users should validate it for their own application, data, and deployment environment.
- This repository is not a replacement for the original model documentation.
Additional notes
The INT8 recipe is mixed precision, and both parts of it are required together:
- Layers held in FP32: the upsampling tail (upconv1, upconv2, HRconv, conv_last), which directly synthesizes output pixel values, and the first three RRDB body blocks (body.0, body.1, body.2), whose early feature representations span a wide dynamic range. The exclusion filter matches exact path components, so body.1 does not also select body.10 through body.19.
- Graph surgery: the XNNPACK quantizer annotates every concatenation node unconditionally, which bypasses the per-layer exclusion filter. Without removing those quantize/dequantize pairs after conversion, convolutions downstream of the concatenation nodes inside body.0 through body.2 still receive INT8 activations despite the blocks being nominally FP32, and PSNR is measurably worse.
Calibration uses 100 randomly sampled Urban100 images as 128x128 center crops, matching the model's export tile size.
- Sample input:
sample_input.jpgis derived from Living room (Unsplash) by Jarosław Ceborski, via Wikimedia Commons (CC0 1.0).
About this version
Original Model: kadirnar/RRDB_PSNR_x4 by ESRGAN (Xintao Wang et al.) - Repository
Optimization/conversion: Arm-Optimized version for execution on Arm-based platforms.
Converted/optimized by: Arm
License: The Original Model and the Optimized Model are subject to Apache-2.0.
This repository contains a converted or optimized version of the Original Model (the “Optimized Model”). The Original Model has been converted or optimized as described above for execution on Arm-based platforms.
No retraining or fine-tuning of the Original Model was performed as part of the conversion or optimization. The conversion or optimization was not intended to change the Original Model’s behavior or intended use.
Original Model and Documentation
For information about the Original Model, including its development, training data, intended uses, limitations and other relevant information, please refer to the Original Model repository. Information in that repository was provided by the original developer or other third parties and, unless expressly stated otherwise, has not been independently verified by Arm.
Licenses and Third-Party Terms
Use of the Original Model and the Optimized Model is subject to the applicable licenses, usage restrictions and other terms identified above and in the relevant repositories. Publication of the Optimized Model does not grant any rights beyond those provided under the applicable license terms.
You are responsible for reviewing those terms and ensuring that your use of the Original Model and the Optimized Model is permitted.
Purpose of this Release
The Optimized Model is provided as a reference implementation to demonstrate and evaluate execution and performance on Arm-based systems. It is not a production-ready or supported solution.
Arm’s publication of the Optimized Model does not constitute an endorsement or certification of the Original Model or a representation that the Optimized Model is suitable for production use or any particular purpose.
To the fullest extent permitted by applicable law (i) the Optimized Model is provided “as is.” Arm makes no representations or warranties that the Original Model, the Optimized Model or their outputs are accurate, safe, secure, non-infringing, legally compliant, suitable for production use or fit for any particular purpose; and (ii) Arm will not be liable for any loss or damage arising from or in connection with the Optimized Model, its use or its outputs.
You are responsible for independently evaluating the Optimized Model, its outputs and its suitability for your intended use, including compliance with applicable legal, regulatory, safety and security requirements.
Arm does not commit to provide ongoing support, maintenance or updates for the Optimized Model. Any use of or reliance on the Optimized Model or its outputs is at your own risk.
- Downloads last month
- 48
Model tree for Arm/esrgan-int8-xnnpack-executorch-graviton-g4
Base model
kadirnar/RRDB_PSNR_x4