Add files using upload-large-folder tool
Browse files- README.md +52 -0
- category.txt +1 -0
- htp_arch.txt +1 -0
- kind.txt +1 -0
- quant.txt +13 -0
- soc_model.txt +1 -0
- text_encoder.onnx +3 -0
- text_encoder_qairt_context.bin +3 -0
- tokenizer/merges.txt +0 -0
- tokenizer/vocab.json +0 -0
- unet.onnx +3 -0
- unet_qairt_context.bin +3 -0
- vae.onnx +3 -0
- vae_qairt_context.bin +3 -0
README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: creativeml-openrail-m
|
| 3 |
+
base_model: stable-diffusion-v1-5/stable-diffusion-v1-5
|
| 4 |
+
tags:
|
| 5 |
+
- stable-diffusion
|
| 6 |
+
- qnn
|
| 7 |
+
- hexagon
|
| 8 |
+
- npu
|
| 9 |
+
- snapdragon
|
| 10 |
+
- text-to-image
|
| 11 |
+
pipeline_tag: text-to-image
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# sd15-npu-8gen3
|
| 15 |
+
|
| 16 |
+
Stable Diffusion 1.5 compiled to **Qualcomm Hexagon NPU context binaries** for the
|
| 17 |
+
**Snapdragon 8 Gen 3**, via Qualcomm AI Hub (w8a16: int8 weights, int16 activations).
|
| 18 |
+
|
| 19 |
+
Generates a 512x512 image in **~7 seconds** fully on the NPU (no CPU fallback).
|
| 20 |
+
|
| 21 |
+
## Chip-specific — read this
|
| 22 |
+
|
| 23 |
+
QNN context binaries are compiled **per chip generation and will not load on another**.
|
| 24 |
+
Pick the build matching your Snapdragon:
|
| 25 |
+
|
| 26 |
+
| Repo | Chip | SoC | Hexagon |
|
| 27 |
+
|---|---|---|---|
|
| 28 |
+
| `sd15-npu-8elite` | Snapdragon 8 Elite | SM8750 | v79 |
|
| 29 |
+
| `sd15-npu-8gen3` | Snapdragon 8 Gen 3 | SM8650 | v75 |
|
| 30 |
+
|
| 31 |
+
## Layout
|
| 32 |
+
|
| 33 |
+
```
|
| 34 |
+
unet.onnx + unet_qairt_context.bin # EPContext wrapper + Hexagon binary
|
| 35 |
+
text_encoder.onnx + text_encoder_qairt_context.bin
|
| 36 |
+
vae.onnx + vae_qairt_context.bin
|
| 37 |
+
quant.txt # w8a16 scales, read at load
|
| 38 |
+
tokenizer/{vocab.json, merges.txt}
|
| 39 |
+
soc_model.txt, htp_arch.txt, kind.txt
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
+
The `.onnx` files are tiny EPContext wrappers carrying the quantize/dequantize nodes;
|
| 43 |
+
the weights live in the `_qairt_context.bin` Hexagon binaries. Load them with ONNX
|
| 44 |
+
Runtime's **C++** API — the Java API cannot express the uint16 tensors these require.
|
| 45 |
+
|
| 46 |
+
`quant.txt` holds the w8a16 quantization scales, read at load rather than hardcoded,
|
| 47 |
+
so one engine can drive any chip's build.
|
| 48 |
+
|
| 49 |
+
## License
|
| 50 |
+
|
| 51 |
+
Derived from Stable Diffusion 1.5 (**CreativeML OpenRAIL-M**); the Attachment A
|
| 52 |
+
use-restrictions travel with these weights. Compiled with Qualcomm AI Hub.
|
category.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Versatile
|
htp_arch.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
75
|
kind.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
qnn
|
quant.txt
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
text_out_scale=0.0009303585393354297
|
| 2 |
+
text_out_zero=30063
|
| 3 |
+
unet_latent_scale=0.00024176308943424374
|
| 4 |
+
unet_latent_zero=33983
|
| 5 |
+
unet_t_scale=0.014770733192563057
|
| 6 |
+
unet_text_scale=0.0009331560577265918
|
| 7 |
+
unet_text_zero=30103
|
| 8 |
+
unet_out_scale=0.0001881735515780747
|
| 9 |
+
unet_out_zero=32340
|
| 10 |
+
vae_in_scale=0.00034003707696683705
|
| 11 |
+
vae_in_zero=34382
|
| 12 |
+
vae_out_scale=1.5259021893143654e-05
|
| 13 |
+
vae_out_zero=0
|
soc_model.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
57
|
text_encoder.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:aa06290d8f5b83710dff3afd2effb059966eb48f18cedebe4a7e3a496dbce986
|
| 3 |
+
size 733
|
text_encoder_qairt_context.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3be706052d7eac7ab9449085bbd11c46537a596c12adcb0ecd7fa49adcb5d58d
|
| 3 |
+
size 163041280
|
tokenizer/merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer/vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
unet.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:32eb083aa28f0ee96239cb90fd086c6dabfc626919e734fdd80bf5e30aabdd1d
|
| 3 |
+
size 1714
|
unet_qairt_context.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b038e307f424a9ebad442cd8110aa8fa6cccac8ffcc3d51d9eccf7f16afdaffb
|
| 3 |
+
size 881799168
|
vae.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c2250cf3be438fdbed1a72f2a9806d479c7aa7da74182507157dede49ce1e016
|
| 3 |
+
size 873
|
vae_qairt_context.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d0a28407373e146486ef83c50395e1b0a9faa52dc54946f7a113dd3271ba8c9f
|
| 3 |
+
size 64294912
|