--- 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.50.2/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.50.2/real_esrgan_x4plus-onnx-w8a8.zip) | QNN_DLC | float | Universal | QAIRT 2.43 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/real_esrgan_x4plus/releases/v0.50.2/real_esrgan_x4plus-qnn_dlc-float.zip) | QNN_DLC | w8a8 | Universal | QAIRT 2.43 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/real_esrgan_x4plus/releases/v0.50.2/real_esrgan_x4plus-qnn_dlc-w8a8.zip) | TFLITE | float | Universal | QAIRT 2.43, TFLite 2.19.1 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/real_esrgan_x4plus/releases/v0.50.2/real_esrgan_x4plus-tflite-float.zip) | TFLITE | w8a8 | Universal | QAIRT 2.43, TFLite 2.19.1 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/real_esrgan_x4plus/releases/v0.50.2/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 | 27.148 ms | 7 - 353 MB | NPU | Real-ESRGAN-x4plus | ONNX | float | Snapdragon® X2 Elite | 34.497 ms | 37 - 37 MB | NPU | Real-ESRGAN-x4plus | ONNX | float | Snapdragon® X Elite | 65.54 ms | 37 - 37 MB | NPU | Real-ESRGAN-x4plus | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 49.534 ms | 7 - 794 MB | NPU | Real-ESRGAN-x4plus | ONNX | float | Qualcomm® QCS8550 (Proxy) | 68.98 ms | 0 - 45 MB | NPU | Real-ESRGAN-x4plus | ONNX | float | Qualcomm® QCS9075 | 107.562 ms | 7 - 10 MB | NPU | Real-ESRGAN-x4plus | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 38.28 ms | 7 - 352 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 9.117 ms | 2 - 495 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Snapdragon® X2 Elite | 10.344 ms | 23 - 23 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Snapdragon® X Elite | 26.258 ms | 21 - 21 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Snapdragon® 8 Gen 3 Mobile | 16.978 ms | 2 - 786 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Qualcomm® QCS8550 (Proxy) | 24.933 ms | 0 - 359 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Qualcomm® QCS9075 | 30.918 ms | 2 - 4 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 12.612 ms | 2 - 484 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 24.999 ms | 0 - 328 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Snapdragon® X2 Elite | 34.426 ms | 0 - 0 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Snapdragon® X Elite | 64.997 ms | 0 - 0 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 49.155 ms | 0 - 751 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 452.17 ms | 0 - 348 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 62.625 ms | 0 - 311 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Qualcomm® SA8775P | 105.542 ms | 0 - 348 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Qualcomm® QCS9075 | 108.933 ms | 0 - 5 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 111.827 ms | 0 - 757 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Qualcomm® SA7255P | 452.17 ms | 0 - 348 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Qualcomm® SA8295P | 111.249 ms | 0 - 357 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 37.758 ms | 0 - 327 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 9.41 ms | 0 - 430 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Snapdragon® X2 Elite | 10.829 ms | 0 - 0 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Snapdragon® X Elite | 25.829 ms | 0 - 0 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Snapdragon® 8 Gen 3 Mobile | 16.655 ms | 0 - 699 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® QCS6490 | 109.805 ms | 0 - 2 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® QCS8275 (Proxy) | 68.882 ms | 0 - 477 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® QCS8550 (Proxy) | 24.352 ms | 0 - 3 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® SA8775P | 22.926 ms | 0 - 476 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® QCS9075 | 29.723 ms | 0 - 2 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® QCM6690 | 481.537 ms | 0 - 464 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® QCS8450 (Proxy) | 38.159 ms | 0 - 729 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® SA7255P | 68.882 ms | 0 - 477 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® SA8295P | 36.238 ms | 0 - 485 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 12.473 ms | 0 - 418 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Snapdragon® 7 Gen 4 Mobile | 38.824 ms | 0 - 484 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 28.18 ms | 1 - 369 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 49.482 ms | 3 - 795 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 452.366 ms | 3 - 391 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 59.92 ms | 3 - 6 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Qualcomm® SA8775P | 105.753 ms | 3 - 391 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Qualcomm® QCS9075 | 109.263 ms | 3 - 46 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 114.323 ms | 4 - 783 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Qualcomm® SA7255P | 452.366 ms | 3 - 391 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Qualcomm® SA8295P | 110.504 ms | 3 - 396 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 37.78 ms | 3 - 363 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 7.873 ms | 1 - 502 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Snapdragon® 8 Gen 3 Mobile | 13.817 ms | 1 - 673 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® QCS6490 | 93.568 ms | 1 - 26 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® QCS8275 (Proxy) | 64.857 ms | 1 - 446 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® QCS8550 (Proxy) | 18.672 ms | 1 - 5 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® SA8775P | 18.435 ms | 1 - 446 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® QCS9075 | 25.743 ms | 0 - 25 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® QCM6690 | 437.568 ms | 1 - 441 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® QCS8450 (Proxy) | 37.165 ms | 1 - 681 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® SA7255P | 64.857 ms | 1 - 446 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® SA8295P | 34.921 ms | 1 - 444 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 11.814 ms | 1 - 475 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Snapdragon® 7 Gen 4 Mobile | 32.936 ms | 1 - 451 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).