LaMa-Dilated: Optimized for Qualcomm Devices
LaMa-Dilated is a machine learning model that allows to erase and in-paint part of given input image.
This is based on the implementation of LaMa-Dilated found here. This repository contains pre-exported model files optimized for Qualcomm® devices. You can use the Qualcomm® AI Hub Models library to export with custom configurations. More details on model performance across various devices, can be found here.
Qualcomm AI Hub Models uses Qualcomm AI Hub Workbench to compile, profile, and evaluate this model. Sign up 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.1 | Download |
| ONNX | w8a16 | Universal | QAIRT 2.42, ONNX Runtime 1.24.1 | Download |
| QNN_DLC | float | Universal | QAIRT 2.43 | Download |
| QNN_DLC | w8a16 | Universal | QAIRT 2.43 | Download |
| TFLITE | float | Universal | QAIRT 2.43, TFLite 2.17.0 | Download |
For more device-specific assets and performance metrics, visit LaMa-Dilated on Qualcomm® AI Hub.
Option 2: Export with Custom Configurations
Use the Qualcomm® AI Hub Models 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 LaMa-Dilated on GitHub for usage instructions.
Model Details
Model Type: Model_use_case.image_editing
Model Stats:
- Model checkpoint: Dilated CelebAHQ
- Input resolution: 512x512
- Number of parameters: 45.6M
- Model size (float): 174 MB
Performance Summary
| Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit |
|---|---|---|---|---|---|---|
| LaMa-Dilated | ONNX | float | Snapdragon® X2 Elite | 36.363 ms | 90 - 90 MB | NPU |
| LaMa-Dilated | ONNX | float | Snapdragon® X Elite | 78.251 ms | 89 - 89 MB | NPU |
| LaMa-Dilated | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 53.896 ms | 0 - 489 MB | NPU |
| LaMa-Dilated | ONNX | float | Qualcomm® QCS8550 (Proxy) | 79.295 ms | 10 - 14 MB | NPU |
| LaMa-Dilated | ONNX | float | Qualcomm® QCS9075 | 117.484 ms | 6 - 13 MB | NPU |
| LaMa-Dilated | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 41.915 ms | 0 - 409 MB | NPU |
| LaMa-Dilated | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 34.395 ms | 10 - 398 MB | NPU |
| LaMa-Dilated | ONNX | w8a16 | Snapdragon® X2 Elite | 28.023 ms | 50 - 50 MB | NPU |
| LaMa-Dilated | ONNX | w8a16 | Snapdragon® X Elite | 66.547 ms | 50 - 50 MB | NPU |
| LaMa-Dilated | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 44.935 ms | 0 - 719 MB | NPU |
| LaMa-Dilated | ONNX | w8a16 | Qualcomm® QCS6490 | 9901.901 ms | 423 - 433 MB | CPU |
| LaMa-Dilated | ONNX | w8a16 | Qualcomm® QCS8550 (Proxy) | 64.794 ms | 0 - 57 MB | NPU |
| LaMa-Dilated | ONNX | w8a16 | Qualcomm® QCS9075 | 71.715 ms | 3 - 8 MB | NPU |
| LaMa-Dilated | ONNX | w8a16 | Qualcomm® QCM6690 | 4498.097 ms | 371 - 381 MB | CPU |
| LaMa-Dilated | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 32.936 ms | 0 - 464 MB | NPU |
| LaMa-Dilated | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 4516.794 ms | 359 - 370 MB | CPU |
| LaMa-Dilated | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 26.484 ms | 1 - 537 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Snapdragon® X2 Elite | 34.456 ms | 4 - 4 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Snapdragon® X Elite | 75.599 ms | 4 - 4 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 53.053 ms | 6 - 474 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 403.503 ms | 1 - 360 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 75.546 ms | 4 - 7 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® SA8775P | 107.107 ms | 1 - 360 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® QCS9075 | 119.79 ms | 4 - 13 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 134.892 ms | 3 - 416 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® SA7255P | 403.503 ms | 1 - 360 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® SA8295P | 113.807 ms | 1 - 342 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 40.444 ms | 1 - 363 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 31.962 ms | 4 - 390 MB | NPU |
| LaMa-Dilated | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 30.619 ms | 2 - 2 MB | NPU |
| LaMa-Dilated | QNN_DLC | w8a16 | Snapdragon® X Elite | 66.701 ms | 2 - 2 MB | NPU |
| LaMa-Dilated | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 44.212 ms | 0 - 759 MB | NPU |
| LaMa-Dilated | QNN_DLC | w8a16 | Qualcomm® QCS8275 (Proxy) | 132.812 ms | 2 - 614 MB | NPU |
| LaMa-Dilated | QNN_DLC | w8a16 | Qualcomm® QCS8550 (Proxy) | 64.722 ms | 2 - 608 MB | NPU |
| LaMa-Dilated | QNN_DLC | w8a16 | Qualcomm® SA8775P | 65.408 ms | 2 - 614 MB | NPU |
| LaMa-Dilated | QNN_DLC | w8a16 | Qualcomm® QCS9075 | 79.522 ms | 1 - 6 MB | NPU |
| LaMa-Dilated | QNN_DLC | w8a16 | Qualcomm® QCS8450 (Proxy) | 118.248 ms | 1 - 580 MB | NPU |
| LaMa-Dilated | QNN_DLC | w8a16 | Qualcomm® SA7255P | 132.812 ms | 2 - 614 MB | NPU |
| LaMa-Dilated | QNN_DLC | w8a16 | Qualcomm® SA8295P | 90.411 ms | 2 - 434 MB | NPU |
| LaMa-Dilated | QNN_DLC | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 32.534 ms | 2 - 616 MB | NPU |
| LaMa-Dilated | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 27.787 ms | 2 - 765 MB | NPU |
| LaMa-Dilated | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 53.129 ms | 2 - 556 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 404.052 ms | 3 - 375 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 74.284 ms | 0 - 49 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® SA8775P | 495.76 ms | 3 - 375 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® QCS9075 | 119.423 ms | 2 - 104 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 136.832 ms | 4 - 498 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® SA7255P | 404.052 ms | 3 - 375 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® SA8295P | 113.848 ms | 3 - 357 MB | NPU |
| LaMa-Dilated | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 40.722 ms | 2 - 379 MB | NPU |
| LaMa-Dilated | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 32.155 ms | 3 - 401 MB | NPU |
License
- The license for the original implementation of LaMa-Dilated can be found here.
References
Community
- Join our AI Hub Slack community to collaborate, post questions and learn more about on-device AI.
- For questions or feedback please reach out to us.
