--- 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/xlsr/web-assets/model_demo.png) # XLSR: Optimized for Qualcomm Devices XLSR is designed for lightweight real-time upscaling of images. This is based on the implementation of XLSR found [here](https://github.com/quic/aimet-model-zoo/tree/develop/aimet_zoo_torch/xlsr). 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/xlsr) 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/xlsr/releases/v0.51.0/xlsr-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/xlsr/releases/v0.51.0/xlsr-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/xlsr/releases/v0.51.0/xlsr-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/xlsr/releases/v0.51.0/xlsr-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/xlsr/releases/v0.51.0/xlsr-tflite-float.zip) | TFLITE | w8a8 | Universal | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/xlsr/releases/v0.51.0/xlsr-tflite-w8a8.zip) For more device-specific assets and performance metrics, visit **[XLSR on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/xlsr)**. ### 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/xlsr) 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 [XLSR on GitHub](https://github.com/qualcomm/ai-hub-models/blob/main/src/qai_hub_models/models/xlsr) for usage instructions. ## Model Details **Model Type:** Model_use_case.super_resolution **Model Stats:** - Model checkpoint: xlsr_3x_checkpoint - Input resolution: 128x128 - Number of parameters: 28.0K - Model size (float): 115 KB - Model size (w8a8): 45.6 KB ## Performance Summary | Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit |---|---|---|---|---|---|--- | XLSR | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.434 ms | 0 - 22 MB | NPU | XLSR | ONNX | float | Snapdragon® X2 Elite | 0.409 ms | 6 - 6 MB | NPU | XLSR | ONNX | float | Snapdragon® X Elite | 1.077 ms | 8 - 8 MB | NPU | XLSR | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 0.654 ms | 0 - 29 MB | NPU | XLSR | ONNX | float | Qualcomm® QCS8550 (Proxy) | 0.97 ms | 0 - 15 MB | NPU | XLSR | ONNX | float | Qualcomm® QCS9075 | 1.238 ms | 8 - 11 MB | NPU | XLSR | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.511 ms | 0 - 24 MB | NPU | XLSR | ONNX | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 0.24 ms | 0 - 23 MB | NPU | XLSR | ONNX | w8a8 | Snapdragon® X2 Elite | 0.242 ms | 1 - 1 MB | NPU | XLSR | ONNX | w8a8 | Snapdragon® X Elite | 0.664 ms | 3 - 3 MB | NPU | XLSR | ONNX | w8a8 | Snapdragon® 8 Gen 3 Mobile | 0.363 ms | 0 - 30 MB | NPU | XLSR | ONNX | w8a8 | Qualcomm® QCS6490 | 11.679 ms | 20 - 22 MB | CPU | XLSR | ONNX | w8a8 | Qualcomm® QCS8550 (Proxy) | 0.547 ms | 0 - 23 MB | NPU | XLSR | ONNX | w8a8 | Qualcomm® QCS9075 | 0.702 ms | 0 - 3 MB | NPU | XLSR | ONNX | w8a8 | Qualcomm® QCM6690 | 8.444 ms | 20 - 26 MB | CPU | XLSR | ONNX | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 0.279 ms | 0 - 19 MB | NPU | XLSR | ONNX | w8a8 | Snapdragon® 7 Gen 4 Mobile | 6.435 ms | 19 - 26 MB | CPU | XLSR | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.328 ms | 0 - 24 MB | NPU | XLSR | QNN_DLC | float | Snapdragon® X2 Elite | 0.422 ms | 0 - 0 MB | NPU | XLSR | QNN_DLC | float | Snapdragon® X Elite | 0.908 ms | 0 - 0 MB | NPU | XLSR | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 0.461 ms | 0 - 29 MB | NPU | XLSR | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 2.179 ms | 0 - 21 MB | NPU | XLSR | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 0.763 ms | 0 - 16 MB | NPU | XLSR | QNN_DLC | float | Qualcomm® SA8775P | 1.159 ms | 0 - 22 MB | NPU | XLSR | QNN_DLC | float | Qualcomm® QCS9075 | 1.108 ms | 0 - 5 MB | NPU | XLSR | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 1.046 ms | 0 - 30 MB | NPU | XLSR | QNN_DLC | float | Qualcomm® SA7255P | 2.179 ms | 0 - 21 MB | NPU | XLSR | QNN_DLC | float | Qualcomm® SA8295P | 1.389 ms | 0 - 18 MB | NPU | XLSR | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.368 ms | 0 - 26 MB | NPU | XLSR | QNN_DLC | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 0.18 ms | 0 - 24 MB | NPU | XLSR | QNN_DLC | w8a8 | Snapdragon® X2 Elite | 0.264 ms | 0 - 0 MB | NPU | XLSR | QNN_DLC | w8a8 | Snapdragon® X Elite | 0.505 ms | 0 - 0 MB | NPU | XLSR | QNN_DLC | w8a8 | Snapdragon® 8 Gen 3 Mobile | 0.247 ms | 0 - 30 MB | NPU | XLSR | QNN_DLC | w8a8 | Qualcomm® QCS6490 | 1.399 ms | 0 - 2 MB | NPU | XLSR | QNN_DLC | w8a8 | Qualcomm® QCS8275 (Proxy) | 0.917 ms | 0 - 21 MB | NPU | XLSR | QNN_DLC | w8a8 | Qualcomm® QCS8550 (Proxy) | 0.397 ms | 0 - 1 MB | NPU | XLSR | QNN_DLC | w8a8 | Qualcomm® SA8775P | 0.578 ms | 0 - 22 MB | NPU | XLSR | QNN_DLC | w8a8 | Qualcomm® QCS9075 | 0.559 ms | 0 - 2 MB | NPU | XLSR | QNN_DLC | w8a8 | Qualcomm® QCM6690 | 1.6 ms | 0 - 19 MB | NPU | XLSR | QNN_DLC | w8a8 | Qualcomm® QCS8450 (Proxy) | 0.467 ms | 0 - 29 MB | NPU | XLSR | QNN_DLC | w8a8 | Qualcomm® SA7255P | 0.917 ms | 0 - 21 MB | NPU | XLSR | QNN_DLC | w8a8 | Qualcomm® SA8295P | 0.771 ms | 0 - 18 MB | NPU | XLSR | QNN_DLC | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 0.212 ms | 0 - 26 MB | NPU | XLSR | QNN_DLC | w8a8 | Snapdragon® 7 Gen 4 Mobile | 0.411 ms | 0 - 20 MB | NPU | XLSR | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.792 ms | 0 - 25 MB | NPU | XLSR | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 1.412 ms | 0 - 31 MB | NPU | XLSR | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 4.701 ms | 3 - 25 MB | NPU | XLSR | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 2.226 ms | 0 - 7 MB | NPU | XLSR | TFLITE | float | Qualcomm® SA8775P | 2.692 ms | 0 - 23 MB | NPU | XLSR | TFLITE | float | Qualcomm® QCS9075 | 2.602 ms | 3 - 8 MB | NPU | XLSR | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 2.518 ms | 0 - 32 MB | NPU | XLSR | TFLITE | float | Qualcomm® SA7255P | 4.701 ms | 3 - 25 MB | NPU | XLSR | TFLITE | float | Qualcomm® SA8295P | 3.161 ms | 0 - 18 MB | NPU | XLSR | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.976 ms | 0 - 22 MB | NPU | XLSR | TFLITE | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 0.178 ms | 0 - 24 MB | NPU | XLSR | TFLITE | w8a8 | Snapdragon® 8 Gen 3 Mobile | 0.262 ms | 0 - 29 MB | NPU | XLSR | TFLITE | w8a8 | Qualcomm® QCS6490 | 1.066 ms | 0 - 3 MB | NPU | XLSR | TFLITE | w8a8 | Qualcomm® QCS8275 (Proxy) | 0.962 ms | 0 - 21 MB | NPU | XLSR | TFLITE | w8a8 | Qualcomm® QCS8550 (Proxy) | 0.403 ms | 0 - 1 MB | NPU | XLSR | TFLITE | w8a8 | Qualcomm® SA8775P | 0.614 ms | 0 - 22 MB | NPU | XLSR | TFLITE | w8a8 | Qualcomm® QCS9075 | 0.579 ms | 0 - 3 MB | NPU | XLSR | TFLITE | w8a8 | Qualcomm® QCM6690 | 1.604 ms | 0 - 18 MB | NPU | XLSR | TFLITE | w8a8 | Qualcomm® QCS8450 (Proxy) | 0.474 ms | 0 - 30 MB | NPU | XLSR | TFLITE | w8a8 | Qualcomm® SA7255P | 0.962 ms | 0 - 21 MB | NPU | XLSR | TFLITE | w8a8 | Qualcomm® SA8295P | 0.796 ms | 0 - 18 MB | NPU | XLSR | TFLITE | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 0.225 ms | 0 - 21 MB | NPU | XLSR | TFLITE | w8a8 | Snapdragon® 7 Gen 4 Mobile | 0.415 ms | 0 - 19 MB | NPU ## License * The license for the original implementation of XLSR can be found [here](https://github.com/quic/aimet-model-zoo/blob/develop/LICENSE.md). ## References * [Extremely Lightweight Quantization Robust Real-Time Single-Image Super Resolution for Mobile Devices](https://arxiv.org/abs/2105.10288) * [Source Model Implementation](https://github.com/quic/aimet-model-zoo/tree/develop/aimet_zoo_torch/xlsr) ## 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).