latentdivergence commited on
Commit
a0012ac
·
verified ·
1 Parent(s): 95f413f

Add files using upload-large-folder tool

Browse files
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-8gen2
15
+
16
+ Stable Diffusion 1.5 compiled to **Qualcomm Hexagon NPU context binaries** for the
17
+ **Snapdragon 8 Gen 2**, 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
+ 73
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
+ 43
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:458f3760c52bcdc5a9f4dc2e65cddf879dff7c6a089343e3325d465d79965b00
3
+ size 163037184
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:cbe05931fef301f8e601ef712b50f23fa4e6d4c0f6af02be1c1fecd0ca831c7b
3
+ size 881848320
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:862576aa204076e17f22b2eb0259257300418ecb7ea92410df715df539c3bf27
3
+ size 64286720