File size: 8,106 Bytes
39ae3a9
 
 
 
 
 
209bad2
39ae3a9
 
 
 
 
 
209bad2
39ae3a9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209bad2
 
 
 
 
39ae3a9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209bad2
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
{
  "schema": "tokforge-sdxl-qnn-npu/manifest@1",
  "model": "sdxl-turbo",
  "variant": "fp16-encoders + TAESDXL",
  "license": "Stability AI Community License (SDXL-Turbo)",
  "license_note": "Commercial use permitted for orgs/individuals with < $1M USD annual revenue; above that requires a Stability AI Enterprise license. Attribution + license text must be retained with the model. NOT OpenRAIL (that was SD1.5).",
  "generated": "2026-06-05T00:00:00Z",
  "repo": "darkmaniac7/TokForge-SDXL-QNN-NPU (PRIVATE)",
  "notes": [
    "App reads the device Hexagon arch (dsp_arch) and picks the matching set. SDXL ships ONE own-built set today: V75-native (ours).",
    "Forward-compat: a lower-arch bin runs on a higher-arch DSP. The V75-native SDXL set is forward-compat to V79/V81 silicon (verified on the V81 SM8850 handset, .82 + .80). NATIVE V81/V79 SDXL bins are NOT separately built yet.",
    "source=ours: our own clean-room SDXL-Turbo -> W8A16 -> QAIRT 2.40 conversion, drop-in for our libsdxl_qnn_driver (graph name 'model', host combined-emb input). There is no AI-Hub SDXL set in this repo.",
    "verified=true means run on real silicon and confirmed coherent+crisp. verified=false = produced + offline-validated but NEEDS a handset before NPU-enabling.",
    "VAE: \"Faster image decoding\" ON (default) = TAESDXL CPU tiny-VAE (taesdxl_decoder.mnn, 2.4 MB, fast ~6s, soft) via --vae_mnn / SDXL_VAE_BACKEND=cpu. OFF = full SDXL CPU VAE (vae_decoder_cpu.mnn, 99 MB, cos 1.0 vs torch, sharp ~40s on CPU), also via --vae_mnn (the driver loads either MNN VAE). The DSP VAE is blocked at 1024px on V75 (unsigned-PD HTP cap) and the OpenCL/Vulkan VAE SIGSEGVs Adreno in Session::resize, so BOTH VAEs are CPU MNN. The full VAE is OPTIONAL (optional_files) and downloaded WITH the bundle so it is present when the user turns Faster-decoding off; absence falls back to TAESDXL.",
    "On-device fresh download is ~4.3 GB (4,308,394,979 bytes): unet.bin 2.6 GB + text_encoder_2_fp16 1.4 GB + text_encoder_1_fp16 235 MB + sdxl_emb_mlp 29 MB + taesdxl 2.4 MB + tokenizers/config."
  ],
  "arch_to_socs": {
    "73": {
      "name": "Hexagon V73",
      "socs": [
        "SM8550 (Snapdragon 8 Gen 2)",
        "SM8635 (8s Gen 3)",
        "SM7475 (7+ Gen 3)"
      ]
    },
    "75": {
      "name": "Hexagon V75",
      "socs": [
        "SM8650 (Snapdragon 8 Gen 3)",
        "SM7675 (7 Gen 4)"
      ]
    },
    "79": {
      "name": "Hexagon V79",
      "socs": [
        "SM8750 (Snapdragon 8 Elite)",
        "SM8750-AB (8 Elite for Galaxy)"
      ]
    },
    "81": {
      "name": "Hexagon V81",
      "socs": [
        "SM8850 (Snapdragon 8 Elite Gen 5)"
      ]
    }
  },
  "io_contracts": {
    "ours-sdxl-emb": {
      "graph_name": "model",
      "unet_inputs": {
        "sample": "[1,4,128,128] UFIXED16 (NCHW, raw scheduler latent)",
        "emb": "[1,1280] UFIXED16 host combined-emb = time_embedding(time_proj(t)) + add_embedding(cat(pooled, add_time_proj(time_ids))); computed host-side via sdxl_emb_mlp.bin to fold-proof BOTH sinusoidal paths qairt-converter 2.40 would constant-fold",
        "text_embedding": "[1,77,2048] UFIXED16 = concat CLIP-L last_hidden[1,77,768] ++ bigG last_hidden[1,77,1280]"
      },
      "unet_output": "output [1,4,128,128] UFIXED16",
      "text_encoder_1": "CLIP-L: in input_ids INT32 [1,77] -> out last_hidden [1,77,768] (penultimate, hidden -2)",
      "text_encoder_2": "OpenCLIP-bigG (+projection): in input_ids INT32 [1,77] -> out last_hidden [1,77,1280] + pooled [1,1280] (pooled feeds the host emb compute)",
      "vae": "TAESDXL CPU tiny-VAE (taesdxl_decoder.mnn), in latent [1,4,128,128] -> out [1,3,1024,1024]; CPU MNN path only (SDXL_VAE_BACKEND=cpu)",
      "scheduler": "EulerAncestralDiscrete, trailing spacing, epsilon prediction, 4 steps native, guidance_scale 0 (NO CFG -> ONE UNet pass per step)",
      "vae_scaling_factor": 0.13025,
      "resolution": 1024,
      "driver": "libsdxl_qnn_driver.so (#51 ImageGenerationSdxlNpuCliHelper); flags --text_encoder_1/--text_encoder_2/--unet/--vae_mnn/--emb_mlp/--vocab_1/--merges_1/--vocab_2/--merges_2/--backend/--system_library; env SDXL_VAE_BACKEND=cpu"
    }
  },
  "sets": {
    "ours/v75": {
      "source": "ours",
      "dsp_arch": 75,
      "representative_soc": "SM8650 (Snapdragon 8 Gen 3)",
      "soc_model": 57,
      "qairt_runtime_required": "2.40",
      "skel": "libQnnHtpV75Skel.so",
      "io_contract": "ours-sdxl-emb",
      "verified": true,
      "verify_note": "Device-verified coherent+crisp on Lenovo SM8650/V75 (.69), EulerAncestral, 4-6 steps. Forward-compat verified: these exact V75-native bins also ran coherent+crisp on the RedMagic SM8850/V81 handset (.82) and a second V81 (.80). Native-V81/V79 SDXL bins NOT separately built; V75-native is the shipping set for V73->V81.",
      "files": {
        "unet.bin": {
          "path": "v75/unet.bin",
          "size": 2637398016,
          "md5": "d7be73631e7c2a57875517c9af09dbe8"
        },
        "text_encoder_1_fp16.bin": {
          "path": "v75/text_encoder_1_fp16.bin",
          "size": 234770432,
          "md5": "4e9612177b6ec68a4c1ea992174cdff7"
        },
        "text_encoder_2_fp16.bin": {
          "path": "v75/text_encoder_2_fp16.bin",
          "size": 1401405440,
          "md5": "3aa8a2ad01be2ba854f1a847ec16a9b8"
        },
        "sdxl_emb_mlp.bin": {
          "path": "v75/sdxl_emb_mlp.bin",
          "size": 29184000,
          "md5": "0cf25084f04c78560d3e58cde177f28c"
        },
        "taesdxl_decoder.mnn": {
          "path": "v75/taesdxl_decoder.mnn",
          "size": 2464388,
          "md5": "bfbfb43faa70fc3885bfef24a60b8882"
        },
        "tokenizer/vocab.json": {
          "path": "v75/tokenizer/vocab.json",
          "size": 1059962,
          "md5": "a3933521163a0e76cee6094f1d72a9cc"
        },
        "tokenizer/merges.txt": {
          "path": "v75/tokenizer/merges.txt",
          "size": 524619,
          "md5": "d2bc10797e70c920c14c69729ecdab34"
        },
        "tokenizer/special_tokens_map.json": {
          "path": "v75/tokenizer/special_tokens_map.json",
          "size": 586,
          "md5": "f1c97d73dc836331f2138893217d32d8"
        },
        "tokenizer/tokenizer_config.json": {
          "path": "v75/tokenizer/tokenizer_config.json",
          "size": 704,
          "md5": "b0e83247e6c27802b6f2ccce2615e402"
        },
        "tokenizer_2/vocab.json": {
          "path": "v75/tokenizer_2/vocab.json",
          "size": 1059962,
          "md5": "a3933521163a0e76cee6094f1d72a9cc"
        },
        "tokenizer_2/merges.txt": {
          "path": "v75/tokenizer_2/merges.txt",
          "size": 524619,
          "md5": "d2bc10797e70c920c14c69729ecdab34"
        },
        "tokenizer_2/special_tokens_map.json": {
          "path": "v75/tokenizer_2/special_tokens_map.json",
          "size": 460,
          "md5": "1f2ba80c3ba1db3a1729f82f0c2667ce"
        },
        "tokenizer_2/tokenizer_config.json": {
          "path": "v75/tokenizer_2/tokenizer_config.json",
          "size": 855,
          "md5": "7a07b6cea8034258f7a153860e81bc41"
        },
        "config.json": {
          "path": "v75/config.json",
          "size": 936,
          "md5": "833a8f609063eee89c093754af978210"
        },
        "vae_decoder_cpu.mnn": {
          "path": "v75/vae_decoder_cpu.mnn",
          "size": 99103692,
          "md5": "5c23735f51d7f9348c351d6224cac16e"
        }
      }
    }
  },
  "driver_required_files": [
    "unet.bin",
    "text_encoder_1_fp16.bin",
    "text_encoder_2_fp16.bin",
    "sdxl_emb_mlp.bin",
    "taesdxl_decoder.mnn",
    "tokenizer/vocab.json",
    "tokenizer/merges.txt",
    "tokenizer_2/vocab.json",
    "tokenizer_2/merges.txt"
  ],
  "install_marker_files": [
    "unet.bin",
    "text_encoder_1_fp16.bin",
    "text_encoder_2_fp16.bin",
    "taesdxl_decoder.mnn"
  ],
  "bundle_dir_name": "SDXL-QNN-NPU",
  "model_id": "image-sdxl-qnn-npu",
  "total_bytes": 4407498671,
  "total_human": "4.41 GB (4.10 GiB) incl. optional full VAE",
  "optional_files": [
    "vae_decoder_cpu.mnn"
  ]
}