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.3 | Download |
| QNN_DLC | float | Universal | QAIRT 2.45 | Download |
| TFLITE | float | Universal | QAIRT 2.45 | 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® 8 Elite Gen 5 Mobile | 34.707 ms | 0 - 386 MB | NPU |
| LaMa-Dilated | ONNX | float | Snapdragon® 8 Elite Mobile | 41.792 ms | 7 - 425 MB | NPU |
| LaMa-Dilated | ONNX | float | Snapdragon® X2 Elite | 36.594 ms | 90 - 90 MB | NPU |
| LaMa-Dilated | ONNX | float | Snapdragon® X Elite | 78.233 ms | 89 - 89 MB | NPU |
| LaMa-Dilated | ONNX | float | Snapdragon® X Elite | 78.233 ms | 89 - 89 MB | NPU |
| LaMa-Dilated | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 55.786 ms | 0 - 489 MB | NPU |
| LaMa-Dilated | ONNX | float | Qualcomm® QCS8550 (Proxy) | 78.035 ms | 0 - 96 MB | NPU |
| LaMa-Dilated | ONNX | float | Qualcomm® QCS9075 | 117.926 ms | 6 - 13 MB | NPU |
| LaMa-Dilated | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 41.792 ms | 7 - 425 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 32.664 ms | 4 - 391 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Snapdragon® 8 Elite Mobile | 40.438 ms | 1 - 365 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Snapdragon® X2 Elite | 34.126 ms | 4 - 4 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Snapdragon® X Elite | 75.357 ms | 4 - 4 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Snapdragon® X Elite | 75.357 ms | 4 - 4 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 52.594 ms | 0 - 455 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 402.982 ms | 1 - 364 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 74.822 ms | 4 - 6 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® SA8775P | 106.966 ms | 1 - 364 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® SA8775P | 106.966 ms | 1 - 364 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® SA8775P | 106.966 ms | 1 - 364 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® QCS9075 | 118.032 ms | 4 - 13 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 134.778 ms | 4 - 409 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® SA7255P | 402.982 ms | 1 - 364 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® SA8295P | 109.521 ms | 1 - 299 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 40.438 ms | 1 - 365 MB | NPU |
| LaMa-Dilated | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 32.225 ms | 1 - 409 MB | NPU |
| LaMa-Dilated | TFLITE | float | Snapdragon® 8 Elite Mobile | 40.232 ms | 2 - 389 MB | NPU |
| LaMa-Dilated | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 52.546 ms | 2 - 537 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 404.195 ms | 3 - 381 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 74.173 ms | 3 - 133 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® SA8775P | 106.487 ms | 3 - 380 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® SA8775P | 106.487 ms | 3 - 380 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® SA8775P | 106.487 ms | 3 - 380 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® QCS9075 | 118.569 ms | 2 - 104 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 133.429 ms | 3 - 459 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® SA7255P | 404.195 ms | 3 - 381 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® SA8295P | 110.158 ms | 3 - 311 MB | NPU |
| LaMa-Dilated | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 40.232 ms | 2 - 389 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.
