--- library_name: pytorch license: bsd-3-clause 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/v0.67.0/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.51, ONNX Runtime 1.30.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/real_esrgan_x4plus/releases/v0.67.0/real_esrgan_x4plus-onnx-float.zip) | ONNX | w8a8 | Universal | QAIRT 2.51, ONNX Runtime 1.30.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/real_esrgan_x4plus/releases/v0.67.0/real_esrgan_x4plus-onnx-w8a8.zip) | QNN_DLC | float | Universal | QAIRT 2.51 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/real_esrgan_x4plus/releases/v0.67.0/real_esrgan_x4plus-qnn_dlc-float.zip) | QNN_DLC | w8a8 | Universal | QAIRT 2.51 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/real_esrgan_x4plus/releases/v0.67.0/real_esrgan_x4plus-qnn_dlc-w8a8.zip) | TFLITE | float | Universal | QAIRT 2.51 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/real_esrgan_x4plus/releases/v0.67.0/real_esrgan_x4plus-tflite-float.zip) | TFLITE | w8a8 | Universal | QAIRT 2.51 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/real_esrgan_x4plus/releases/v0.67.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/v0.67.0/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/v0.67.0/src/qai_hub_models/models/real_esrgan_x4plus) for usage instructions. ## Model Details **Model Type:** Model_use_case.super_resolution **Model Stats:** - Input resolution: 128x128 - Model checkpoint: RealESRGAN_x4plus - Model size (float): 63.9 MB - Model size (w8a8): 16.7 MB - Number of parameters: 16.7M ## 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 For Galaxy Mobile | 26.183 ms | 7 - 339 MB | NPU | Real-ESRGAN-x4plus | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 38.42 ms | 7 - 334 MB | NPU | Real-ESRGAN-x4plus | ONNX | float | Snapdragon® X2 Elite | 34.753 ms | 8 - 8 MB | NPU | Real-ESRGAN-x4plus | ONNX | float | Snapdragon® X Elite | 65.36 ms | 38 - 38 MB | NPU | Real-ESRGAN-x4plus | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 49.905 ms | 0 - 718 MB | NPU | Real-ESRGAN-x4plus | ONNX | float | Snapdragon® 8 Gen 1 Mobile | 117.905 ms | 3 - 719 MB | NPU | Real-ESRGAN-x4plus | ONNX | float | Qualcomm® Dragonwing™ IQ-8275 | 127.632 ms | 6 - 11 MB | NPU | Real-ESRGAN-x4plus | ONNX | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 67.814 ms | 0 - 43 MB | NPU | Real-ESRGAN-x4plus | ONNX | float | Qualcomm® QCS8450 | 117.905 ms | 3 - 719 MB | NPU | Real-ESRGAN-x4plus | ONNX | float | Qualcomm® Dragonwing™ IQ-9075 | 105.746 ms | 6 - 10 MB | NPU | Real-ESRGAN-x4plus | ONNX | float | Qualcomm® Dragonwing™ IQ-X7181 | 65.36 ms | 38 - 38 MB | NPU | Real-ESRGAN-x4plus | ONNX | float | Qualcomm® Dragonwing™ Q-8750 | 38.42 ms | 7 - 334 MB | NPU | Real-ESRGAN-x4plus | ONNX | float | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 22.593 ms | 7 - 333 MB | NPU | Real-ESRGAN-x4plus | ONNX | float | Snapdragon® 8 Elite Gen 6 Mobile | 25.05 ms | 0 - 334 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 8.625 ms | 2 - 467 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 11.978 ms | 2 - 457 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Snapdragon® X2 Elite | 9.563 ms | 3 - 3 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Snapdragon® X Elite | 23.563 ms | 22 - 22 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Snapdragon® 8 Gen 3 Mobile | 15.407 ms | 2 - 727 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Snapdragon® 8 Gen 1 Mobile | 37.017 ms | 2 - 740 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Qualcomm® Dragonwing™ QCS6490 | 122.158 ms | 2 - 5 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Qualcomm® Dragonwing™ IQ-8275 | 21.229 ms | 2 - 6 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 22.697 ms | 0 - 27 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Qualcomm® QCS8450 | 37.017 ms | 2 - 740 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Qualcomm® Dragonwing™ IQ-9075 | 20.978 ms | 2 - 5 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Qualcomm® Dragonwing™ IQ-X7181 | 23.563 ms | 22 - 22 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Qualcomm® Dragonwing™ Q-6690 | 551.255 ms | 1 - 538 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Qualcomm® Dragonwing™ Q-7790 | 37.858 ms | 2 - 517 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Qualcomm® Dragonwing™ Q-8750 | 11.978 ms | 2 - 457 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Snapdragon® 7 Gen 4 Mobile | 37.858 ms | 2 - 517 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 6.152 ms | 2 - 315 MB | NPU | Real-ESRGAN-x4plus | ONNX | w8a8 | Snapdragon® 8 Elite Gen 6 Mobile | 7.669 ms | 2 - 447 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 25.355 ms | 0 - 315 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 37.886 ms | 0 - 307 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Snapdragon® X2 Elite | 34.694 ms | 0 - 0 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Snapdragon® X Elite | 64.858 ms | 0 - 0 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 49.348 ms | 0 - 674 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Snapdragon® 8 Gen 1 Mobile | 106.311 ms | 0 - 675 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-8275 | 126.806 ms | 0 - 6 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 62.748 ms | 0 - 3 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Qualcomm® SA8775P | 105.181 ms | 1 - 323 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Qualcomm® SA8650P | 105.181 ms | 1 - 323 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Qualcomm® SA8255P | 105.181 ms | 1 - 323 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Qualcomm® QCS8450 | 106.311 ms | 0 - 675 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-9075 | 105.021 ms | 0 - 6 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-X7181 | 64.858 ms | 0 - 0 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Qualcomm® Dragonwing™ Q-8750 | 37.886 ms | 0 - 307 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Qualcomm® SA8295P | 110.044 ms | 1 - 336 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 21.939 ms | 0 - 308 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | float | Snapdragon® 8 Elite Gen 6 Mobile | 22.898 ms | 0 - 316 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 8.357 ms | 0 - 397 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 11.863 ms | 0 - 384 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Snapdragon® X2 Elite | 9.949 ms | 0 - 0 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Snapdragon® X Elite | 25.012 ms | 0 - 0 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Snapdragon® 8 Gen 3 Mobile | 15.406 ms | 0 - 642 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Snapdragon® 8 Gen 1 Mobile | 36.237 ms | 0 - 654 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® Dragonwing™ QCS6490 | 123.422 ms | 0 - 3 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® Dragonwing™ IQ-8275 | 21.453 ms | 0 - 4 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 23.686 ms | 0 - 3 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® SA8775P | 20.903 ms | 0 - 446 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® SA8650P | 20.903 ms | 0 - 446 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® SA8255P | 20.903 ms | 0 - 446 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® QCS8450 | 36.237 ms | 0 - 654 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® Dragonwing™ IQ-9075 | 21.249 ms | 0 - 3 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® Dragonwing™ IQ-X7181 | 25.012 ms | 0 - 0 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® Dragonwing™ Q-6690 | 580.993 ms | 0 - 461 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® Dragonwing™ Q-7790 | 37.092 ms | 0 - 447 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® Dragonwing™ Q-8750 | 11.863 ms | 0 - 384 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Qualcomm® SA8295P | 35.811 ms | 0 - 449 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Snapdragon® 7 Gen 4 Mobile | 37.092 ms | 0 - 447 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 6.054 ms | 0 - 248 MB | NPU | Real-ESRGAN-x4plus | QNN_DLC | w8a8 | Snapdragon® 8 Elite Gen 6 Mobile | 7.578 ms | 0 - 379 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 25.732 ms | 3 - 348 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 37.475 ms | 3 - 348 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 49.019 ms | 3 - 719 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Snapdragon® 8 Gen 1 Mobile | 107.647 ms | 4 - 710 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Qualcomm® Dragonwing™ IQ-8275 | 127.021 ms | 3 - 47 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 60.607 ms | 3 - 6 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Qualcomm® SA8775P | 105.625 ms | 3 - 369 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Qualcomm® SA8650P | 105.625 ms | 3 - 369 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Qualcomm® SA8255P | 105.625 ms | 3 - 369 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Qualcomm® QCS8450 | 107.647 ms | 4 - 710 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Qualcomm® Dragonwing™ IQ-9075 | 106.44 ms | 3 - 46 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Qualcomm® Dragonwing™ Q-8750 | 37.475 ms | 3 - 348 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Qualcomm® SA7255P | 22519.847 ms | 3 - 42 MB | GPU | Real-ESRGAN-x4plus | TFLITE | float | Qualcomm® SA8295P | 110.889 ms | 3 - 371 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 22.023 ms | 3 - 348 MB | NPU | Real-ESRGAN-x4plus | TFLITE | float | Snapdragon® 8 Elite Gen 6 Mobile | 23.698 ms | 3 - 357 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 7.222 ms | 1 - 439 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 11.271 ms | 1 - 413 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Snapdragon® 8 Gen 3 Mobile | 14.193 ms | 1 - 609 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Snapdragon® 8 Gen 1 Mobile | 36.105 ms | 1 - 610 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® Dragonwing™ QCS6490 | 97.897 ms | 1 - 26 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® Dragonwing™ IQ-8275 | 20.169 ms | 1 - 26 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 19.862 ms | 1 - 4 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® SA8775P | 17.657 ms | 0 - 401 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® SA8650P | 17.657 ms | 0 - 401 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® SA8255P | 17.657 ms | 0 - 401 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® QCS8450 | 36.105 ms | 1 - 610 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® Dragonwing™ IQ-9075 | 17.757 ms | 1 - 25 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® Dragonwing™ Q-6690 | 436.746 ms | 1 - 445 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® Dragonwing™ Q-7790 | 29.875 ms | 1 - 402 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® Dragonwing™ Q-8750 | 11.271 ms | 1 - 413 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Qualcomm® SA8295P | 33.25 ms | 1 - 404 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Snapdragon® 7 Gen 4 Mobile | 29.875 ms | 1 - 402 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 5.922 ms | 1 - 271 MB | NPU | Real-ESRGAN-x4plus | TFLITE | w8a8 | Snapdragon® 8 Elite Gen 6 Mobile | 6.177 ms | 1 - 397 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).