hammamiomar commited on
Commit
58f2379
·
verified ·
1 Parent(s): d36ebbf

Publish verified Dream v1 browser artifacts

Browse files
README.md ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: onnxruntime
3
+ license: other
4
+ tags:
5
+ - webgpu
6
+ - onnx
7
+ - dinov2
8
+ - feature-visualization
9
+ ---
10
+
11
+ # SAM_CAM_BAM Dream model pack
12
+
13
+ This is the immutable browser artifact pack for the experimental **Dream**
14
+ mode in [SAM_CAM_BAM](https://github.com/hammamiomar/SAM_CAM_BAM). It is not a
15
+ general-purpose pipeline. The app combines these files with a small handwritten
16
+ WebGPU block-transfer kernel.
17
+
18
+ Dream encodes a live source frame and an uploaded donor image with
19
+ DINOv2-B/14-with-registers, selects eight learned rank-3 block subspaces from a
20
+ clicked donor patch, transfers those projections to every source patch, and
21
+ decodes the edited patch field with an RAE ViT-B decoder. Inference stays in the
22
+ browser; this repository only serves static model bytes.
23
+
24
+ ## Files
25
+
26
+ | File | Bytes | SHA-256 | Purpose |
27
+ | --- | ---: | --- | --- |
28
+ | `dinov2-vitb14-reg-q4f16.onnx` | 51,374,908 | `ef0feac82fd3fc1310aba8c38390fee86367b8c9e553a9846ce3488c29494ee5` | DINO encoder when shader-f16 is available |
29
+ | `dinov2-vitb14-reg-q4.onnx` | 59,978,957 | `02996745913d0654d8571cef0de689a7d3a4870b3deacf9b41d6c13b6dca7fd1` | Portable DINO encoder fallback |
30
+ | `dinov2-vitb14-reg-bsf-g8192-r3-f16.bin` | 38,547,520 | `54f6243b339af889ac826faf9fb5b535e3135e41068117ba6c78f95ad7ecbf61` | 8,192 orthonormal rank-3 frames, position mean, and encoder affine data |
31
+ | `rae-vitb-decoder-int8-qdq.onnx` | 87,946,239 | `cb31eec571791e3f3ab9cc03abd63841603ffbce85853423f47a75e53a907691` | Static 256-patch to 256×256 RGB decoder |
32
+
33
+ `manifest.json` records the complete source identities, tensor contracts, and
34
+ verification results. The pack is consumed by commit-pinned URLs; `main` is not
35
+ a runtime contract.
36
+
37
+ ## Verification
38
+
39
+ The build script refuses source artifacts whose hashes differ from its pinned
40
+ inputs. The published pack passed:
41
+
42
+ - maximum BSF frame Gram error: `5.96e-7`;
43
+ - decoder int8-QDQ versus FP32 PSNR: `39.45 dB`;
44
+ - float16 versus float32 selector mean top-8 overlap: `1.0`; and
45
+ - exact ordered top-8 agreement on 254 of 256 fixture patches, including the
46
+ default strongest patch.
47
+
48
+ The reproducible build and checks live in
49
+ [`tools/dream_models.py`](https://github.com/hammamiomar/SAM_CAM_BAM/blob/main/tools/dream_models.py).
50
+
51
+ ## Provenance and terms
52
+
53
+ - The two encoder graphs are byte-identical copies from
54
+ [`onnx-community/dinov2-with-registers-base`](https://huggingface.co/onnx-community/dinov2-with-registers-base),
55
+ revision `fcd050203baf48e192055356f379b5949a111255`. DINOv2 code and model
56
+ weights are Apache-2.0.
57
+ - The decoder was exported from RAE source
58
+ [`bytetriper/RAE`](https://github.com/bytetriper/RAE) at
59
+ `a4d18c4db766419cbe7cb8c02cd9f7ceb0ec9041`, then its 74 constant matrix
60
+ weights were quantized to int8 QDQ. The RAE source repository is MIT.
61
+ - The decoder checkpoint came from
62
+ [`nyu-visionx/RAE-dinov2-wReg-base-ViTXL-n08`](https://huggingface.co/nyu-visionx/RAE-dinov2-wReg-base-ViTXL-n08),
63
+ revision `eb1744fb3fc4269bb37a804a1afeed1194bc105c`. That upstream model card
64
+ does **not** state a checkpoint license. This repository does not infer one
65
+ or grant rights beyond the upstream terms.
66
+ - The BSF field is an Omar Hammami-trained artifact over calibrated DINOv2
67
+ patch states. Its exact checkpoint and calibration hashes are in the
68
+ manifest.
69
+
70
+ ## Limits
71
+
72
+ Dream is a creative feature-visualization experiment, not segmentation,
73
+ depth, restoration, or identity-preserving image editing. Inputs are resampled
74
+ to 224×224 and output is 256×256. Results can distort content, faces, text, and
75
+ fine structure and inherit limitations from the source models and their
76
+ training data.
dinov2-vitb14-reg-bsf-g8192-r3-f16.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:54f6243b339af889ac826faf9fb5b535e3135e41068117ba6c78f95ad7ecbf61
3
+ size 38547520
dinov2-vitb14-reg-q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:02996745913d0654d8571cef0de689a7d3a4870b3deacf9b41d6c13b6dca7fd1
3
+ size 59978957
dinov2-vitb14-reg-q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ef0feac82fd3fc1310aba8c38390fee86367b8c9e553a9846ce3488c29494ee5
3
+ size 51374908
manifest.json ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "schema": "sam-cam-bam.dream-model-pack.v1",
3
+ "sources": {
4
+ "dinov2_repository": "onnx-community/dinov2-with-registers-base",
5
+ "dinov2_revision": "fcd050203baf48e192055356f379b5949a111255",
6
+ "bsf_sha256": "dd1772717b232d3ca4d26a0f5765ba1317a437efffd6852099ba0c4af91d9492",
7
+ "calibration_sha256": "1c8f62b76f2f4dbfc723b76149a2d3a3bdb323f1eadbade844a643cb59507df7",
8
+ "rae_source_repository": "bytetriper/RAE",
9
+ "rae_source_revision": "a4d18c4db766419cbe7cb8c02cd9f7ceb0ec9041",
10
+ "rae_checkpoint_repository": "nyu-visionx/RAE-dinov2-wReg-base-ViTXL-n08",
11
+ "rae_checkpoint_revision": "eb1744fb3fc4269bb37a804a1afeed1194bc105c",
12
+ "rae_checkpoint_sha256": "e22ee0b73d58d069c108da1892798c280089593e39733a79e11e211999f42a27"
13
+ },
14
+ "artifacts": [
15
+ {
16
+ "file": "dinov2-vitb14-reg-q4f16.onnx",
17
+ "bytes": 51374908,
18
+ "sha256": "ef0feac82fd3fc1310aba8c38390fee86367b8c9e553a9846ce3488c29494ee5",
19
+ "role": "encoder-q4f16",
20
+ "input": {
21
+ "pixel_values": [
22
+ 1,
23
+ 3,
24
+ 224,
25
+ 224
26
+ ]
27
+ },
28
+ "output": {
29
+ "last_hidden_state": [
30
+ 1,
31
+ 261,
32
+ 768
33
+ ]
34
+ }
35
+ },
36
+ {
37
+ "file": "dinov2-vitb14-reg-q4.onnx",
38
+ "bytes": 59978957,
39
+ "sha256": "02996745913d0654d8571cef0de689a7d3a4870b3deacf9b41d6c13b6dca7fd1",
40
+ "role": "encoder-q4",
41
+ "input": {
42
+ "pixel_values": [
43
+ 1,
44
+ 3,
45
+ 224,
46
+ 224
47
+ ]
48
+ },
49
+ "output": {
50
+ "last_hidden_state": [
51
+ 1,
52
+ 261,
53
+ 768
54
+ ]
55
+ }
56
+ },
57
+ {
58
+ "file": "rae-vitb-decoder-int8-qdq.onnx",
59
+ "bytes": 87946239,
60
+ "sha256": "cb31eec571791e3f3ab9cc03abd63841603ffbce85853423f47a75e53a907691",
61
+ "role": "decoder-int8-qdq",
62
+ "input": {
63
+ "tokens": [
64
+ 1,
65
+ 256,
66
+ 768
67
+ ]
68
+ },
69
+ "output": {
70
+ "image": [
71
+ 1,
72
+ 3,
73
+ 256,
74
+ 256
75
+ ]
76
+ }
77
+ },
78
+ {
79
+ "file": "dinov2-vitb14-reg-bsf-g8192-r3-f16.bin",
80
+ "bytes": 38547520,
81
+ "sha256": "54f6243b339af889ac826faf9fb5b535e3135e41068117ba6c78f95ad7ecbf61",
82
+ "role": "bsf-field",
83
+ "layout": "sam-cam-bam.bsf-field.v1"
84
+ }
85
+ ],
86
+ "verification": {
87
+ "quantized_matmul_weights": 74,
88
+ "gram_max_error": 5.960464477539062e-07,
89
+ "calibration_scale": 1.1635750841519952,
90
+ "gamma_min_abs_q4f16": 0.1900634765625,
91
+ "gamma_min_abs_q4": 0.19005857408046722,
92
+ "decoder_psnr_db": 39.4513159114436,
93
+ "float16_mean_top8_overlap": 1.0,
94
+ "float16_exact_top8_patches": 254,
95
+ "default_patch": 162,
96
+ "default_blocks": [
97
+ 6278,
98
+ 7956,
99
+ 1299,
100
+ 5060,
101
+ 5783,
102
+ 5133,
103
+ 2796,
104
+ 3135
105
+ ]
106
+ }
107
+ }
rae-vitb-decoder-int8-qdq.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cb31eec571791e3f3ab9cc03abd63841603ffbce85853423f47a75e53a907691
3
+ size 87946239