Stable-Diffusion-v1.5: Optimized for Qualcomm Devices
Generates high resolution images from text prompts using a latent diffusion model. This model uses CLIP ViT-L/14 as text encoder, U-Net based latent denoising, and VAE based decoder to generate the final image.
This is based on the implementation of Stable-Diffusion-v1.5 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.
Deploy to Snapdragon X Elite NPU
Please follow the Stable Diffusion Windows App tutorial to quantize model with custom weights.
Quantize and Deploy Your Own Fine-Tuned Stable Diffusion
Please follow the Quantize Stable Diffusion tutorial to quantize model with custom weights.
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 |
|---|---|---|---|---|
| QNN_CONTEXT_BINARY | w8a16 | qualcomm_qcm6690 | QAIRT 2.43 | Download |
| QNN_CONTEXT_BINARY | w8a16 | qualcomm_qcs8550_proxy | QAIRT 2.43 | Download |
| QNN_CONTEXT_BINARY | w8a16 | qualcomm_qcs9075 | QAIRT 2.43 | Download |
| QNN_CONTEXT_BINARY | w8a16 | qualcomm_sa7255p | QAIRT 2.43 | Download |
| QNN_CONTEXT_BINARY | w8a16 | qualcomm_sa8775p | QAIRT 2.43 | Download |
| QNN_CONTEXT_BINARY | w8a16 | qualcomm_snapdragon_7gen4 | QAIRT 2.43 | Download |
| QNN_CONTEXT_BINARY | w8a16 | qualcomm_snapdragon_8_elite_for_galaxy | QAIRT 2.43 | Download |
| QNN_CONTEXT_BINARY | w8a16 | qualcomm_snapdragon_8_elite_gen5 | QAIRT 2.43 | Download |
| QNN_CONTEXT_BINARY | w8a16 | qualcomm_snapdragon_8gen3 | QAIRT 2.43 | Download |
| QNN_CONTEXT_BINARY | w8a16 | qualcomm_snapdragon_x2_elite | QAIRT 2.43 | Download |
| QNN_CONTEXT_BINARY | w8a16 | qualcomm_snapdragon_x_elite | QAIRT 2.43 | Download |
For more device-specific assets and performance metrics, visit Stable-Diffusion-v1.5 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 Stable-Diffusion-v1.5 on GitHub for usage instructions.
Model Details
Model Type: Model_use_case.image_generation
Model Stats:
- Input: Text prompt to generate image
Performance Summary
| Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit |
|---|---|---|---|---|---|---|
| text_encoder | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 1.495 ms | 0 - 10 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.626 ms | 156 - 156 MB | NPU |
| text_encoder | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 2.305 ms | 0 - 7 MB | NPU |
| text_encoder | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS8550 (Proxy) | 3.239 ms | 0 - 162 MB | NPU |
| text_encoder | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS9075 | 3.337 ms | 0 - 3 MB | NPU |
| text_encoder | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCM6690 | 22.12 ms | 0 - 10 MB | NPU |
| text_encoder | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 1.752 ms | 0 - 7 MB | NPU |
| text_encoder | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 3.639 ms | 0 - 6 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 1.497 ms | 0 - 9 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® X2 Elite | 1.78 ms | 0 - 0 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® X Elite | 3.613 ms | 0 - 0 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 8 Gen 3 Mobile | 2.336 ms | 0 - 7 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS8275 (Proxy) | 7.547 ms | 0 - 7 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS8550 (Proxy) | 3.269 ms | 0 - 1 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® SA8775P | 3.525 ms | 0 - 9 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS9075 | 3.351 ms | 2 - 4 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCM6690 | 21.922 ms | 0 - 6 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® SA7255P | 7.547 ms | 0 - 7 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 1.749 ms | 0 - 13 MB | NPU |
| text_encoder | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 7 Gen 4 Mobile | 3.656 ms | 0 - 6 MB | NPU |
| unet | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 44.894 ms | 0 - 9 MB | NPU |
| unet | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® X2 Elite | 47.122 ms | 845 - 845 MB | NPU |
| unet | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® X Elite | 112.786 ms | 843 - 843 MB | NPU |
| unet | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 80.241 ms | 0 - 12 MB | NPU |
| unet | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS8550 (Proxy) | 112.733 ms | 0 - 898 MB | NPU |
| unet | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS9075 | 105.775 ms | 0 - 3 MB | NPU |
| unet | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCM6690 | 2104.529 ms | 0 - 11 MB | NPU |
| unet | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 62.047 ms | 0 - 10 MB | NPU |
| unet | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 184.475 ms | 0 - 11 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 45.016 ms | 0 - 9 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® X2 Elite | 46.854 ms | 0 - 0 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® X Elite | 114.01 ms | 0 - 0 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 8 Gen 3 Mobile | 80.094 ms | 0 - 8 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS8275 (Proxy) | 262.548 ms | 0 - 6 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS8550 (Proxy) | 113.101 ms | 0 - 3 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® SA8775P | 106.334 ms | 0 - 7 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS9075 | 105.973 ms | 0 - 2 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCM6690 | 2106.999 ms | 0 - 10 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® SA7255P | 262.548 ms | 0 - 6 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 59.772 ms | 1 - 10 MB | NPU |
| unet | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 7 Gen 4 Mobile | 178.2 ms | 0 - 7 MB | NPU |
| vae | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 116.225 ms | 3 - 13 MB | NPU |
| vae | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® X2 Elite | 125.617 ms | 62 - 62 MB | NPU |
| vae | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® X Elite | 264.783 ms | 62 - 62 MB | NPU |
| vae | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 202.214 ms | 3 - 10 MB | NPU |
| vae | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS8550 (Proxy) | 267.646 ms | 0 - 65 MB | NPU |
| vae | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCS9075 | 250.354 ms | 3 - 6 MB | NPU |
| vae | PRECOMPILED_QNN_ONNX | w8a16 | Qualcomm® QCM6690 | 6350.339 ms | 1 - 7 MB | NPU |
| vae | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 178.063 ms | 3 - 11 MB | NPU |
| vae | PRECOMPILED_QNN_ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 513.906 ms | 2 - 9 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 127.734 ms | 0 - 10 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® X2 Elite | 133.142 ms | 0 - 0 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® X Elite | 261.173 ms | 0 - 0 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 8 Gen 3 Mobile | 201.382 ms | 0 - 7 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS8275 (Proxy) | 718.567 ms | 0 - 7 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS8550 (Proxy) | 264.498 ms | 1 - 2 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® SA8775P | 250.536 ms | 0 - 9 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCS9075 | 247.247 ms | 0 - 3 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® QCM6690 | 6441.317 ms | 0 - 6 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Qualcomm® SA7255P | 718.567 ms | 0 - 7 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 176.023 ms | 0 - 9 MB | NPU |
| vae | QNN_CONTEXT_BINARY | w8a16 | Snapdragon® 7 Gen 4 Mobile | 514.612 ms | 0 - 7 MB | NPU |
License
- The license for the original implementation of Stable-Diffusion-v1.5 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
