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.24.3 Download
PRECOMPILED_QNN_ONNX w8a16 Snapdragon® X2 Elite QAIRT 2.42, ONNX Runtime 1.24.3 Download
PRECOMPILED_QNN_ONNX w8a16 Snapdragon® X Elite QAIRT 2.42, ONNX Runtime 1.24.3 Download
PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Gen 3 Mobile QAIRT 2.42, ONNX Runtime 1.24.3 Download
PRECOMPILED_QNN_ONNX w8a16 Qualcomm® QCS8550 (Proxy) QAIRT 2.42, ONNX Runtime 1.24.3 Download
PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Elite For Galaxy Mobile QAIRT 2.42, ONNX Runtime 1.24.3 Download
PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 7 Gen 4 Mobile QAIRT 2.42, ONNX Runtime 1.24.3 Download
PRECOMPILED_QNN_ONNX w8a16 Qualcomm® QCM6690 QAIRT 2.42, ONNX Runtime 1.24.3 Download
PRECOMPILED_QNN_ONNX w8a16 Qualcomm® QCS9075 QAIRT 2.42, ONNX Runtime 1.24.3 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.966 ms 31 - 41 MB NPU
controlnet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Elite Mobile 46.03 ms 32 - 45 MB NPU
controlnet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® X2 Elite 28.671 ms 351 - 351 MB NPU
controlnet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® X Elite 75.999 ms 351 - 351 MB NPU
controlnet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® X Elite 75.999 ms 351 - 351 MB NPU
controlnet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Gen 3 Mobile 61.881 ms 32 - 44 MB NPU
controlnet PRECOMPILED_QNN_ONNX w8a16 Qualcomm® QCS8550 (Proxy) 83.251 ms 0 - 384 MB NPU
controlnet PRECOMPILED_QNN_ONNX w8a16 Qualcomm® QCS9075 75.374 ms 30 - 34 MB NPU
controlnet PRECOMPILED_QNN_ONNX w8a16 Qualcomm® QCM6690 1189.568 ms 2 - 12 MB NPU
controlnet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Elite For Galaxy Mobile 46.03 ms 32 - 45 MB NPU
controlnet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 7 Gen 4 Mobile 123.087 ms 34 - 45 MB NPU
controlnet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 7 Gen 4 Mobile 123.087 ms 34 - 45 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Elite Gen 5 Mobile 28.766 ms 2 - 11 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Elite Mobile 43.989 ms 2 - 11 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Snapdragon® X2 Elite 29.348 ms 2 - 2 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Snapdragon® X Elite 71.147 ms 2 - 2 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Snapdragon® X Elite 71.147 ms 2 - 2 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Gen 3 Mobile 56.468 ms 2 - 9 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Qualcomm® QCS8275 (Proxy) 138.188 ms 2 - 9 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Qualcomm® QCS8550 (Proxy) 73.749 ms 2 - 3 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Qualcomm® SA8775P 70.523 ms 2 - 11 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Qualcomm® SA8775P 70.523 ms 2 - 11 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Qualcomm® SA8775P 70.523 ms 2 - 11 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Qualcomm® QCS9075 70.601 ms 2 - 18 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Qualcomm® QCM6690 1140.83 ms 0 - 6 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Qualcomm® SA7255P 138.188 ms 2 - 9 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Elite For Galaxy Mobile 43.989 ms 2 - 11 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Snapdragon® 7 Gen 4 Mobile 120.297 ms 2 - 8 MB NPU
controlnet QNN_CONTEXT_BINARY w8a16 Snapdragon® 7 Gen 4 Mobile 120.297 ms 2 - 8 MB NPU
text_encoder PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Elite Gen 5 Mobile 1.491 ms 0 - 10 MB NPU
text_encoder PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Elite Mobile 1.75 ms 0 - 7 MB NPU
text_encoder PRECOMPILED_QNN_ONNX w8a16 Snapdragon® X2 Elite 1.53 ms 156 - 156 MB NPU
text_encoder PRECOMPILED_QNN_ONNX w8a16 Snapdragon® X Elite 3.627 ms 156 - 156 MB NPU
text_encoder PRECOMPILED_QNN_ONNX w8a16 Snapdragon® X Elite 3.627 ms 156 - 156 MB NPU
text_encoder PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Gen 3 Mobile 2.302 ms 0 - 12 MB NPU
text_encoder PRECOMPILED_QNN_ONNX w8a16 Qualcomm® QCS8550 (Proxy) 3.266 ms 0 - 161 MB NPU
text_encoder PRECOMPILED_QNN_ONNX w8a16 Qualcomm® QCS9075 3.332 ms 0 - 3 MB NPU
text_encoder PRECOMPILED_QNN_ONNX w8a16 Qualcomm® QCM6690 28.099 ms 0 - 10 MB NPU
text_encoder PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Elite For Galaxy Mobile 1.75 ms 0 - 7 MB NPU
text_encoder PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 7 Gen 4 Mobile 3.628 ms 0 - 6 MB NPU
text_encoder PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 7 Gen 4 Mobile 3.628 ms 0 - 6 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Elite Gen 5 Mobile 1.543 ms 0 - 9 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Elite Mobile 1.755 ms 0 - 11 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Snapdragon® X2 Elite 1.768 ms 0 - 0 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Snapdragon® X Elite 3.622 ms 0 - 0 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Snapdragon® X Elite 3.622 ms 0 - 0 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Gen 3 Mobile 2.3 ms 0 - 8 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Qualcomm® QCS8275 (Proxy) 7.51 ms 0 - 8 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Qualcomm® QCS8550 (Proxy) 3.238 ms 0 - 2 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Qualcomm® SA8775P 3.496 ms 0 - 9 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Qualcomm® SA8775P 3.496 ms 0 - 9 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Qualcomm® SA8775P 3.496 ms 0 - 9 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Qualcomm® QCS9075 3.335 ms 2 - 4 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Qualcomm® QCM6690 21.971 ms 0 - 6 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Qualcomm® SA7255P 7.51 ms 0 - 8 MB NPU
text_encoder QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Elite For Galaxy Mobile 1.755 ms 0 - 11 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® 7 Gen 4 Mobile 3.682 ms 0 - 6 MB NPU
unet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Elite Gen 5 Mobile 46.952 ms 13 - 21 MB NPU
unet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Elite Mobile 62.38 ms 6 - 17 MB NPU
unet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® X2 Elite 48.772 ms 832 - 832 MB NPU
unet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® X Elite 114.565 ms 829 - 829 MB NPU
unet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® X Elite 114.565 ms 829 - 829 MB NPU
unet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Gen 3 Mobile 80.767 ms 13 - 25 MB NPU
unet PRECOMPILED_QNN_ONNX w8a16 Qualcomm® QCS8550 (Proxy) 113.043 ms 0 - 883 MB NPU
unet PRECOMPILED_QNN_ONNX w8a16 Qualcomm® QCS9075 106.212 ms 12 - 28 MB NPU
unet PRECOMPILED_QNN_ONNX w8a16 Qualcomm® QCM6690 2227.59 ms 10 - 21 MB NPU
unet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Elite For Galaxy Mobile 62.38 ms 6 - 17 MB NPU
unet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 7 Gen 4 Mobile 180.02 ms 13 - 24 MB NPU
unet PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 7 Gen 4 Mobile 180.02 ms 13 - 24 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Elite Gen 5 Mobile 46.122 ms 13 - 22 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Elite Mobile 62.227 ms 6 - 14 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Snapdragon® X2 Elite 47.035 ms 13 - 13 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Snapdragon® X Elite 113.803 ms 13 - 13 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Snapdragon® X Elite 113.803 ms 13 - 13 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Gen 3 Mobile 81.437 ms 13 - 20 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Qualcomm® QCS8275 (Proxy) 266.528 ms 6 - 12 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Qualcomm® QCS8550 (Proxy) 112.53 ms 13 - 15 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Qualcomm® SA8775P 107.394 ms 6 - 12 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Qualcomm® SA8775P 107.394 ms 6 - 12 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Qualcomm® SA8775P 107.394 ms 6 - 12 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Qualcomm® QCS9075 106.272 ms 11 - 25 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Qualcomm® QCM6690 2025.877 ms 13 - 24 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Qualcomm® SA7255P 266.528 ms 6 - 12 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Elite For Galaxy Mobile 62.227 ms 6 - 14 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Snapdragon® 7 Gen 4 Mobile 179.348 ms 11 - 18 MB NPU
unet QNN_CONTEXT_BINARY w8a16 Snapdragon® 7 Gen 4 Mobile 179.348 ms 11 - 18 MB NPU
vae PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Elite Gen 5 Mobile 121.006 ms 3 - 13 MB NPU
vae PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Elite Mobile 178.806 ms 4 - 11 MB NPU
vae PRECOMPILED_QNN_ONNX w8a16 Snapdragon® X2 Elite 125.281 ms 62 - 62 MB NPU
vae PRECOMPILED_QNN_ONNX w8a16 Snapdragon® X Elite 266.255 ms 62 - 62 MB NPU
vae PRECOMPILED_QNN_ONNX w8a16 Snapdragon® X Elite 266.255 ms 62 - 62 MB NPU
vae PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Gen 3 Mobile 203.39 ms 3 - 10 MB NPU
vae PRECOMPILED_QNN_ONNX w8a16 Qualcomm® QCS8550 (Proxy) 272.766 ms 1 - 66 MB NPU
vae PRECOMPILED_QNN_ONNX w8a16 Qualcomm® QCS9075 250.259 ms 3 - 6 MB NPU
vae PRECOMPILED_QNN_ONNX w8a16 Qualcomm® QCM6690 6408.841 ms 1 - 7 MB NPU
vae PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 8 Elite For Galaxy Mobile 178.806 ms 4 - 11 MB NPU
vae PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 7 Gen 4 Mobile 511.917 ms 2 - 8 MB NPU
vae PRECOMPILED_QNN_ONNX w8a16 Snapdragon® 7 Gen 4 Mobile 511.917 ms 2 - 8 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Elite Gen 5 Mobile 118.478 ms 0 - 10 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Elite Mobile 172.992 ms 0 - 13 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Snapdragon® X2 Elite 126.927 ms 0 - 0 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Snapdragon® X Elite 258.886 ms 0 - 0 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Snapdragon® X Elite 258.886 ms 0 - 0 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Gen 3 Mobile 195.709 ms 0 - 8 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Qualcomm® QCS8275 (Proxy) 711.698 ms 0 - 9 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Qualcomm® QCS8550 (Proxy) 259.98 ms 0 - 2 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Qualcomm® SA8775P 243.988 ms 0 - 9 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Qualcomm® SA8775P 243.988 ms 0 - 9 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Qualcomm® SA8775P 243.988 ms 0 - 9 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Qualcomm® QCS9075 240.94 ms 0 - 3 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Qualcomm® QCM6690 6220.328 ms 1 - 7 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Qualcomm® SA7255P 711.698 ms 0 - 9 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Snapdragon® 8 Elite For Galaxy Mobile 172.992 ms 0 - 13 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Snapdragon® 7 Gen 4 Mobile 526.541 ms 0 - 7 MB NPU
vae QNN_CONTEXT_BINARY w8a16 Snapdragon® 7 Gen 4 Mobile 526.541 ms 0 - 7 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