darkmaniac7 commited on
Commit
87e1518
·
verified ·
1 Parent(s): 7147a64

#220 manifest: add on-device IP-encode models to v75/v81 sets + ip_encode_models block

Browse files
Files changed (1) hide show
  1. manifest.json +72 -2
manifest.json CHANGED
@@ -14,7 +14,8 @@
14
  "source=ours: clean-room RealVisXL -> W8A16 -> QAIRT 2.40 conversion, drop-in for our libsdxl_qnn_driver (graph name 'model', host combined-emb input).",
15
  "verified=true = run on real silicon and confirmed coherent (no body-horror). V75 (Lenovo .69) + V81 (RedMagic .82) device-verified. v73/v79 offline-validated, awaiting handsets.",
16
  "The 4 per-arch bins (unet/text_encoder_1_fp16/text_encoder_2_fp16/sdxl_emb_mlp) are the only RealVisXL swap; taesdxl_decoder.mnn (universal SDXL tiny-VAE) + the dual CLIP tokenizers + config are checkpoint-agnostic and byte-identical to the prior set.",
17
- "#208 reference-image (IP-Adapter): per-arch IP-Adapter context bins (unet_ip.bin) added under ip/v75 + ip/v81 (each set's files map). Identity-agnostic (k_ip/v_ip computed per-render on CPU). V75 device-verified (ArcFace 0.417); V81 compiled, on-device-validation pending. Base sets + driver_required_files UNCHANGED."
 
18
  ],
19
  "arch_to_socs": {
20
  "73": {
@@ -169,6 +170,26 @@
169
  "size": 2643410944,
170
  "md5": "ed58c09c834409d2fafbef8fb61fbad4"
171
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
172
  "text_encoder_1_fp16.bin": {
173
  "path": "v75/text_encoder_1_fp16.bin",
174
  "size": 234770432,
@@ -340,6 +361,26 @@
340
  "size": 2648719360,
341
  "md5": "80a8f1342ed20aed802eb3eee45219a3"
342
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
343
  "text_encoder_1_fp16.bin": {
344
  "path": "v81/text_encoder_1_fp16.bin",
345
  "size": 234754048,
@@ -465,10 +506,39 @@
465
  "path": "ip/ip_kv_proj_weights.npz",
466
  "size": 1363183986,
467
  "md5": "5ae6610c7f1adf62ff58f7b7751bf508",
468
- "note": "The 70x to_k_ip/to_v_ip Linear weights ([inner,2048]) for the CPU IP side: keys k_0..k_69 / v_0..v_69, plus inner[70] + heads[70]. The on-device encode (CLIP-ViT-H + plus-face Resampler) consumes these to produce the per-render k_ip/v_ip blob. NB the CLIP-ViT-H encoder + plus-face adapter weights are the standard public h94/IP-Adapter SDXL plus-face files (ip_adapter_clip_vision_vith + ip-adapter-plus-face_sdxl_vit-h) and are not re-hosted here.",
469
  "inner_dims": "0..3=640, 4..53=1280, 54..59=640, 60..69=1280 (graph order; matches ImageGenerationSdxlNpuIpKv.INNER_DIMS)"
470
  }
471
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
472
  "blob_format": "IPKV LE: magic 0x564B5049 'IPKV', version=1, nLayers=70, tokens=16, inner[70] uint32, then per layer i: k_ip_i [tokens*inner_i] f32, v_ip_i [tokens*inner_i] f32. Matches native sdxl_main.cpp::SdxlIpKv::load + ImageGenerationSdxlNpuIpKv."
473
  }
474
  }
 
14
  "source=ours: clean-room RealVisXL -> W8A16 -> QAIRT 2.40 conversion, drop-in for our libsdxl_qnn_driver (graph name 'model', host combined-emb input).",
15
  "verified=true = run on real silicon and confirmed coherent (no body-horror). V75 (Lenovo .69) + V81 (RedMagic .82) device-verified. v73/v79 offline-validated, awaiting handsets.",
16
  "The 4 per-arch bins (unet/text_encoder_1_fp16/text_encoder_2_fp16/sdxl_emb_mlp) are the only RealVisXL swap; taesdxl_decoder.mnn (universal SDXL tiny-VAE) + the dual CLIP tokenizers + config are checkpoint-agnostic and byte-identical to the prior set.",
17
+ "#208 reference-image (IP-Adapter): per-arch IP-Adapter context bins (unet_ip.bin) added under ip/v75 + ip/v81 (each set's files map). Identity-agnostic (k_ip/v_ip computed per-render on CPU). V75 device-verified (ArcFace 0.417); V81 compiled, on-device-validation pending. Base sets + driver_required_files UNCHANGED.",
18
+ "#220 NPU IP-encode productionized: the THREE on-device CPU IP-encode models (clip_vision_vith.mnn + its .weight sidecar, ip_resampler.mnn, ip_kv_proj.bin) published under ip/ and added to the v75+v81 sets' files maps (OPTIONAL set; absent -> plain render). They feed the rebuilt libsdxl_qnn_driver.so --encode_ref mode (#215, recompiled WITH ip_ref_encoder.cpp) so reference-image identity works fully from the shipped APK + the on-device-downloaded bundle. Base sets, unet_ip bins, and driver_required_files UNCHANGED (additive only)."
19
  ],
20
  "arch_to_socs": {
21
  "73": {
 
170
  "size": 2643410944,
171
  "md5": "ed58c09c834409d2fafbef8fb61fbad4"
172
  },
173
+ "clip_vision_vith.mnn": {
174
+ "path": "ip/clip_vision_vith.mnn",
175
+ "size": 413672,
176
+ "md5": "21b2b137a9ce2e2744a95310ca4ebc43"
177
+ },
178
+ "clip_vision_vith.mnn.weight": {
179
+ "path": "ip/clip_vision_vith.mnn.weight",
180
+ "size": 2444349440,
181
+ "md5": "6ff037e79376fee820c11505f796fd37"
182
+ },
183
+ "ip_resampler.mnn": {
184
+ "path": "ip/ip_resampler.mnn",
185
+ "size": 325673960,
186
+ "md5": "1dd445e5477c321ebd89faf691b8cfd6"
187
+ },
188
+ "ip_kv_proj.bin": {
189
+ "path": "ip/ip_kv_proj.bin",
190
+ "size": 1363149100,
191
+ "md5": "36fa9e46b8c7de6712546426245a6d44"
192
+ },
193
  "text_encoder_1_fp16.bin": {
194
  "path": "v75/text_encoder_1_fp16.bin",
195
  "size": 234770432,
 
361
  "size": 2648719360,
362
  "md5": "80a8f1342ed20aed802eb3eee45219a3"
363
  },
364
+ "clip_vision_vith.mnn": {
365
+ "path": "ip/clip_vision_vith.mnn",
366
+ "size": 413672,
367
+ "md5": "21b2b137a9ce2e2744a95310ca4ebc43"
368
+ },
369
+ "clip_vision_vith.mnn.weight": {
370
+ "path": "ip/clip_vision_vith.mnn.weight",
371
+ "size": 2444349440,
372
+ "md5": "6ff037e79376fee820c11505f796fd37"
373
+ },
374
+ "ip_resampler.mnn": {
375
+ "path": "ip/ip_resampler.mnn",
376
+ "size": 325673960,
377
+ "md5": "1dd445e5477c321ebd89faf691b8cfd6"
378
+ },
379
+ "ip_kv_proj.bin": {
380
+ "path": "ip/ip_kv_proj.bin",
381
+ "size": 1363149100,
382
+ "md5": "36fa9e46b8c7de6712546426245a6d44"
383
+ },
384
  "text_encoder_1_fp16.bin": {
385
  "path": "v81/text_encoder_1_fp16.bin",
386
  "size": 234754048,
 
506
  "path": "ip/ip_kv_proj_weights.npz",
507
  "size": 1363183986,
508
  "md5": "5ae6610c7f1adf62ff58f7b7751bf508",
509
+ "note": "The 70x to_k_ip/to_v_ip Linear weights ([inner,2048]) for the CPU IP side (.npz provenance/source form): keys k_0..k_69 / v_0..v_69, plus inner[70] + heads[70]. The on-device encode (CLIP-ViT-H + plus-face Resampler) consumes the packed ip_kv_proj.bin form (see ip_encode_models) to produce the per-render k_ip/v_ip blob.",
510
  "inner_dims": "0..3=640, 4..53=1280, 54..59=640, 60..69=1280 (graph order; matches ImageGenerationSdxlNpuIpKv.INNER_DIMS)"
511
  }
512
  },
513
+ "ip_encode_models": {
514
+ "note": "#220 — the THREE on-device CPU IP-encode MNN/bin models (+ CLIP-vision .weight sidecar) that turn the attached reference image into the per-render k_ip/v_ip blob, ALL on CPU via MNN inside the driver's --encode_ref mode (no DSP, identity-agnostic graphs). Arch-agnostic (pure CPU), so the same files serve every set; each per-arch set's `files` map references them under `ip/`. The app's ImageGenerationSdxlNpuDownloadPlan treats them as OPTIONAL bundle files (downloaded with the IP add-on, never required; absent -> reference silently degrades to a plain render). V75 device-verified end-to-end (ArcFace ~0.44 from the shipped libsdxl_qnn_driver.so --encode_ref + these on-device-downloaded models).",
515
+ "files": {
516
+ "clip_vision_vith.mnn": {
517
+ "path": "ip/clip_vision_vith.mnn",
518
+ "size": 413672,
519
+ "md5": "21b2b137a9ce2e2744a95310ca4ebc43",
520
+ "note": "CLIP-ViT-H vision graph (penultimate-hidden output [1,257,1280]); MNN large-model form -> carries the clip_vision_vith.mnn.weight external-weights sidecar which MUST sit next to it."
521
+ },
522
+ "clip_vision_vith.mnn.weight": {
523
+ "path": "ip/clip_vision_vith.mnn.weight",
524
+ "size": 2444349440,
525
+ "md5": "6ff037e79376fee820c11505f796fd37",
526
+ "note": "MNN external-weights sidecar for clip_vision_vith.mnn (must co-locate)."
527
+ },
528
+ "ip_resampler.mnn": {
529
+ "path": "ip/ip_resampler.mnn",
530
+ "size": 325673960,
531
+ "md5": "1dd445e5477c321ebd89faf691b8cfd6",
532
+ "note": "Plus-face Resampler (IPAdapterPlusImageProjection) -> 16 image-prompt tokens [1,16,2048]."
533
+ },
534
+ "ip_kv_proj.bin": {
535
+ "path": "ip/ip_kv_proj.bin",
536
+ "size": 1363149100,
537
+ "md5": "36fa9e46b8c7de6712546426245a6d44",
538
+ "note": "Packed 70x to_k_ip/to_v_ip Linear weights (driver-consumable form of ip_kv_proj_weights.npz, magic 'IPKW'); the encoder applies these to the resampler tokens to produce the IPKV blob."
539
+ }
540
+ }
541
+ },
542
  "blob_format": "IPKV LE: magic 0x564B5049 'IPKV', version=1, nLayers=70, tokens=16, inner[70] uint32, then per layer i: k_ip_i [tokens*inner_i] f32, v_ip_i [tokens*inner_i] f32. Matches native sdxl_main.cpp::SdxlIpKv::load + ImageGenerationSdxlNpuIpKv."
543
  }
544
  }