v0.30.5
Browse filesSee https://github.com/quic/ai-hub-models/releases/v0.30.5 for changelog.
README.md
CHANGED
@@ -29,7 +29,6 @@ More details on model performance across various devices, can be found
|
|
29 |
- **Model Type:** Model_use_case.image_generation
|
30 |
- **Model Stats:**
|
31 |
- Input: Text prompt to generate image
|
32 |
-
- QNN-SDK: 2.28
|
33 |
- Text Encoder Number of parameters: 340M
|
34 |
- UNet Number of parameters: 865M
|
35 |
- VAE Decoder Number of parameters: 83M
|
@@ -37,52 +36,58 @@ More details on model performance across various devices, can be found
|
|
37 |
|
38 |
| Model | Precision | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit | Target Model
|
39 |
|---|---|---|---|---|---|---|---|---|
|
40 |
-
|
|
41 |
-
|
|
42 |
-
|
|
43 |
-
|
|
44 |
-
|
|
45 |
-
|
|
46 |
-
|
|
47 |
-
|
|
48 |
-
|
|
49 |
-
|
|
50 |
-
|
|
51 |
-
|
|
52 |
-
|
|
53 |
-
|
|
54 |
-
|
|
55 |
-
|
|
56 |
-
|
|
57 |
-
|
|
58 |
-
|
|
59 |
-
|
|
60 |
-
|
|
61 |
-
|
|
62 |
-
|
|
63 |
-
|
|
64 |
-
|
|
65 |
-
|
|
66 |
-
|
|
67 |
-
|
|
68 |
-
|
|
69 |
-
|
|
70 |
-
|
|
71 |
-
|
|
72 |
-
|
|
73 |
-
|
|
74 |
-
|
|
75 |
-
|
|
76 |
-
|
|
77 |
-
|
|
78 |
-
|
|
79 |
-
|
|
80 |
-
|
|
81 |
-
|
|
82 |
-
|
|
83 |
-
|
|
84 |
-
|
|
85 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
|
88 |
|
@@ -142,31 +147,31 @@ python -m qai_hub_models.models.stable_diffusion_v1_5.export
|
|
142 |
```
|
143 |
Profiling Results
|
144 |
------------------------------------------------------------
|
145 |
-
|
146 |
Device : cs_8275 (ANDROID 14)
|
147 |
Runtime : QNN
|
148 |
-
Estimated inference time (ms) :
|
149 |
Estimated peak memory usage (MB): [0, 9]
|
150 |
-
Total # Ops :
|
151 |
-
Compute Unit(s) : npu (
|
152 |
|
153 |
------------------------------------------------------------
|
154 |
-
|
155 |
Device : cs_8275 (ANDROID 14)
|
156 |
Runtime : QNN
|
157 |
-
Estimated inference time (ms) :
|
158 |
-
Estimated peak memory usage (MB): [0,
|
159 |
Total # Ops : 4041
|
160 |
Compute Unit(s) : npu (4041 ops) gpu (0 ops) cpu (0 ops)
|
161 |
|
162 |
------------------------------------------------------------
|
163 |
-
|
164 |
Device : cs_8275 (ANDROID 14)
|
165 |
Runtime : QNN
|
166 |
-
Estimated inference time (ms) :
|
167 |
Estimated peak memory usage (MB): [0, 9]
|
168 |
-
Total # Ops :
|
169 |
-
Compute Unit(s) : npu (
|
170 |
```
|
171 |
|
172 |
|
|
|
29 |
- **Model Type:** Model_use_case.image_generation
|
30 |
- **Model Stats:**
|
31 |
- Input: Text prompt to generate image
|
|
|
32 |
- Text Encoder Number of parameters: 340M
|
33 |
- UNet Number of parameters: 865M
|
34 |
- VAE Decoder Number of parameters: 83M
|
|
|
36 |
|
37 |
| Model | Precision | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit | Target Model
|
38 |
|---|---|---|---|---|---|---|---|---|
|
39 |
+
| text_encoder | w8a16 | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | QNN | 11.111 ms | 0 - 9 MB | NPU | Use Export Script |
|
40 |
+
| text_encoder | w8a16 | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | QNN | 5.363 ms | 0 - 2 MB | NPU | Use Export Script |
|
41 |
+
| text_encoder | w8a16 | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | QNN | 5.933 ms | 0 - 10 MB | NPU | Use Export Script |
|
42 |
+
| text_encoder | w8a16 | SA7255P ADP | Qualcomm® SA7255P | QNN | 11.111 ms | 0 - 9 MB | NPU | Use Export Script |
|
43 |
+
| text_encoder | w8a16 | SA8255 (Proxy) | Qualcomm® SA8255P (Proxy) | QNN | 5.396 ms | 0 - 3 MB | NPU | Use Export Script |
|
44 |
+
| text_encoder | w8a16 | SA8650 (Proxy) | Qualcomm® SA8650P (Proxy) | QNN | 5.398 ms | 0 - 3 MB | NPU | Use Export Script |
|
45 |
+
| text_encoder | w8a16 | SA8775P ADP | Qualcomm® SA8775P | QNN | 5.933 ms | 0 - 10 MB | NPU | Use Export Script |
|
46 |
+
| text_encoder | w8a16 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 Mobile | QNN | 5.413 ms | 0 - 2 MB | NPU | Use Export Script |
|
47 |
+
| text_encoder | w8a16 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 Mobile | ONNX | 5.773 ms | 0 - 162 MB | NPU | [Stable-Diffusion-v1.5.onnx](https://huggingface.co/qualcomm/Stable-Diffusion-v1.5/blob/main/Stable-Diffusion-v1.5_w8a16.onnx) |
|
48 |
+
| text_encoder | w8a16 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | QNN | 3.909 ms | 0 - 18 MB | NPU | Use Export Script |
|
49 |
+
| text_encoder | w8a16 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | ONNX | 4.097 ms | 0 - 19 MB | NPU | [Stable-Diffusion-v1.5.onnx](https://huggingface.co/qualcomm/Stable-Diffusion-v1.5/blob/main/Stable-Diffusion-v1.5_w8a16.onnx) |
|
50 |
+
| text_encoder | w8a16 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite Mobile | QNN | 3.501 ms | 0 - 14 MB | NPU | Use Export Script |
|
51 |
+
| text_encoder | w8a16 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite Mobile | ONNX | 3.754 ms | 0 - 14 MB | NPU | [Stable-Diffusion-v1.5.onnx](https://huggingface.co/qualcomm/Stable-Diffusion-v1.5/blob/main/Stable-Diffusion-v1.5_w8a16.onnx) |
|
52 |
+
| text_encoder | w8a16 | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 5.836 ms | 0 - 0 MB | NPU | Use Export Script |
|
53 |
+
| text_encoder | w8a16 | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 5.977 ms | 157 - 157 MB | NPU | [Stable-Diffusion-v1.5.onnx](https://huggingface.co/qualcomm/Stable-Diffusion-v1.5/blob/main/Stable-Diffusion-v1.5_w8a16.onnx) |
|
54 |
+
| unet | w8a16 | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | QNN | 263.602 ms | 0 - 7 MB | NPU | Use Export Script |
|
55 |
+
| unet | w8a16 | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | QNN | 110.81 ms | 0 - 2 MB | NPU | Use Export Script |
|
56 |
+
| unet | w8a16 | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | QNN | 105.273 ms | 0 - 8 MB | NPU | Use Export Script |
|
57 |
+
| unet | w8a16 | SA7255P ADP | Qualcomm® SA7255P | QNN | 263.602 ms | 0 - 7 MB | NPU | Use Export Script |
|
58 |
+
| unet | w8a16 | SA8255 (Proxy) | Qualcomm® SA8255P (Proxy) | QNN | 111.393 ms | 0 - 7 MB | NPU | Use Export Script |
|
59 |
+
| unet | w8a16 | SA8650 (Proxy) | Qualcomm® SA8650P (Proxy) | QNN | 111.635 ms | 0 - 3 MB | NPU | Use Export Script |
|
60 |
+
| unet | w8a16 | SA8775P ADP | Qualcomm® SA8775P | QNN | 105.273 ms | 0 - 8 MB | NPU | Use Export Script |
|
61 |
+
| unet | w8a16 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 Mobile | QNN | 111.871 ms | 0 - 3 MB | NPU | Use Export Script |
|
62 |
+
| unet | w8a16 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 Mobile | ONNX | 111.763 ms | 0 - 898 MB | NPU | [Stable-Diffusion-v1.5.onnx](https://huggingface.co/qualcomm/Stable-Diffusion-v1.5/blob/main/Stable-Diffusion-v1.5_w8a16.onnx) |
|
63 |
+
| unet | w8a16 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | QNN | 78.019 ms | 0 - 18 MB | NPU | Use Export Script |
|
64 |
+
| unet | w8a16 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | ONNX | 80.045 ms | 0 - 15 MB | NPU | [Stable-Diffusion-v1.5.onnx](https://huggingface.co/qualcomm/Stable-Diffusion-v1.5/blob/main/Stable-Diffusion-v1.5_w8a16.onnx) |
|
65 |
+
| unet | w8a16 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite Mobile | QNN | 67.577 ms | 0 - 14 MB | NPU | Use Export Script |
|
66 |
+
| unet | w8a16 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite Mobile | ONNX | 67.421 ms | 0 - 15 MB | NPU | [Stable-Diffusion-v1.5.onnx](https://huggingface.co/qualcomm/Stable-Diffusion-v1.5/blob/main/Stable-Diffusion-v1.5_w8a16.onnx) |
|
67 |
+
| unet | w8a16 | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 113.221 ms | 0 - 0 MB | NPU | Use Export Script |
|
68 |
+
| unet | w8a16 | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 114.344 ms | 842 - 842 MB | NPU | [Stable-Diffusion-v1.5.onnx](https://huggingface.co/qualcomm/Stable-Diffusion-v1.5/blob/main/Stable-Diffusion-v1.5_w8a16.onnx) |
|
69 |
+
| vae | w8a16 | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | QNN | 718.731 ms | 0 - 9 MB | NPU | Use Export Script |
|
70 |
+
| vae | w8a16 | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | QNN | 270.917 ms | 0 - 4 MB | NPU | Use Export Script |
|
71 |
+
| vae | w8a16 | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | QNN | 248.917 ms | 0 - 10 MB | NPU | Use Export Script |
|
72 |
+
| vae | w8a16 | SA7255P ADP | Qualcomm® SA7255P | QNN | 718.731 ms | 0 - 9 MB | NPU | Use Export Script |
|
73 |
+
| vae | w8a16 | SA8255 (Proxy) | Qualcomm® SA8255P (Proxy) | QNN | 270.775 ms | 0 - 3 MB | NPU | Use Export Script |
|
74 |
+
| vae | w8a16 | SA8650 (Proxy) | Qualcomm® SA8650P (Proxy) | QNN | 270.064 ms | 0 - 3 MB | NPU | Use Export Script |
|
75 |
+
| vae | w8a16 | SA8775P ADP | Qualcomm® SA8775P | QNN | 248.917 ms | 0 - 10 MB | NPU | Use Export Script |
|
76 |
+
| vae | w8a16 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 Mobile | QNN | 271.182 ms | 0 - 2 MB | NPU | Use Export Script |
|
77 |
+
| vae | w8a16 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 Mobile | ONNX | 269.668 ms | 0 - 66 MB | NPU | [Stable-Diffusion-v1.5.onnx](https://huggingface.co/qualcomm/Stable-Diffusion-v1.5/blob/main/Stable-Diffusion-v1.5_w8a16.onnx) |
|
78 |
+
| vae | w8a16 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | QNN | 207.636 ms | 0 - 18 MB | NPU | Use Export Script |
|
79 |
+
| vae | w8a16 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | ONNX | 207.55 ms | 3 - 22 MB | NPU | [Stable-Diffusion-v1.5.onnx](https://huggingface.co/qualcomm/Stable-Diffusion-v1.5/blob/main/Stable-Diffusion-v1.5_w8a16.onnx) |
|
80 |
+
| vae | w8a16 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite Mobile | QNN | 175.815 ms | 0 - 14 MB | NPU | Use Export Script |
|
81 |
+
| vae | w8a16 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite Mobile | ONNX | 194.632 ms | 3 - 17 MB | NPU | [Stable-Diffusion-v1.5.onnx](https://huggingface.co/qualcomm/Stable-Diffusion-v1.5/blob/main/Stable-Diffusion-v1.5_w8a16.onnx) |
|
82 |
+
| vae | w8a16 | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 265.394 ms | 0 - 0 MB | NPU | Use Export Script |
|
83 |
+
| vae | w8a16 | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 265.427 ms | 63 - 63 MB | NPU | [Stable-Diffusion-v1.5.onnx](https://huggingface.co/qualcomm/Stable-Diffusion-v1.5/blob/main/Stable-Diffusion-v1.5_w8a16.onnx) |
|
84 |
+
|
85 |
+
## Deploy to Snapdragon X Elite NPU
|
86 |
+
Please follow the [Stable Diffusion Windows App](https://github.com/quic/ai-hub-apps/tree/main/apps/windows/python/StableDiffusion) tutorial to quantize model with custom weights.
|
87 |
+
|
88 |
+
## Quantize and Deploy Your Own Fine-Tuned Stable Diffusion
|
89 |
+
|
90 |
+
Please follow the [Quantize Stable Diffusion]({REPOSITORY_URL}/tutorials/stable_diffusion/quantize_stable_diffusion.md) tutorial to quantize model with custom weights.
|
91 |
|
92 |
|
93 |
|
|
|
147 |
```
|
148 |
Profiling Results
|
149 |
------------------------------------------------------------
|
150 |
+
text_encoder
|
151 |
Device : cs_8275 (ANDROID 14)
|
152 |
Runtime : QNN
|
153 |
+
Estimated inference time (ms) : 11.1
|
154 |
Estimated peak memory usage (MB): [0, 9]
|
155 |
+
Total # Ops : 437
|
156 |
+
Compute Unit(s) : npu (437 ops) gpu (0 ops) cpu (0 ops)
|
157 |
|
158 |
------------------------------------------------------------
|
159 |
+
unet
|
160 |
Device : cs_8275 (ANDROID 14)
|
161 |
Runtime : QNN
|
162 |
+
Estimated inference time (ms) : 263.6
|
163 |
+
Estimated peak memory usage (MB): [0, 7]
|
164 |
Total # Ops : 4041
|
165 |
Compute Unit(s) : npu (4041 ops) gpu (0 ops) cpu (0 ops)
|
166 |
|
167 |
------------------------------------------------------------
|
168 |
+
vae
|
169 |
Device : cs_8275 (ANDROID 14)
|
170 |
Runtime : QNN
|
171 |
+
Estimated inference time (ms) : 718.7
|
172 |
Estimated peak memory usage (MB): [0, 9]
|
173 |
+
Total # Ops : 173
|
174 |
+
Compute Unit(s) : npu (173 ops) gpu (0 ops) cpu (0 ops)
|
175 |
```
|
176 |
|
177 |
|