oidn-web 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +83 -19
  3. package/dist/oidn.js +3239 -2642
  4. package/dist/oidn.umd.cjs +512 -296
  5. package/lib/UNet.d.ts +54 -20
  6. package/lib/UNet.js +194 -118
  7. package/lib/UNet.js.map +1 -1
  8. package/lib/backend.d.ts +1 -8
  9. package/lib/backend.js +1 -9
  10. package/lib/backend.js.map +1 -1
  11. package/lib/finalRgbShader.d.ts +13 -0
  12. package/lib/finalRgbShader.js +160 -0
  13. package/lib/finalRgbShader.js.map +1 -0
  14. package/lib/graphOptimizer.js +1 -2
  15. package/lib/graphOptimizer.js.map +1 -1
  16. package/lib/hdrTransfer.d.ts +14 -0
  17. package/lib/hdrTransfer.js +61 -0
  18. package/lib/hdrTransfer.js.map +1 -0
  19. package/lib/main.d.ts +16 -7
  20. package/lib/main.js +4 -5
  21. package/lib/main.js.map +1 -1
  22. package/lib/nativeUNet.d.ts +39 -3
  23. package/lib/nativeUNet.js +449 -120
  24. package/lib/nativeUNet.js.map +1 -1
  25. package/lib/process.d.ts +5 -11
  26. package/lib/process.js +35 -49
  27. package/lib/process.js.map +1 -1
  28. package/lib/tileScheduler.d.ts +32 -4
  29. package/lib/tileScheduler.js +133 -20
  30. package/lib/tileScheduler.js.map +1 -1
  31. package/package.json +9 -2
  32. package/src/UNet.ts +287 -158
  33. package/src/backend.ts +1 -14
  34. package/src/finalRgbShader.ts +186 -0
  35. package/src/graphOptimizer.ts +1 -2
  36. package/src/hdrTransfer.ts +88 -0
  37. package/src/main.ts +28 -13
  38. package/src/nativeUNet.ts +515 -116
  39. package/src/process.ts +43 -70
  40. package/src/tileScheduler.ts +216 -24
  41. package/benchmarks/compare.mjs +0 -651
  42. package/benchmarks/leak.mjs +0 -255
  43. package/benchmarks/results/before-spatial.json +0 -391
  44. package/benchmarks/results/before-spatial.md +0 -47
  45. package/benchmarks/results/int8-scan.json +0 -2007
  46. package/benchmarks/results/int8-scan.md +0 -160
  47. package/benchmarks/results/int8-w8a8-scan.json +0 -2007
  48. package/benchmarks/results/int8-w8a8-scan.md +0 -160
  49. package/benchmarks/results/int8-weight-channel.json +0 -1413
  50. package/benchmarks/results/int8-weight-channel.md +0 -118
  51. package/benchmarks/results/int8-weight-only.json +0 -1437
  52. package/benchmarks/results/int8-weight-only.md +0 -118
  53. package/benchmarks/results/kernel-webnn-final.json +0 -1115
  54. package/benchmarks/results/kernel-webnn-final.md +0 -104
  55. package/benchmarks/results/latest-optimized.json +0 -375
  56. package/benchmarks/results/latest-optimized.md +0 -47
  57. package/benchmarks/results/latest.json +0 -391
  58. package/benchmarks/results/latest.md +0 -47
  59. package/benchmarks/results/profile-baseline.json +0 -331
  60. package/benchmarks/results/profile-baseline.md +0 -12
  61. package/benchmarks/results/profile-conv2x.json +0 -331
  62. package/benchmarks/results/profile-conv2x.md +0 -12
  63. package/benchmarks/results/profile-fast-init.json +0 -385
  64. package/benchmarks/results/profile-fast-init.md +0 -47
  65. package/benchmarks/results/profile-fp16-fma.json +0 -369
  66. package/benchmarks/results/profile-fp16-fma.md +0 -47
  67. package/benchmarks/results/profile-fp16-tiled-decoder.json +0 -369
  68. package/benchmarks/results/profile-fp16-tiled-decoder.md +0 -47
  69. package/benchmarks/results/profile-fp16-tiled-encoder.json +0 -369
  70. package/benchmarks/results/profile-fp16-tiled-encoder.md +0 -47
  71. package/benchmarks/results/profile-fp16-unfused-pool.json +0 -385
  72. package/benchmarks/results/profile-fp16-unfused-pool.md +0 -47
  73. package/benchmarks/results/profile-input-major.json +0 -347
  74. package/benchmarks/results/profile-input-major.md +0 -12
  75. package/benchmarks/results/profile-k16.json +0 -347
  76. package/benchmarks/results/profile-k16.md +0 -12
  77. package/benchmarks/results/profile-k4.json +0 -347
  78. package/benchmarks/results/profile-k4.md +0 -12
  79. package/benchmarks/results/profile-pool-reuse.json +0 -331
  80. package/benchmarks/results/profile-pool-reuse.md +0 -12
  81. package/benchmarks/results/profile-precompiled.json +0 -385
  82. package/benchmarks/results/profile-precompiled.md +0 -47
  83. package/benchmarks/results/profile-static-channels.json +0 -385
  84. package/benchmarks/results/profile-static-channels.md +0 -47
  85. package/benchmarks/results/profile-static-io.json +0 -385
  86. package/benchmarks/results/profile-static-io.md +0 -47
  87. package/benchmarks/results/profile-tiled-conv.json +0 -331
  88. package/benchmarks/results/profile-tiled-conv.md +0 -12
  89. package/benchmarks/results/profile-tiled-decoder.json +0 -347
  90. package/benchmarks/results/profile-tiled-decoder.md +0 -12
  91. package/benchmarks/results/profile-tiled-matmul.json +0 -331
  92. package/benchmarks/results/profile-tiled-matmul.md +0 -12
  93. package/benchmarks/results/profile-unfused-decoder.json +0 -379
  94. package/benchmarks/results/profile-unfused-decoder.md +0 -12
  95. package/benchmarks/results/profile-unfused-pool.json +0 -347
  96. package/benchmarks/results/profile-unfused-pool.md +0 -12
  97. package/benchmarks/results/spatial-auto.json +0 -575
  98. package/benchmarks/results/spatial-auto.md +0 -61
  99. package/benchmarks/results/subgroup-smoke.json +0 -1094
  100. package/benchmarks/results/subgroup-smoke.md +0 -104
  101. package/benchmarks/results/webnn-smoke.json +0 -739
  102. package/benchmarks/results/webnn-smoke.md +0 -76
  103. package/scripts/inspect-model.mjs +0 -64
  104. package/tests/modelSpec.test.mjs +0 -128
  105. package/tests/resourceLifecycle.test.mjs +0 -383
  106. package/tests/tileScheduler.test.mjs +0 -90
@@ -1,347 +0,0 @@
1
- {
2
- "generatedAt": "2026-08-20T03:48:43.792Z",
3
- "currentCommit": "5d9c1c8771e2a03c90bfadafec4b5dd28fada446",
4
- "baselineCommit": "136c00c34aa5cf4561b4137034dbd643177f0a5f",
5
- "settings": {
6
- "width": 512,
7
- "height": 512,
8
- "tileSize": 512,
9
- "warmup": 1,
10
- "runs": 3,
11
- "model": "rt_hdr_calb_cnrm_large.tza",
12
- "gpuQueueCompletionIncluded": true
13
- },
14
- "browser": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
15
- "adapter": {
16
- "vendor": "apple",
17
- "architecture": "metal-3",
18
- "device": "",
19
- "description": ""
20
- },
21
- "results": [
22
- {
23
- "label": "TFJS (136c00c)",
24
- "bundle": "baseline",
25
- "baseline": true,
26
- "initializationMs": 8.799999997019768,
27
- "timesMs": [
28
- 36.600000001490116,
29
- 37.20000000298023,
30
- 36.899999998509884
31
- ],
32
- "supportsFP16": true,
33
- "adapter": {
34
- "vendor": "apple",
35
- "architecture": "metal-3",
36
- "device": "",
37
- "description": ""
38
- },
39
- "summary": {
40
- "minMs": 36.600000001490116,
41
- "medianMs": 36.899999998509884,
42
- "meanMs": 36.90000000099341,
43
- "p95Ms": 37.20000000298023,
44
- "maxMs": 37.20000000298023
45
- },
46
- "messages": []
47
- },
48
- {
49
- "label": "WGSL FP32",
50
- "bundle": "current",
51
- "baseline": false,
52
- "precision": "fp32",
53
- "initializationMs": 355.40000000596046,
54
- "timesMs": [
55
- 48,
56
- 47.5,
57
- 47.69999999552965
58
- ],
59
- "executionProfile": {
60
- "totalMs": 47.629445999999994,
61
- "layers": [
62
- {
63
- "id": "input-pack",
64
- "durationMs": 0.050289
65
- },
66
- {
67
- "id": "enc_conv1a",
68
- "durationMs": 1.577928
69
- },
70
- {
71
- "id": "enc_conv1b",
72
- "durationMs": 4.585749
73
- },
74
- {
75
- "id": "pool1",
76
- "durationMs": 0.406064
77
- },
78
- {
79
- "id": "enc_conv2a",
80
- "durationMs": 1.685465
81
- },
82
- {
83
- "id": "enc_conv2b",
84
- "durationMs": 3.047318
85
- },
86
- {
87
- "id": "pool2",
88
- "durationMs": 0.076746
89
- },
90
- {
91
- "id": "enc_conv3a",
92
- "durationMs": 0.88696
93
- },
94
- {
95
- "id": "enc_conv3b",
96
- "durationMs": 1.219486
97
- },
98
- {
99
- "id": "pool3",
100
- "durationMs": 0.018207
101
- },
102
- {
103
- "id": "enc_conv4a",
104
- "durationMs": 0.489644
105
- },
106
- {
107
- "id": "enc_conv4b",
108
- "durationMs": 0.730759
109
- },
110
- {
111
- "id": "pool4",
112
- "durationMs": 0.008458
113
- },
114
- {
115
- "id": "enc_conv5a",
116
- "durationMs": 0.292319
117
- },
118
- {
119
- "id": "enc_conv5b",
120
- "durationMs": 0.391357
121
- },
122
- {
123
- "id": "dec_conv4a",
124
- "durationMs": 1.67834
125
- },
126
- {
127
- "id": "dec_conv4b",
128
- "durationMs": 0.799923
129
- },
130
- {
131
- "id": "dec_conv3a",
132
- "durationMs": 3.641583
133
- },
134
- {
135
- "id": "dec_conv3b",
136
- "durationMs": 1.175446
137
- },
138
- {
139
- "id": "dec_conv2a",
140
- "durationMs": 6.973764
141
- },
142
- {
143
- "id": "dec_conv2b",
144
- "durationMs": 2.557925
145
- },
146
- {
147
- "id": "dec_conv1a",
148
- "durationMs": 10.194909
149
- },
150
- {
151
- "id": "dec_conv1b",
152
- "durationMs": 5.091601
153
- },
154
- {
155
- "id": "dec_conv1c",
156
- "durationMs": 0.049206
157
- }
158
- ]
159
- },
160
- "runtimeInfo": {
161
- "configuredEngine": "wgsl",
162
- "gpuEngine": "wgsl",
163
- "precision": "fp32",
164
- "model": "oidn-unet-large-v1",
165
- "modelFamily": "oidn-unet-large",
166
- "inputChannels": 9,
167
- "dynamicTile": {
168
- "enabled": false,
169
- "currentTileSize": 512,
170
- "minTileSize": 256,
171
- "maxTileSize": 512,
172
- "targetTileTimeMs": 16
173
- },
174
- "lastExecution": {
175
- "width": 512,
176
- "height": 512,
177
- "tileWidth": 512,
178
- "tileHeight": 512,
179
- "tileCount": 1,
180
- "durationMs": 49.600000001490116,
181
- "tileTimeMs": {
182
- "min": 49.600000001490116,
183
- "median": 49.600000001490116,
184
- "mean": 49.600000001490116,
185
- "max": 49.600000001490116
186
- }
187
- }
188
- },
189
- "supportsFP16": true,
190
- "adapter": {
191
- "vendor": "apple",
192
- "architecture": "metal-3",
193
- "device": "",
194
- "description": ""
195
- },
196
- "summary": {
197
- "minMs": 47.5,
198
- "medianMs": 47.69999999552965,
199
- "meanMs": 47.73333333184322,
200
- "p95Ms": 48,
201
- "maxMs": 48
202
- },
203
- "messages": []
204
- },
205
- {
206
- "label": "WGSL FP16",
207
- "bundle": "current",
208
- "baseline": false,
209
- "precision": "fp16",
210
- "initializationMs": 24.100000001490116,
211
- "timesMs": [
212
- 33.899999998509884,
213
- 34.100000001490116,
214
- 33.80000000447035
215
- ],
216
- "executionProfile": {
217
- "totalMs": 32.694005000000004,
218
- "layers": [
219
- {
220
- "id": "input-pack",
221
- "durationMs": 0.045578
222
- },
223
- {
224
- "id": "enc_conv1a",
225
- "durationMs": 0.73663
226
- },
227
- {
228
- "id": "pool1",
229
- "durationMs": 4.176678
230
- },
231
- {
232
- "id": "enc_conv2a",
233
- "durationMs": 1.511464
234
- },
235
- {
236
- "id": "pool2",
237
- "durationMs": 2.724084
238
- },
239
- {
240
- "id": "enc_conv3a",
241
- "durationMs": 0.781666
242
- },
243
- {
244
- "id": "pool3",
245
- "durationMs": 0.964231
246
- },
247
- {
248
- "id": "enc_conv4a",
249
- "durationMs": 0.360212
250
- },
251
- {
252
- "id": "pool4",
253
- "durationMs": 0.589687
254
- },
255
- {
256
- "id": "enc_conv5a",
257
- "durationMs": 0.195062
258
- },
259
- {
260
- "id": "enc_conv5b",
261
- "durationMs": 0.253264
262
- },
263
- {
264
- "id": "dec_conv4a",
265
- "durationMs": 0.959189
266
- },
267
- {
268
- "id": "dec_conv4b",
269
- "durationMs": 0.536068
270
- },
271
- {
272
- "id": "dec_conv3a",
273
- "durationMs": 1.745896
274
- },
275
- {
276
- "id": "dec_conv3b",
277
- "durationMs": 1.529087
278
- },
279
- {
280
- "id": "dec_conv2a",
281
- "durationMs": 3.287357
282
- },
283
- {
284
- "id": "dec_conv2b",
285
- "durationMs": 2.341458
286
- },
287
- {
288
- "id": "dec_conv1a",
289
- "durationMs": 5.297934
290
- },
291
- {
292
- "id": "dec_conv1b",
293
- "durationMs": 4.097104
294
- },
295
- {
296
- "id": "dec_conv1c",
297
- "durationMs": 0.561356
298
- }
299
- ]
300
- },
301
- "runtimeInfo": {
302
- "configuredEngine": "wgsl",
303
- "gpuEngine": "wgsl",
304
- "precision": "fp16",
305
- "model": "oidn-unet-large-v1",
306
- "modelFamily": "oidn-unet-large",
307
- "inputChannels": 9,
308
- "dynamicTile": {
309
- "enabled": false,
310
- "currentTileSize": 512,
311
- "minTileSize": 256,
312
- "maxTileSize": 512,
313
- "targetTileTimeMs": 16
314
- },
315
- "lastExecution": {
316
- "width": 512,
317
- "height": 512,
318
- "tileWidth": 512,
319
- "tileHeight": 512,
320
- "tileCount": 1,
321
- "durationMs": 34.5,
322
- "tileTimeMs": {
323
- "min": 34.5,
324
- "median": 34.5,
325
- "mean": 34.5,
326
- "max": 34.5
327
- }
328
- }
329
- },
330
- "supportsFP16": true,
331
- "adapter": {
332
- "vendor": "apple",
333
- "architecture": "metal-3",
334
- "device": "",
335
- "description": ""
336
- },
337
- "summary": {
338
- "minMs": 33.80000000447035,
339
- "medianMs": 33.899999998509884,
340
- "meanMs": 33.93333333482345,
341
- "p95Ms": 34.100000001490116,
342
- "maxMs": 34.100000001490116
343
- },
344
- "messages": []
345
- }
346
- ]
347
- }
@@ -1,12 +0,0 @@
1
- # oidn-web benchmark
2
-
3
- - Current: `5d9c1c8771e2a03c90bfadafec4b5dd28fada446`
4
- - TFJS baseline: `136c00c34aa5cf4561b4137034dbd643177f0a5f`
5
- - Input: 512x512, fixed tile 512, 3 runs after 1 warmup(s)
6
- - Adapter: apple
7
-
8
- | Runtime | Init ms | Median ms | P95 ms | Speedup | Precision |
9
- | --- | ---: | ---: | ---: | ---: | --- |
10
- | TFJS (136c00c) | 8.80 | 36.90 | 37.20 | 1.00x | fp32 |
11
- | WGSL FP32 | 355.40 | 47.70 | 48.00 | 0.77x | fp32 |
12
- | WGSL FP16 | 24.10 | 33.90 | 34.10 | 1.09x | fp16 |