ControlNet-Canny: Optimized for Qualcomm Devices
On-device, high-resolution image synthesis from text and image prompts. ControlNet guides Stable-diffusion with provided input image to generate accurate images from given input prompt.
This is based on the implementation of ControlNet-Canny 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 |
|---|---|---|---|---|
| PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | QAIRT 2.42, ONNX Runtime 1.25.0 | Download |
| PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® X2 Elite | QAIRT 2.42, ONNX Runtime 1.25.0 | Download |
| PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® X Elite | QAIRT 2.42, ONNX Runtime 1.25.0 | Download |
| PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | QAIRT 2.42, ONNX Runtime 1.25.0 | Download |
| PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS8550 (Proxy) | QAIRT 2.42, ONNX Runtime 1.25.0 | Download |
| PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | QAIRT 2.42, ONNX Runtime 1.25.0 | Download |
| PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | QAIRT 2.42, ONNX Runtime 1.25.0 | Download |
| PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCM6690 | QAIRT 2.42, ONNX Runtime 1.25.0 | Download |
| PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS9075 | QAIRT 2.42, ONNX Runtime 1.25.0 | Download |
| QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | QAIRT 2.45 | Download |
| QNN_CONTEXT_BINARY | w8a16 | Snapdragon® X2 Elite | QAIRT 2.45 | Download |
| QNN_CONTEXT_BINARY | w8a16 | Snapdragon® X Elite | QAIRT 2.45 | Download |
| QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 8 Gen 3 Mobile | QAIRT 2.45 | Download |
| QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS8550 (Proxy) | QAIRT 2.45 | Download |
| QNN_CONTEXT_BINARY | w8a16 | Qualcomm® SA8775P | QAIRT 2.45 | Download |
| QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | QAIRT 2.45 | Download |
| QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 7 Gen 4 Mobile | QAIRT 2.45 | Download |
| QNN_CONTEXT_BINARY | w8a16 | Qualcomm® SA7255P | QAIRT 2.45 | Download |
| QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCM6690 | QAIRT 2.45 | Download |
| QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS9075 | QAIRT 2.45 | Download |
For more device-specific assets and performance metrics, visit ControlNet-Canny 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 ControlNet-Canny on GitHub for usage instructions.
Model Details
Model Type: Model_use_case.image_generation
Model Stats:
- Input: Text prompt and input image as a reference
- Conditioning Input: Canny-Edge
- Text Encoder Number of parameters: 340M
- UNet Number of parameters: 865M
- VAE Decoder Number of parameters: 83M
- ControlNet Number of parameters: 361M
- Model size: 1.4GB
Performance Summary
| Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit |
|---|---|---|---|---|---|---|
| controlnet | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 28.363 ms | 31 - 41 MB | NPU |
| controlnet | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® X2 Elite | 28.852 ms | 33 - 33 MB | NPU |
| controlnet | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® X Elite | 75.888 ms | 352 - 352 MB | NPU |
| controlnet | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 64.792 ms | 33 - 42 MB | NPU |
| controlnet | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS8550 (Proxy) | 81.737 ms | 31 - 32 MB | NPU |
| controlnet | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 122.991 ms | 32 - 39 MB | NPU |
| controlnet | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 49.723 ms | 33 - 43 MB | NPU |
| controlnet | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS9075 | 75.954 ms | 32 - 37 MB | NPU |
| controlnet | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCM6690 | 1063.379 ms | 0 - 10 MB | NPU |
| controlnet | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS7790 | 122.991 ms | 32 - 39 MB | NPU |
| controlnet | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS8750 | 49.723 ms | 33 - 43 MB | NPU |
| controlnet | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS7181 | 75.888 ms | 352 - 352 MB | NPU |
| controlnet | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 28.35 ms | 2 - 11 MB | NPU |
| controlnet | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® X2 Elite | 29.514 ms | 2 - 2 MB | NPU |
| controlnet | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® X Elite | 71.137 ms | 2 - 2 MB | NPU |
| controlnet | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 8 Gen 3 Mobile | 56.943 ms | 9 - 16 MB | NPU |
| controlnet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS8275 | 138.004 ms | 0 - 7 MB | NPU |
| controlnet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS8550 (Proxy) | 73.953 ms | 2 - 3 MB | NPU |
| controlnet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® SA8775P | 70.385 ms | 2 - 10 MB | NPU |
| controlnet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® SA8650P | 70.385 ms | 2 - 10 MB | NPU |
| controlnet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® SA8255P | 70.385 ms | 2 - 10 MB | NPU |
| controlnet | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 7 Gen 4 Mobile | 119.265 ms | 2 - 8 MB | NPU |
| controlnet | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 43.578 ms | 2 - 15 MB | NPU |
| controlnet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS9075 | 70.395 ms | 0 - 16 MB | NPU |
| controlnet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCM6690 | 786.291 ms | 0 - 6 MB | NPU |
| controlnet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® SA7255P | 138.004 ms | 0 - 7 MB | NPU |
| controlnet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS7790 | 119.265 ms | 2 - 8 MB | NPU |
| controlnet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS8750 | 43.578 ms | 2 - 15 MB | NPU |
| controlnet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS7181 | 71.137 ms | 2 - 2 MB | NPU |
| text_encoder | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 1.494 ms | 0 - 9 MB | NPU |
| text_encoder | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® X2 Elite | 1.536 ms | 1 - 1 MB | NPU |
| text_encoder | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® X Elite | 3.427 ms | 156 - 156 MB | NPU |
| text_encoder | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 2.308 ms | 0 - 6 MB | NPU |
| text_encoder | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS8550 (Proxy) | 3.24 ms | 0 - 162 MB | NPU |
| text_encoder | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 3.625 ms | 0 - 7 MB | NPU |
| text_encoder | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 1.752 ms | 0 - 12 MB | NPU |
| text_encoder | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS9075 | 3.343 ms | 0 - 3 MB | NPU |
| text_encoder | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCM6690 | 22.065 ms | 0 - 6 MB | NPU |
| text_encoder | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS7790 | 3.625 ms | 0 - 7 MB | NPU |
| text_encoder | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS8750 | 1.752 ms | 0 - 12 MB | NPU |
| text_encoder | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS7181 | 3.427 ms | 156 - 156 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 1.546 ms | 0 - 10 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® X2 Elite | 1.726 ms | 0 - 0 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® X Elite | 3.636 ms | 0 - 0 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 8 Gen 3 Mobile | 2.317 ms | 0 - 7 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS8275 | 7.486 ms | 0 - 8 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS8550 (Proxy) | 3.267 ms | 0 - 1 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® SA8775P | 3.496 ms | 0 - 9 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® SA8650P | 3.496 ms | 0 - 9 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® SA8255P | 3.496 ms | 0 - 9 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 7 Gen 4 Mobile | 3.669 ms | 0 - 6 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 1.752 ms | 0 - 13 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS9075 | 3.33 ms | 2 - 4 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCM6690 | 23.107 ms | 0 - 6 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® SA7255P | 7.486 ms | 0 - 8 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS7790 | 3.669 ms | 0 - 6 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS8750 | 1.752 ms | 0 - 13 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS7181 | 3.636 ms | 0 - 0 MB | NPU |
| unet | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 45.449 ms | 13 - 23 MB | NPU |
| unet | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® X2 Elite | 48.916 ms | 13 - 13 MB | NPU |
| unet | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® X Elite | 114.253 ms | 829 - 829 MB | NPU |
| unet | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 82.925 ms | 13 - 26 MB | NPU |
| unet | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS8550 (Proxy) | 112.658 ms | 13 - 15 MB | NPU |
| unet | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 181.0 ms | 13 - 24 MB | NPU |
| unet | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 60.889 ms | 6 - 17 MB | NPU |
| unet | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS9075 | 106.635 ms | 12 - 28 MB | NPU |
| unet | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCM6690 | 2175.23 ms | 13 - 23 MB | NPU |
| unet | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS7790 | 181.0 ms | 13 - 24 MB | NPU |
| unet | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS8750 | 60.889 ms | 6 - 17 MB | NPU |
| unet | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS7181 | 114.253 ms | 829 - 829 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 46.657 ms | 13 - 21 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® X2 Elite | 47.285 ms | 13 - 13 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® X Elite | 114.386 ms | 13 - 13 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 8 Gen 3 Mobile | 81.913 ms | 13 - 20 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS8275 | 266.707 ms | 6 - 13 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS8550 (Proxy) | 112.665 ms | 38 - 39 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® SA8775P | 107.066 ms | 11 - 18 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® SA8650P | 107.066 ms | 11 - 18 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® SA8255P | 107.066 ms | 11 - 18 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 7 Gen 4 Mobile | 178.783 ms | 11 - 17 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 61.738 ms | 6 - 15 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS9075 | 106.642 ms | 11 - 25 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCM6690 | 2167.386 ms | 12 - 23 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® SA7255P | 266.707 ms | 6 - 13 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS7790 | 178.783 ms | 11 - 17 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS8750 | 61.738 ms | 6 - 15 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS7181 | 114.386 ms | 13 - 13 MB | NPU |
| vae | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 117.009 ms | 3 - 12 MB | NPU |
| vae | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® X2 Elite | 125.449 ms | 4 - 4 MB | NPU |
| vae | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® X Elite | 265.756 ms | 63 - 63 MB | NPU |
| vae | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 203.096 ms | 6 - 12 MB | NPU |
| vae | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS8550 (Proxy) | 276.415 ms | 0 - 67 MB | NPU |
| vae | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 513.039 ms | 3 - 9 MB | NPU |
| vae | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 180.21 ms | 4 - 11 MB | NPU |
| vae | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS9075 | 249.871 ms | 3 - 6 MB | NPU |
| vae | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCM6690 | 6342.963 ms | 2 - 8 MB | NPU |
| vae | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS7790 | 513.039 ms | 3 - 9 MB | NPU |
| vae | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS8750 | 180.21 ms | 4 - 11 MB | NPU |
| vae | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS7181 | 265.756 ms | 63 - 63 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 121.27 ms | 0 - 10 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® X2 Elite | 127.289 ms | 0 - 0 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® X Elite | 258.89 ms | 0 - 0 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 8 Gen 3 Mobile | 198.009 ms | 3 - 10 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS8275 | 711.764 ms | 0 - 8 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS8550 (Proxy) | 263.698 ms | 1 - 3 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® SA8775P | 243.936 ms | 0 - 9 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® SA8650P | 243.936 ms | 0 - 9 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® SA8255P | 243.936 ms | 0 - 9 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 7 Gen 4 Mobile | 505.131 ms | 0 - 6 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 172.601 ms | 0 - 13 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS9075 | 240.717 ms | 0 - 3 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCM6690 | 6305.212 ms | 0 - 7 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® SA7255P | 711.764 ms | 0 - 8 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS7790 | 505.131 ms | 0 - 6 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS8750 | 172.601 ms | 0 - 13 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS7181 | 258.89 ms | 0 - 0 MB | NPU |
License
- The license for the original implementation of ControlNet-Canny 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.
Usage and Limitations
This model may not be used for or in connection with any of the following applications:
- Accessing essential private and public services and benefits;
- Administration of justice and democratic processes;
- Assessing or recognizing the emotional state of a person;
- Biometric and biometrics-based systems, including categorization of persons based on sensitive characteristics;
- Education and vocational training;
- Employment and workers management;
- Exploitation of the vulnerabilities of persons resulting in harmful behavior;
- General purpose social scoring;
- Law enforcement;
- Management and operation of critical infrastructure;
- Migration, asylum and border control management;
- Predictive policing;
- Real-time remote biometric identification in public spaces;
- Recommender systems of social media platforms;
- Scraping of facial images (from the internet or otherwise); and/or
- Subliminal manipulation
