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.37, ONNX Runtime 1.23.0 | Download |
| QNN_DLC | float | Universal | QAIRT 2.42 | Download |
| TFLITE | float | Universal | QAIRT 2.42, 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® X Elite | 76.578 ms | 90 - 90 MB | NPU |
| LaMa-Dilated | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 53.225 ms | 12 - 426 MB | NPU |
| LaMa-Dilated | ONNX | float | Qualcomm® QCS8550 (Proxy) | 76.366 ms | 0 - 94 MB | NPU |
| LaMa-Dilated | ONNX | float | Qualcomm® QCS9075 | 115.895 ms | 6 - 13 MB | NPU |
| LaMa-Dilated | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 41.157 ms | 6 - 345 MB | NPU |
| LaMa-Dilated | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 32.789 ms | 10 - 315 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Snapdragon® X Elite | 74.997 ms | 4 - 4 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 52.976 ms | 0 - 468 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 402.698 ms | 1 - 360 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 75.574 ms | 4 - 7 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® SA8775P | 495.25 ms | 2 - 360 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® QCS9075 | 119.61 ms | 4 - 13 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 135.779 ms | 2 - 416 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® SA7255P | 402.698 ms | 1 - 360 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® SA8295P | 113.567 ms | 1 - 345 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 39.956 ms | 1 - 363 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 32.369 ms | 1 - 385 MB | NPU |
| LaMa-Dilated | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 52.512 ms | 1 - 551 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 402.766 ms | 3 - 376 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 73.442 ms | 3 - 132 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® SA8775P | 105.688 ms | 0 - 373 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® QCS9075 | 119.496 ms | 1 - 103 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 137.336 ms | 4 - 496 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® SA7255P | 402.766 ms | 3 - 376 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® SA8295P | 109.358 ms | 3 - 329 MB | NPU |
| LaMa-Dilated | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 40.128 ms | 0 - 372 MB | NPU |
| LaMa-Dilated | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 32.395 ms | 2 - 405 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.
