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.51, ONNX Runtime 1.30.0 | Download |
| QNN_DLC | float | Universal | QAIRT 2.51 | Download |
| TFLITE | float | Universal | QAIRT 2.51 | 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:
- Input resolution: 512x512
- Model checkpoint: Dilated CelebAHQ
- Model size (float): 174 MB
- Number of parameters: 45.6M
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 For Galaxy Mobile | 34.535 ms | 5 - 382 MB | NPU |
| LaMa-Dilated | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 43.058 ms | 7 - 365 MB | NPU |
| LaMa-Dilated | ONNX | float | Snapdragon® X2 Elite | 35.602 ms | 8 - 8 MB | NPU |
| LaMa-Dilated | ONNX | float | Snapdragon® X Elite | 77.013 ms | 91 - 91 MB | NPU |
| LaMa-Dilated | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 54.47 ms | 1 - 434 MB | NPU |
| LaMa-Dilated | ONNX | float | Snapdragon® 8 Gen 1 Mobile | 110.314 ms | 1 - 414 MB | NPU |
| LaMa-Dilated | ONNX | float | Qualcomm® Dragonwing™ IQ-8275 | 123.152 ms | 6 - 14 MB | NPU |
| LaMa-Dilated | ONNX | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 77.389 ms | 0 - 94 MB | NPU |
| LaMa-Dilated | ONNX | float | Qualcomm® QCS8450 | 110.314 ms | 1 - 414 MB | NPU |
| LaMa-Dilated | ONNX | float | Qualcomm® Dragonwing™ IQ-9075 | 107.083 ms | 7 - 15 MB | NPU |
| LaMa-Dilated | ONNX | float | Qualcomm® Dragonwing™ IQ-X7181 | 77.013 ms | 91 - 91 MB | NPU |
| LaMa-Dilated | ONNX | float | Qualcomm® Dragonwing™ Q-8750 | 43.058 ms | 7 - 365 MB | NPU |
| LaMa-Dilated | ONNX | float | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 28.424 ms | 10 - 364 MB | NPU |
| LaMa-Dilated | ONNX | float | Snapdragon® 8 Elite Gen 6 Mobile | 30.92 ms | 1 - 363 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 33.751 ms | 1 - 359 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 41.413 ms | 1 - 339 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Snapdragon® X2 Elite | 35.859 ms | 4 - 4 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Snapdragon® X Elite | 78.504 ms | 4 - 4 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 53.486 ms | 0 - 423 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Snapdragon® 8 Gen 1 Mobile | 109.29 ms | 2 - 368 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-8275 | 123.287 ms | 4 - 14 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 79.675 ms | 4 - 6 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® QCS8450 | 109.29 ms | 2 - 368 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-9075 | 109.519 ms | 6 - 15 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-X7181 | 78.504 ms | 4 - 4 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® Dragonwing™ Q-8750 | 41.413 ms | 1 - 339 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Qualcomm® SA8295P | 111.468 ms | 1 - 281 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 27.728 ms | 4 - 342 MB | NPU |
| LaMa-Dilated | QNN_DLC | float | Snapdragon® 8 Elite Gen 6 Mobile | 31.147 ms | 3 - 349 MB | NPU |
| LaMa-Dilated | TFLITE | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 33.983 ms | 3 - 375 MB | NPU |
| LaMa-Dilated | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 41.777 ms | 2 - 353 MB | NPU |
| LaMa-Dilated | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 54.715 ms | 3 - 503 MB | NPU |
| LaMa-Dilated | TFLITE | float | Snapdragon® 8 Gen 1 Mobile | 107.859 ms | 3 - 445 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® Dragonwing™ IQ-8275 | 123.08 ms | 3 - 106 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 80.952 ms | 3 - 132 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® SA8775P | 110.691 ms | 3 - 354 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® SA8650P | 110.691 ms | 3 - 354 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® SA8255P | 110.691 ms | 3 - 354 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® QCS8450 | 107.859 ms | 3 - 445 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® Dragonwing™ IQ-9075 | 109.567 ms | 2 - 105 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® Dragonwing™ Q-8750 | 41.777 ms | 2 - 353 MB | NPU |
| LaMa-Dilated | TFLITE | float | Qualcomm® SA8295P | 112.668 ms | 3 - 295 MB | NPU |
| LaMa-Dilated | TFLITE | float | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 27.948 ms | 1 - 355 MB | NPU |
| LaMa-Dilated | TFLITE | float | Snapdragon® 8 Elite Gen 6 Mobile | 31.125 ms | 3 - 366 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.
