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® X2 Elite QAIRT 2.45, ONNX Runtime 1.25.0 Download
PRECOMPILED_QNN_ONNX w8a16 Snapdragon® X Elite QAIRT 2.45, ONNX Runtime 1.25.0 Download
PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Gen 3 Mobile QAIRT 2.45, ONNX Runtime 1.25.0 Download
PRECOMPILED_QNN_ONNX w8a16 Qualcomm® Dragonwing™ QCS8550 (Proxy) QAIRT 2.45, ONNX Runtime 1.25.0 Download
PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Elite Mobile QAIRT 2.45, ONNX Runtime 1.25.0 Download
PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 7 Gen 4 Mobile QAIRT 2.45, ONNX Runtime 1.25.0 Download
PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Elite Gen 5 Mobile QAIRT 2.45, ONNX Runtime 1.25.0 Download
PRECOMPILED_QNN_ONNX w8a16 Qualcomm® Dragonwing™ Q-6690 QAIRT 2.45, ONNX Runtime 1.25.0 Download
PRECOMPILED_QNN_ONNX w8a16 Qualcomm® Dragonwing™ IQ-9075 QAIRT 2.45, ONNX Runtime 1.25.0 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® Dragonwing™ QCS8550 (Proxy) QAIRT 2.45 Download
QNN_CONTEXT_BINARY w8a16 Qualcomm® SA8775P QAIRT 2.45 Download
QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Elite Mobile QAIRT 2.45 Download
QNN_CONTEXT_BINARY w8a16 Snapdragon® 7 Gen 4 Mobile QAIRT 2.45 Download
QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Elite Gen 5 Mobile QAIRT 2.45 Download
QNN_CONTEXT_BINARY w8a16 Qualcomm® SA7255P QAIRT 2.45 Download
QNN_CONTEXT_BINARY w8a16 Qualcomm® Dragonwing™ Q-6690 QAIRT 2.45 Download
QNN_CONTEXT_BINARY w8a16 Qualcomm® Dragonwing™ IQ-9075 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® X2 Elite 29.257 ms 33 - 33 MB NPU
controlnet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® X Elite 71.109 ms 352 - 352 MB NPU
controlnet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Gen 3 Mobile 58.055 ms 34 - 46 MB NPU
controlnet PRECOMPILED_QNN_ONNX w8a16 Qualcomm® Dragonwing™ QCS8550 (Proxy) 75.538 ms 0 - 384 MB NPU
controlnet PRECOMPILED_QNN_ONNX w8a16 Qualcomm® Dragonwing™ IQ-9075 70.988 ms 32 - 36 MB NPU
controlnet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 7 Gen 4 Mobile 120.475 ms 31 - 37 MB NPU
controlnet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Elite Gen 5 Mobile 28.383 ms 32 - 45 MB NPU
controlnet PRECOMPILED_QNN_ONNX w8a16 Qualcomm® Dragonwing™ Q-6690 1220.32 ms 12 - 23 MB NPU
controlnet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Elite Mobile 45.311 ms 31 - 44 MB NPU
controlnet PRECOMPILED_QNN_ONNX w8a16 Qualcomm® Dragonwing™ Q-7790 120.475 ms 31 - 37 MB NPU
controlnet PRECOMPILED_QNN_ONNX w8a16 Qualcomm® Dragonwing™ Q-8750 45.311 ms 31 - 44 MB NPU
controlnet PRECOMPILED_QNN_ONNX w8a16 Qualcomm® Dragonwing™ IQ-X7181 71.109 ms 352 - 352 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Snapdragon® X2 Elite 29.438 ms 2 - 2 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Snapdragon® X Elite 70.985 ms 2 - 2 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Gen 3 Mobile 56.988 ms 2 - 10 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Qualcomm® QCS8275 138.007 ms 2 - 10 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Qualcomm® Dragonwing™ QCS8550 (Proxy) 74.71 ms 2 - 4 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Qualcomm® SA8775P 70.429 ms 2 - 9 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Qualcomm® SA8650P 70.429 ms 2 - 9 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Qualcomm® SA8255P 70.429 ms 2 - 9 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Qualcomm® Dragonwing™ IQ-9075 70.91 ms 0 - 16 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Snapdragon® 7 Gen 4 Mobile 122.163 ms 2 - 8 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Elite Gen 5 Mobile 28.435 ms 2 - 11 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Qualcomm® Dragonwing™ Q-6690 1156.771 ms 0 - 7 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Qualcomm® SA7255P 138.007 ms 2 - 10 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Elite Mobile 44.089 ms 2 - 11 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Qualcomm® Dragonwing™ Q-7790 122.163 ms 2 - 8 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Qualcomm® Dragonwing™ Q-8750 44.089 ms 2 - 11 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Qualcomm® Dragonwing™ IQ-X7181 70.985 ms 2 - 2 MB NPU
text_encoder PRECOMPILED_QNN_ONNX w8a16 Snapdragon® X2 Elite 1.514 ms 1 - 1 MB NPU
text_encoder PRECOMPILED_QNN_ONNX w8a16 Snapdragon® X Elite 3.437 ms 157 - 157 MB NPU
text_encoder PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Gen 3 Mobile 2.3 ms 0 - 12 MB NPU
text_encoder PRECOMPILED_QNN_ONNX w8a16 Qualcomm® Dragonwing™ QCS8550 (Proxy) 3.247 ms 0 - 162 MB NPU
text_encoder PRECOMPILED_QNN_ONNX w8a16 Qualcomm® Dragonwing™ IQ-9075 3.333 ms 0 - 3 MB NPU
text_encoder PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 7 Gen 4 Mobile 3.694 ms 0 - 6 MB NPU
text_encoder PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Elite Gen 5 Mobile 1.538 ms 0 - 7 MB NPU
text_encoder PRECOMPILED_QNN_ONNX w8a16 Qualcomm® Dragonwing™ Q-6690 24.111 ms 0 - 7 MB NPU
text_encoder PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Elite Mobile 1.75 ms 0 - 11 MB NPU
text_encoder PRECOMPILED_QNN_ONNX w8a16 Qualcomm® Dragonwing™ Q-7790 3.694 ms 0 - 6 MB NPU
text_encoder PRECOMPILED_QNN_ONNX w8a16 Qualcomm® Dragonwing™ Q-8750 1.75 ms 0 - 11 MB NPU
text_encoder PRECOMPILED_QNN_ONNX w8a16 Qualcomm® Dragonwing™ IQ-X7181 3.437 ms 157 - 157 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Snapdragon® X2 Elite 1.762 ms 0 - 0 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Snapdragon® X Elite 3.649 ms 0 - 0 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Gen 3 Mobile 2.313 ms 0 - 7 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Qualcomm® QCS8275 7.501 ms 0 - 8 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Qualcomm® Dragonwing™ QCS8550 (Proxy) 3.245 ms 0 - 2 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Qualcomm® SA8775P 3.5 ms 0 - 9 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Qualcomm® SA8650P 3.5 ms 0 - 9 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Qualcomm® SA8255P 3.5 ms 0 - 9 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Qualcomm® Dragonwing™ IQ-9075 3.336 ms 0 - 2 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Snapdragon® 7 Gen 4 Mobile 3.682 ms 0 - 6 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Elite Gen 5 Mobile 1.534 ms 0 - 9 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Qualcomm® Dragonwing™ Q-6690 21.974 ms 0 - 6 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Qualcomm® SA7255P 7.501 ms 0 - 8 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Elite Mobile 1.748 ms 0 - 10 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Qualcomm® Dragonwing™ Q-7790 3.682 ms 0 - 6 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Qualcomm® Dragonwing™ Q-8750 1.748 ms 0 - 10 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Qualcomm® Dragonwing™ IQ-X7181 3.649 ms 0 - 0 MB NPU
unet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® X2 Elite 46.739 ms 13 - 13 MB NPU
unet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® X Elite 113.938 ms 829 - 829 MB NPU
unet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Gen 3 Mobile 81.59 ms 13 - 25 MB NPU
unet PRECOMPILED_QNN_ONNX w8a16 Qualcomm® Dragonwing™ QCS8550 (Proxy) 112.936 ms 0 - 883 MB NPU
unet PRECOMPILED_QNN_ONNX w8a16 Qualcomm® Dragonwing™ IQ-9075 106.158 ms 13 - 29 MB NPU
unet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 7 Gen 4 Mobile 178.885 ms 11 - 21 MB NPU
unet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Elite Gen 5 Mobile 50.434 ms 6 - 17 MB NPU
unet PRECOMPILED_QNN_ONNX w8a16 Qualcomm® Dragonwing™ Q-6690 2237.733 ms 13 - 23 MB NPU
unet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Elite Mobile 63.915 ms 6 - 17 MB NPU
unet PRECOMPILED_QNN_ONNX w8a16 Qualcomm® Dragonwing™ Q-7790 178.885 ms 11 - 21 MB NPU
unet PRECOMPILED_QNN_ONNX w8a16 Qualcomm® Dragonwing™ Q-8750 63.915 ms 6 - 17 MB NPU
unet PRECOMPILED_QNN_ONNX w8a16 Qualcomm® Dragonwing™ IQ-X7181 113.938 ms 829 - 829 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Snapdragon® X2 Elite 47.003 ms 13 - 13 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Snapdragon® X Elite 114.111 ms 13 - 13 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Gen 3 Mobile 80.908 ms 13 - 20 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Qualcomm® QCS8275 266.67 ms 6 - 13 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Qualcomm® Dragonwing™ QCS8550 (Proxy) 113.082 ms 13 - 15 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Qualcomm® SA8775P 107.035 ms 11 - 18 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Qualcomm® SA8650P 107.035 ms 11 - 18 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Qualcomm® SA8255P 107.035 ms 11 - 18 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Qualcomm® Dragonwing™ IQ-9075 106.741 ms 11 - 25 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Snapdragon® 7 Gen 4 Mobile 181.091 ms 10 - 16 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Elite Gen 5 Mobile 47.247 ms 6 - 14 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Qualcomm® Dragonwing™ Q-6690 2110.819 ms 14 - 24 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Qualcomm® SA7255P 266.67 ms 6 - 13 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Elite Mobile 61.892 ms 6 - 14 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Qualcomm® Dragonwing™ Q-7790 181.091 ms 10 - 16 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Qualcomm® Dragonwing™ Q-8750 61.892 ms 6 - 14 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Qualcomm® Dragonwing™ IQ-X7181 114.111 ms 13 - 13 MB NPU
vae PRECOMPILED_QNN_ONNX w8a16 Snapdragon® X2 Elite 127.113 ms 4 - 4 MB NPU
vae PRECOMPILED_QNN_ONNX w8a16 Snapdragon® X Elite 259.111 ms 61 - 61 MB NPU
vae PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Gen 3 Mobile 197.127 ms 3 - 16 MB NPU
vae PRECOMPILED_QNN_ONNX w8a16 Qualcomm® Dragonwing™ QCS8550 (Proxy) 263.507 ms 0 - 66 MB NPU
vae PRECOMPILED_QNN_ONNX w8a16 Qualcomm® Dragonwing™ IQ-9075 266.619 ms 3 - 6 MB NPU
vae PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 7 Gen 4 Mobile 506.457 ms 4 - 9 MB NPU
vae PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Elite Gen 5 Mobile 119.966 ms 3 - 11 MB NPU
vae PRECOMPILED_QNN_ONNX w8a16 Qualcomm® Dragonwing™ Q-6690 6278.605 ms 0 - 7 MB NPU
vae PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Elite Mobile 172.83 ms 3 - 15 MB NPU
vae PRECOMPILED_QNN_ONNX w8a16 Qualcomm® Dragonwing™ Q-7790 506.457 ms 4 - 9 MB NPU
vae PRECOMPILED_QNN_ONNX w8a16 Qualcomm® Dragonwing™ Q-8750 172.83 ms 3 - 15 MB NPU
vae PRECOMPILED_QNN_ONNX w8a16 Qualcomm® Dragonwing™ IQ-X7181 259.111 ms 61 - 61 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Snapdragon® X2 Elite 127.216 ms 0 - 0 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Snapdragon® X Elite 259.747 ms 0 - 0 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Gen 3 Mobile 195.687 ms 1 - 8 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Qualcomm® QCS8275 712.629 ms 0 - 10 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Qualcomm® Dragonwing™ QCS8550 (Proxy) 260.61 ms 0 - 2 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Qualcomm® SA8775P 243.86 ms 0 - 9 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Qualcomm® SA8650P 243.86 ms 0 - 9 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Qualcomm® SA8255P 243.86 ms 0 - 9 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Qualcomm® Dragonwing™ IQ-9075 241.394 ms 0 - 3 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Snapdragon® 7 Gen 4 Mobile 505.012 ms 1 - 7 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Elite Gen 5 Mobile 120.227 ms 0 - 9 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Qualcomm® Dragonwing™ Q-6690 6264.453 ms 2 - 9 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Qualcomm® SA7255P 712.629 ms 0 - 10 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Elite Mobile 172.296 ms 1 - 10 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Qualcomm® Dragonwing™ Q-7790 505.012 ms 1 - 7 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Qualcomm® Dragonwing™ Q-8750 172.296 ms 1 - 10 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Qualcomm® Dragonwing™ IQ-X7181 259.747 ms 0 - 0 MB NPU

License

  • The license for the original implementation of ControlNet-Canny can be found here.

References

Community

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
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Paper for qualcomm/ControlNet-Canny