--- library_name: pytorch license: other tags: - android pipeline_tag: image-to-image --- ![](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/real_esrgan_x4plus/web-assets/model_demo.png) # Real-ESRGAN-x4plus: Optimized for Qualcomm Devices Real-ESRGAN is a machine learning model that upscales an image with minimal loss in quality. The implementation is a derivative of the Real-ESRGAN-x4plus architecture, a larger and more powerful version compared to the Real-ESRGAN-general-x4v3 architecture. This is based on the implementation of Real-ESRGAN-x4plus found [here](https://github.com/xinntao/Real-ESRGAN). This repository contains pre-exported model files optimized for Qualcomm® devices. You can use the [Qualcomm® AI Hub Models](https://github.com/qualcomm/ai-hub-models/blob/main/src/qai_hub_models/models/real_esrgan_x4plus) library to export with custom configurations. More details on model performance across various devices, can be found [here](#performance-summary). Qualcomm AI Hub Models uses [Qualcomm AI Hub Workbench](https://workbench.aihub.qualcomm.com) to compile, profile, and evaluate this model. [Sign up](https://myaccount.qualcomm.com/signup) to run these models on a hosted Qualcomm® device. ## Getting Started There are two ways to deploy this model on your device: ### Option 1: Download Pre-Exported Models Below are pre-exported model assets ready for deployment. | Runtime | Precision | Chipset | SDK Versions | Download | |---|---|---|---|---| | ONNX | float | Universal | QAIRT 2.42, ONNX Runtime 1.24.3 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/real_esrgan_x4plus/releases/v0.54.0/real_esrgan_x4plus-onnx-float.zip) | ONNX | w8a8 | Universal | QAIRT 2.42, ONNX Runtime 1.24.3 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/real_esrgan_x4plus/releases/v0.54.0/real_esrgan_x4plus-onnx-w8a8.zip) | QNN_DLC | float | Universal | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/real_esrgan_x4plus/releases/v0.54.0/real_esrgan_x4plus-qnn_dlc-float.zip) | QNN_DLC | w8a8 | Universal | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/real_esrgan_x4plus/releases/v0.54.0/real_esrgan_x4plus-qnn_dlc-w8a8.zip) | TFLITE | float | Universal | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/real_esrgan_x4plus/releases/v0.54.0/real_esrgan_x4plus-tflite-float.zip) | TFLITE | w8a8 | Universal | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/real_esrgan_x4plus/releases/v0.54.0/real_esrgan_x4plus-tflite-w8a8.zip) For more device-specific assets and performance metrics, visit **[Real-ESRGAN-x4plus on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/real_esrgan_x4plus)**. ### Option 2: Export with Custom Configurations Use the [Qualcomm® AI Hub Models](https://github.com/qualcomm/ai-hub-models/blob/main/src/qai_hub_models/models/real_esrgan_x4plus) Python library to compile and export the model with your own: - Custom weights (e.g., fine-tuned checkpoints) - Custom input shapes - Target device and runtime configurations This option is ideal if you need to customize the model beyond the default configuration provided here. See our repository for [Real-ESRGAN-x4plus on GitHub](https://github.com/qualcomm/ai-hub-models/blob/main/src/qai_hub_models/models/real_esrgan_x4plus) for usage instructions. ## Model Details **Model Type:** Model_use_case.super_resolution **Model Stats:** - Model checkpoint: RealESRGAN_x4plus - Input resolution: 128x128 - Number of parameters: 16.7M - Model size (float): 63.9 MB - Model size (w8a8): 16.7 MB ## Performance Summary | Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit |---|---|---|---|---|---|--- | Real-ESRGAN-x4plus | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 26.646 ms | 7 - 353 MB | NPU | Real-ESRGAN-x4plus | ONNX | float | Snapdragon® 8 Elite Mobile | 38.148 ms | 7 - 351 MB | NPU | Real-ESRGAN-x4plus | ONNX | float | Snapdragon® X2 Elite | 34.545 ms | 37 - 37 MB | NPU | Real-ESRGAN-x4plus | ONNX | float | Snapdragon® X Elite | 65.579 ms | 37 - 37 MB | NPU | Real-ESRGAN-x4plus | ONNX | float | Snapdragon® X Elite | 65.579 ms | 37 - 37 MB | NPU | Real-ESRGAN-x4plus | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 51.64 ms | 9 - 801 MB | NPU | Real-ESRGAN-x4plus | ONNX | float | Qualcomm® QCS8550 (Proxy) | 69.166 ms | 0 - 44 MB | NPU | Real-ESRGAN-x4plus | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 38.148 ms | 7 - 351 MB | NPU | Real-ESRGAN-x4plus | ONNX | float | Qualcomm® QCS9075 | 107.407 ms | 6 - 9 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 9.122 ms | 2 - 498 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Snapdragon® 8 Elite Mobile | 12.63 ms | 2 - 487 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Snapdragon® X2 Elite | 10.339 ms | 23 - 23 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Snapdragon® X Elite | 26.232 ms | 21 - 21 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Snapdragon® X Elite | 26.232 ms | 21 - 21 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Snapdragon® 8 Gen 3 Mobile | 17.001 ms | 2 - 786 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Qualcomm® QCS8550 (Proxy) | 24.935 ms | 0 - 30 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Qualcomm® QCS9075 | 30.533 ms | 2 - 4 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 12.63 ms | 2 - 487 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 25.145 ms | 0 - 331 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Snapdragon® 8 Elite Mobile | 37.735 ms | 0 - 334 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Snapdragon® X2 Elite | 34.501 ms | 0 - 0 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Snapdragon® X Elite | 64.972 ms | 0 - 0 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Snapdragon® X Elite | 64.972 ms | 0 - 0 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 48.622 ms | 0 - 707 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 64.803 ms | 0 - 4 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Qualcomm® SA8775P | 105.552 ms | 0 - 353 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Qualcomm® SA8775P | 105.552 ms | 0 - 353 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Qualcomm® SA8775P | 105.552 ms | 0 - 353 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Qualcomm® SA7255P | 452.107 ms | 0 - 352 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 112.4 ms | 1 - 710 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Qualcomm® SA8295P | 111.272 ms | 0 - 359 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 37.735 ms | 0 - 334 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Qualcomm® QCS9075 | 108.883 ms | 0 - 5 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 9.079 ms | 0 - 436 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Snapdragon® 8 Elite Mobile | 12.298 ms | 0 - 424 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Snapdragon® X2 Elite | 10.385 ms | 0 - 0 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Snapdragon® X Elite | 25.877 ms | 0 - 0 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Snapdragon® X Elite | 25.877 ms | 0 - 0 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Snapdragon® 8 Gen 3 Mobile | 16.774 ms | 0 - 687 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® QCS6490 | 110.031 ms | 0 - 2 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® QCS8550 (Proxy) | 24.502 ms | 0 - 4 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® SA8775P | 22.828 ms | 0 - 486 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® SA8775P | 22.828 ms | 0 - 486 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® SA8775P | 22.828 ms | 0 - 486 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® QCS9075 | 31.104 ms | 0 - 2 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 12.298 ms | 0 - 424 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® QCS8450 (Proxy) | 39.499 ms | 0 - 719 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® SA7255P | 68.994 ms | 0 - 486 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Snapdragon® 7 Gen 4 Mobile | 38.61 ms | 0 - 487 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® QCM6690 | 481.354 ms | 0 - 462 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® SA8295P | 36.425 ms | 0 - 496 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Snapdragon® 7 Gen 4 Mobile | 38.61 ms | 0 - 487 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 26.12 ms | 3 - 370 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Snapdragon® 8 Elite Mobile | 37.651 ms | 3 - 366 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 49.516 ms | 3 - 749 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 63.403 ms | 3 - 6 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Qualcomm® SA8775P | 105.883 ms | 3 - 394 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Qualcomm® SA8775P | 105.883 ms | 3 - 394 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Qualcomm® SA8775P | 105.883 ms | 3 - 394 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Qualcomm® SA7255P | 452.665 ms | 3 - 394 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 115.589 ms | 3 - 731 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Qualcomm® SA8295P | 110.485 ms | 3 - 391 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 37.651 ms | 3 - 366 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Qualcomm® QCS9075 | 109.563 ms | 1 - 45 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 7.607 ms | 1 - 506 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Snapdragon® 8 Elite Mobile | 11.705 ms | 1 - 480 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Snapdragon® 8 Gen 3 Mobile | 13.888 ms | 1 - 654 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® QCS6490 | 93.625 ms | 1 - 26 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® QCS8550 (Proxy) | 19.885 ms | 1 - 4 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® SA8775P | 18.266 ms | 1 - 451 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® SA8775P | 18.266 ms | 1 - 451 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® SA8775P | 18.266 ms | 1 - 451 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® QCS9075 | 25.437 ms | 0 - 25 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 11.705 ms | 1 - 480 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® QCS8450 (Proxy) | 35.668 ms | 1 - 664 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® SA7255P | 64.858 ms | 1 - 448 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Snapdragon® 7 Gen 4 Mobile | 33.046 ms | 1 - 449 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® QCM6690 | 439.371 ms | 1 - 437 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® SA8295P | 34.543 ms | 1 - 447 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Snapdragon® 7 Gen 4 Mobile | 33.046 ms | 1 - 449 MB | NPU ## License * The license for the original implementation of Real-ESRGAN-x4plus can be found [here](https://github.com/xinntao/Real-ESRGAN/blob/master/LICENSE). ## References * [Real-ESRGAN: Training Real-World Blind Super-Resolution with Pure Synthetic Data](https://arxiv.org/abs/2107.10833) * [Source Model Implementation](https://github.com/xinntao/Real-ESRGAN) ## Community * Join [our AI Hub Slack community](https://aihub.qualcomm.com/community/slack) to collaborate, post questions and learn more about on-device AI. * For questions or feedback please [reach out to us](mailto:ai-hub-support@qti.qualcomm.com).