@eclipse-docks/extension-in-browser-ml 0.7.127 → 0.7.132

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.
@@ -584,7 +584,7 @@
584
584
  });
585
585
  //#endregion
586
586
  //#region ../../node_modules/onnxruntime-common/dist/esm/tensor-impl-type-mapping.js
587
- const NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP = new Map([
587
+ const NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP = /* @__PURE__ */ new Map([
588
588
  ["float32", Float32Array],
589
589
  ["uint8", Uint8Array],
590
590
  ["int8", Int8Array],
@@ -597,7 +597,7 @@
597
597
  ["int4", Uint8Array],
598
598
  ["uint4", Uint8Array]
599
599
  ]);
600
- const NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP = new Map([
600
+ const NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP = /* @__PURE__ */ new Map([
601
601
  [Float32Array, "float32"],
602
602
  [Uint8Array, "uint8"],
603
603
  [Int8Array, "int8"],
@@ -738,13 +738,15 @@
738
738
  } else {
739
739
  const typedArrayConstructor = NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.get(arg0);
740
740
  if (typedArrayConstructor === void 0) throw new TypeError(`Unsupported tensor type: ${arg0}.`);
741
- if (Array.isArray(arg1)) if (arg0 === "float16" && typedArrayConstructor === Uint16Array || arg0 === "uint4" || arg0 === "int4") throw new TypeError(`Creating a ${arg0} tensor from number array is not supported. Please use ${typedArrayConstructor.name} as data.`);
742
- else if (arg0 === "uint64" || arg0 === "int64") data = typedArrayConstructor.from(arg1, BigInt);
743
- else data = typedArrayConstructor.from(arg1);
744
- else if (arg1 instanceof typedArrayConstructor) data = arg1;
745
- else if (arg1 instanceof Uint8ClampedArray) if (arg0 === "uint8") data = Uint8Array.from(arg1);
746
- else throw new TypeError(`A Uint8ClampedArray tensor's data must be type of uint8`);
747
- else if (arg0 === "float16" && arg1 instanceof Uint16Array && typedArrayConstructor !== Uint16Array) data = new globalThis.Float16Array(arg1.buffer, arg1.byteOffset, arg1.length);
741
+ if (Array.isArray(arg1)) {
742
+ if (arg0 === "float16" && typedArrayConstructor === Uint16Array || arg0 === "uint4" || arg0 === "int4") throw new TypeError(`Creating a ${arg0} tensor from number array is not supported. Please use ${typedArrayConstructor.name} as data.`);
743
+ else if (arg0 === "uint64" || arg0 === "int64") data = typedArrayConstructor.from(arg1, BigInt);
744
+ else data = typedArrayConstructor.from(arg1);
745
+ } else if (arg1 instanceof typedArrayConstructor) data = arg1;
746
+ else if (arg1 instanceof Uint8ClampedArray) {
747
+ if (arg0 === "uint8") data = Uint8Array.from(arg1);
748
+ else throw new TypeError(`A Uint8ClampedArray tensor's data must be type of uint8`);
749
+ } else if (arg0 === "float16" && arg1 instanceof Uint16Array && typedArrayConstructor !== Uint16Array) data = new globalThis.Float16Array(arg1.buffer, arg1.byteOffset, arg1.length);
748
750
  else throw new TypeError(`A ${type} tensor's data must be type of ${typedArrayConstructor}`);
749
751
  }
750
752
  } else {
@@ -776,7 +778,9 @@
776
778
  this.dataLocation = "cpu";
777
779
  }
778
780
  const size = calculateSize(dims);
779
- if (this.cpuData && size !== this.cpuData.length) if ((type === "uint4" || type === "int4") && Math.ceil(size / 2) === this.cpuData.length) {} else throw new Error(`Tensor's size(${size}) does not match data length(${this.cpuData.length}).`);
781
+ if (this.cpuData && size !== this.cpuData.length) {
782
+ if ((type === "uint4" || type === "int4") && Math.ceil(size / 2) === this.cpuData.length) {} else throw new Error(`Tensor's size(${size}) does not match data length(${this.cpuData.length}).`);
783
+ }
780
784
  this.type = type;
781
785
  this.dims = dims;
782
786
  this.size = size;
@@ -1063,7 +1067,8 @@
1063
1067
  get: t[r],
1064
1068
  enumerable: !0
1065
1069
  });
1066
- }, Wp = (e, t, r, n) => {
1070
+ };
1071
+ var Wp = (e, t, r, n) => {
1067
1072
  if (t && typeof t == "object" || typeof t == "function") for (let o of Np(t)) !Vp.call(e, o) && o !== r && zn(e, o, {
1068
1073
  get: () => t[o],
1069
1074
  enumerable: !(n = Up(t, o)) || n.enumerable
@@ -1071,7 +1076,12 @@
1071
1076
  return e;
1072
1077
  };
1073
1078
  var Ft = (e) => Wp(zn({}, "__esModule", { value: !0 }), e);
1074
- var fr, vt, $t, Lp, Fi, Bn = U(() => {
1079
+ var fr;
1080
+ var vt;
1081
+ var $t;
1082
+ var Lp;
1083
+ var Fi;
1084
+ var Bn = U(() => {
1075
1085
  "use strict";
1076
1086
  fr = /* @__PURE__ */ new Map(), vt = [], $t = (e, t, r) => {
1077
1087
  if (t && typeof t.init == "function" && typeof t.createInferenceSessionHandler == "function") {
@@ -1130,11 +1140,14 @@
1130
1140
  "use strict";
1131
1141
  Bn();
1132
1142
  });
1133
- var ji, Ki = U(() => {
1143
+ var ji;
1144
+ var Ki = U(() => {
1134
1145
  "use strict";
1135
1146
  ji = "1.22.0-dev.20250409-89f8206ba4";
1136
1147
  });
1137
- var Zi, Me, Dn = U(() => {
1148
+ var Zi;
1149
+ var Me;
1150
+ var Dn = U(() => {
1138
1151
  "use strict";
1139
1152
  Ki();
1140
1153
  Zi = "warning", Me = {
@@ -1160,12 +1173,15 @@
1160
1173
  };
1161
1174
  Object.defineProperty(Me, "logLevel", { enumerable: !0 });
1162
1175
  });
1163
- var ge, Qi = U(() => {
1176
+ var ge;
1177
+ var Qi = U(() => {
1164
1178
  "use strict";
1165
1179
  Dn();
1166
1180
  ge = Me;
1167
1181
  });
1168
- var Yi, Xi, Ji = U(() => {
1182
+ var Yi;
1183
+ var Xi;
1184
+ var Ji = U(() => {
1169
1185
  "use strict";
1170
1186
  Yi = (e, t) => {
1171
1187
  let r = typeof document < "u" ? document.createElement("canvas") : new OffscreenCanvas(1, 1);
@@ -1261,7 +1277,13 @@
1261
1277
  return n;
1262
1278
  };
1263
1279
  });
1264
- var Mn, ea, ta, ra, na, oa, ia = U(() => {
1280
+ var Mn;
1281
+ var ea;
1282
+ var ta;
1283
+ var ra;
1284
+ var na;
1285
+ var oa;
1286
+ var ia = U(() => {
1265
1287
  "use strict";
1266
1288
  hr();
1267
1289
  Mn = (e, t) => {
@@ -1400,9 +1422,13 @@
1400
1422
  dims: r ?? [t.length]
1401
1423
  });
1402
1424
  });
1403
- var xt, qt, aa, sa, ua = U(() => {
1425
+ var xt;
1426
+ var qt;
1427
+ var aa;
1428
+ var sa;
1429
+ var ua = U(() => {
1404
1430
  "use strict";
1405
- xt = new Map([
1431
+ xt = /* @__PURE__ */ new Map([
1406
1432
  ["float32", Float32Array],
1407
1433
  ["uint8", Uint8Array],
1408
1434
  ["int8", Int8Array],
@@ -1414,7 +1440,7 @@
1414
1440
  ["uint32", Uint32Array],
1415
1441
  ["int4", Uint8Array],
1416
1442
  ["uint4", Uint8Array]
1417
- ]), qt = new Map([
1443
+ ]), qt = /* @__PURE__ */ new Map([
1418
1444
  [Float32Array, "float32"],
1419
1445
  [Uint8Array, "uint8"],
1420
1446
  [Int8Array, "int8"],
@@ -1431,7 +1457,9 @@
1431
1457
  }
1432
1458
  };
1433
1459
  });
1434
- var da, la, ca = U(() => {
1460
+ var da;
1461
+ var la;
1462
+ var ca = U(() => {
1435
1463
  "use strict";
1436
1464
  hr();
1437
1465
  da = (e) => {
@@ -1474,7 +1502,8 @@
1474
1502
  }
1475
1503
  };
1476
1504
  });
1477
- var Pe, hr = U(() => {
1505
+ var Pe;
1506
+ var hr = U(() => {
1478
1507
  "use strict";
1479
1508
  Ji();
1480
1509
  ia();
@@ -1615,12 +1644,17 @@
1615
1644
  }
1616
1645
  };
1617
1646
  });
1618
- var Ge, Rn = U(() => {
1647
+ var Ge;
1648
+ var Rn = U(() => {
1619
1649
  "use strict";
1620
1650
  hr();
1621
1651
  Ge = Pe;
1622
1652
  });
1623
- var gr, pa, Re, Oe, Un = U(() => {
1653
+ var gr;
1654
+ var pa;
1655
+ var Re;
1656
+ var Oe;
1657
+ var Un = U(() => {
1624
1658
  "use strict";
1625
1659
  Dn();
1626
1660
  gr = (e, t) => {
@@ -1641,7 +1675,8 @@
1641
1675
  (typeof Me.trace > "u" ? !Me.wasm.trace : !Me.trace) || pa("END", e);
1642
1676
  };
1643
1677
  });
1644
- var br, ma = U(() => {
1678
+ var br;
1679
+ var ma = U(() => {
1645
1680
  "use strict";
1646
1681
  Bn();
1647
1682
  Rn();
@@ -1739,7 +1774,8 @@
1739
1774
  }
1740
1775
  };
1741
1776
  });
1742
- var Gp, fa = U(() => {
1777
+ var Gp;
1778
+ var fa = U(() => {
1743
1779
  "use strict";
1744
1780
  ma();
1745
1781
  Gp = br;
@@ -1783,7 +1819,10 @@
1783
1819
  });
1784
1820
  var $a = {};
1785
1821
  Dt($a, { default: () => Hp });
1786
- var wa, va, Hp, xa = U(() => {
1822
+ var wa;
1823
+ var va;
1824
+ var Hp;
1825
+ var xa = U(() => {
1787
1826
  "use strict";
1788
1827
  Vn();
1789
1828
  ht();
@@ -1866,10 +1905,7 @@
1866
1905
  });
1867
1906
  break;
1868
1907
  }
1869
- case "end-profiling":
1870
- Ir(r), postMessage({ type: t });
1871
- break;
1872
- default:
1908
+ case "end-profiling": Ir(r), postMessage({ type: t });
1873
1909
  }
1874
1910
  } catch (n) {
1875
1911
  postMessage({
@@ -1885,7 +1921,11 @@
1885
1921
  });
1886
1922
  var Ta = {};
1887
1923
  Dt(Ta, { default: () => Fp });
1888
- var Wn, Sa, Fp, qp, Ia = U(() => {
1924
+ var Wn;
1925
+ var Sa;
1926
+ var Fp;
1927
+ var qp;
1928
+ var Ia = U(() => {
1889
1929
  "use strict";
1890
1930
  Sa = (Wn = self.location.href, async function(e = {}) {
1891
1931
  var t, r, n = e, o = new Promise((s, l) => {
@@ -3837,7 +3877,21 @@
3837
3877
  }), Fp = Sa, qp = globalThis.self?.name?.startsWith("em-pthread");
3838
3878
  qp && Sa();
3839
3879
  });
3840
- var Ea, Gn, jp, Ue, ka, Ln, Kp, Zp, Pa, Qp, Ca, za, Aa, Oa, _r = U(() => {
3880
+ var Ea;
3881
+ var Gn;
3882
+ var jp;
3883
+ var Ue;
3884
+ var ka;
3885
+ var Ln;
3886
+ var Kp;
3887
+ var Zp;
3888
+ var Pa;
3889
+ var Qp;
3890
+ var Ca;
3891
+ var za;
3892
+ var Aa;
3893
+ var Oa;
3894
+ var _r = U(() => {
3841
3895
  "use strict";
3842
3896
  yr();
3843
3897
  Ea = typeof location > "u" ? void 0 : location.origin, Gn = self.location.href > "file:" && self.location.href < "file;", jp = () => {
@@ -3878,7 +3932,16 @@
3878
3932
  }
3879
3933
  };
3880
3934
  });
3881
- var Hn, Fn, Ar, Ba, Yp, Xp, Jp, wr, fe, ht = U(() => {
3935
+ var Hn;
3936
+ var Fn;
3937
+ var Ar;
3938
+ var Ba;
3939
+ var Yp;
3940
+ var Xp;
3941
+ var Jp;
3942
+ var wr;
3943
+ var fe;
3944
+ var ht = U(() => {
3882
3945
  "use strict";
3883
3946
  _r();
3884
3947
  Fn = !1, Ar = !1, Ba = !1, Yp = () => {
@@ -4068,7 +4131,10 @@
4068
4131
  throw new Error("WebAssembly is not initialized yet.");
4069
4132
  };
4070
4133
  });
4071
- var Ne, Kt, pe, Er = U(() => {
4134
+ var Ne;
4135
+ var Kt;
4136
+ var pe;
4137
+ var Er = U(() => {
4072
4138
  "use strict";
4073
4139
  ht();
4074
4140
  Ne = (e, t) => {
@@ -4098,7 +4164,8 @@
4098
4164
  }
4099
4165
  };
4100
4166
  });
4101
- var Da, Ma = U(() => {
4167
+ var Da;
4168
+ var Ma = U(() => {
4102
4169
  "use strict";
4103
4170
  ht();
4104
4171
  Er();
@@ -4120,7 +4187,13 @@
4120
4187
  }
4121
4188
  };
4122
4189
  });
4123
- var em, tm, rm, kr, nm, Ra, Ua = U(() => {
4190
+ var em;
4191
+ var tm;
4192
+ var rm;
4193
+ var kr;
4194
+ var nm;
4195
+ var Ra;
4196
+ var Ua = U(() => {
4124
4197
  "use strict";
4125
4198
  ht();
4126
4199
  Er();
@@ -4202,7 +4275,15 @@
4202
4275
  }
4203
4276
  };
4204
4277
  });
4205
- var Mt, Ye, gt, Pr, Zt, zr, Or, qn, ee = U(() => {
4278
+ var Mt;
4279
+ var Ye;
4280
+ var gt;
4281
+ var Pr;
4282
+ var Zt;
4283
+ var zr;
4284
+ var Or;
4285
+ var qn;
4286
+ var ee = U(() => {
4206
4287
  "use strict";
4207
4288
  Mt = (e) => {
4208
4289
  switch (e) {
@@ -4306,7 +4387,8 @@
4306
4387
  }
4307
4388
  };
4308
4389
  });
4309
- var Qt, jn = U(() => {
4390
+ var Qt;
4391
+ var jn = U(() => {
4310
4392
  "use strict";
4311
4393
  yr();
4312
4394
  Qt = async (e) => {
@@ -4341,7 +4423,14 @@
4341
4423
  } else return e instanceof Blob ? new Uint8Array(await e.arrayBuffer()) : e instanceof Uint8Array ? e : new Uint8Array(e);
4342
4424
  };
4343
4425
  });
4344
- var om, im, Na, Va, Br, am, se, Xe = U(() => {
4426
+ var om;
4427
+ var im;
4428
+ var Na;
4429
+ var Va;
4430
+ var Br;
4431
+ var am;
4432
+ var se;
4433
+ var Xe = U(() => {
4345
4434
  "use strict";
4346
4435
  ee();
4347
4436
  om = [
@@ -4361,7 +4450,14 @@
4361
4450
  Va && am(...e);
4362
4451
  };
4363
4452
  });
4364
- var Kn, Je, k, Tt, Dr, Wa, La, ne = U(() => {
4453
+ var Kn;
4454
+ var Je;
4455
+ var k;
4456
+ var Tt;
4457
+ var Dr;
4458
+ var Wa;
4459
+ var La;
4460
+ var ne = U(() => {
4365
4461
  "use strict";
4366
4462
  Kn = class {
4367
4463
  static calcMatMulShape(t, r) {
@@ -4530,12 +4626,23 @@
4530
4626
  }
4531
4627
  }, Wa = -34028234663852886e22, La = 34028234663852886e22;
4532
4628
  });
4533
- var Mr, Zn = U(() => {
4629
+ var Mr;
4630
+ var Zn = U(() => {
4534
4631
  "use strict";
4535
4632
  ee();
4536
4633
  Mr = (e, t) => new (Pr(t))(e);
4537
4634
  });
4538
- var Yn, Ha, sm, Ga, um, Fa, Rr, Ur, Qn, qa, ja = U(() => {
4635
+ var Yn;
4636
+ var Ha;
4637
+ var sm;
4638
+ var Ga;
4639
+ var um;
4640
+ var Fa;
4641
+ var Rr;
4642
+ var Ur;
4643
+ var Qn;
4644
+ var qa;
4645
+ var ja = U(() => {
4539
4646
  "use strict";
4540
4647
  Xe();
4541
4648
  Yn = (e, t = !0) => {
@@ -4551,7 +4658,7 @@
4551
4658
  if (e.byteLength % 4 !== 0) throw new Error("Invalid Uint8Array length - must be a multiple of 4 (Int32).");
4552
4659
  let r = e.byteLength / 4, n = new Int32Array(e.buffer, e.byteOffset, r), o = BigInt64Array.from(n, BigInt);
4553
4660
  return t ? new Uint8Array(o.buffer) : o;
4554
- }, sm = 1, Ga = () => sm++, um = new Map([
4661
+ }, sm = 1, Ga = () => sm++, um = /* @__PURE__ */ new Map([
4555
4662
  ["float32", 32],
4556
4663
  ["float16", 16],
4557
4664
  ["int32", 32],
@@ -4730,14 +4837,17 @@
4730
4837
  }
4731
4838
  }, qa = (...e) => new Qn(...e);
4732
4839
  });
4733
- var Xn, dm, Nr, Ka = U(() => {
4840
+ var Xn;
4841
+ var dm;
4842
+ var Nr;
4843
+ var Ka = U(() => {
4734
4844
  "use strict";
4735
4845
  ee();
4736
4846
  ht();
4737
4847
  Zn();
4738
4848
  ja();
4739
4849
  Xe();
4740
- Xn = new Map([
4850
+ Xn = /* @__PURE__ */ new Map([
4741
4851
  [1, "float32"],
4742
4852
  [10, "float16"],
4743
4853
  [6, "int32"],
@@ -4923,11 +5033,20 @@
4923
5033
  var Vr = U(() => {
4924
5034
  "use strict";
4925
5035
  });
4926
- var Za, Jn, eo, lm, cm, Qa, ro, to, Xa, Ja = U(() => {
5036
+ var Za;
5037
+ var Jn;
5038
+ var eo;
5039
+ var lm;
5040
+ var cm;
5041
+ var Qa;
5042
+ var ro;
5043
+ var to;
5044
+ var Xa;
5045
+ var Ja = U(() => {
4927
5046
  "use strict";
4928
5047
  Xe();
4929
5048
  Vr();
4930
- Za = new Map([
5049
+ Za = /* @__PURE__ */ new Map([
4931
5050
  [64, 250],
4932
5051
  [128, 200],
4933
5052
  [256, 200],
@@ -5115,7 +5234,9 @@
5115
5234
  }
5116
5235
  }, Xa = (...e) => new to(...e);
5117
5236
  });
5118
- var no, J, Se = U(() => {
5237
+ var no;
5238
+ var J;
5239
+ var Se = U(() => {
5119
5240
  "use strict";
5120
5241
  no = class {
5121
5242
  constructor(t) {
@@ -5126,7 +5247,24 @@
5126
5247
  }
5127
5248
  }, J = (e) => new no(e);
5128
5249
  });
5129
- var It, io, be, Ae, N, ce, ao, Ct, He, F, Wr, P, M, es, Lr, oo, ts, ie = U(() => {
5250
+ var It;
5251
+ var io;
5252
+ var be;
5253
+ var Ae;
5254
+ var N;
5255
+ var ce;
5256
+ var ao;
5257
+ var Ct;
5258
+ var He;
5259
+ var F;
5260
+ var Wr;
5261
+ var P;
5262
+ var M;
5263
+ var es;
5264
+ var Lr;
5265
+ var oo;
5266
+ var ts;
5267
+ var ie = U(() => {
5130
5268
  "use strict";
5131
5269
  ee();
5132
5270
  ne();
@@ -5227,20 +5365,26 @@
5227
5365
  })(), we = a < 2 ? "" : `
5228
5366
  fn get_${e}ByIndices(indices: ${f.indices}) -> ${p} {
5229
5367
  return ${Z(`i2o_${e}(indices)`)};
5230
- }`, H = a < 2 ? "" : `
5231
- fn get_${e}(${u.map((de) => `d${de}: u32`).join(", ")}) -> ${p} {
5232
- return get_${e}ByIndices(${O(u.map((de) => `d${de}`).join(", "))});
5233
- }`, j = (...C) => {
5368
+ }`, H = a < 2 ? "" : (() => {
5369
+ let C = u.map((de) => `d${de}: u32`).join(", "), V = u.map((de) => `d${de}`).join(", ");
5370
+ return `
5371
+ fn get_${e}(${C}) -> ${p} {
5372
+ return get_${e}ByIndices(${O(V)});
5373
+ }`;
5374
+ })(), j = (...C) => {
5234
5375
  if (C.length !== a) throw new Error(`indices length must be ${a}`);
5235
5376
  let V = C.map(b).join(",");
5236
5377
  return a === 0 ? Z("0u") : a === 1 ? Z(V[0]) : (g.get = !0, g.getByIndices = !0, g.indicesToOffset = !0, `get_${e}(${V})`);
5237
5378
  }, te = (C) => a < 2 ? Z(C) : (g.getByIndices = !0, g.indicesToOffset = !0, `get_${e}ByIndices(${C})`), X = a < 2 ? "" : `
5238
5379
  fn set_${e}ByIndices(indices: ${f.indices}, value: ${p}) {
5239
5380
  ${W(`i2o_${e}(indices)`, "value")}
5240
- }`, ue = a < 2 ? "" : `
5241
- fn set_${e}(${u.map((de) => `d${de}: u32`).join(", ")}, value: ${p}) {
5242
- set_${e}ByIndices(${O(u.map((de) => `d${de}`).join(", "))}, value);
5381
+ }`, ue = a < 2 ? "" : (() => {
5382
+ let C = u.map((de) => `d${de}: u32`).join(", "), V = u.map((de) => `d${de}`).join(", ");
5383
+ return `
5384
+ fn set_${e}(${C}, value: ${p}) {
5385
+ set_${e}ByIndices(${O(V)}, value);
5243
5386
  }`;
5387
+ })();
5244
5388
  return {
5245
5389
  impl: () => {
5246
5390
  let C = [], V = !1;
@@ -5376,7 +5520,16 @@
5376
5520
  }
5377
5521
  }, ts = (e, t) => new oo(e, t);
5378
5522
  });
5379
- var pm, rs, mm, fm, hm, gm, Ee, ns, os, st = U(() => {
5523
+ var pm;
5524
+ var rs;
5525
+ var mm;
5526
+ var fm;
5527
+ var hm;
5528
+ var gm;
5529
+ var Ee;
5530
+ var ns;
5531
+ var os;
5532
+ var st = U(() => {
5380
5533
  "use strict";
5381
5534
  ee();
5382
5535
  ne();
@@ -5449,7 +5602,7 @@
5449
5602
  let $ = P("a", r, a.length), v = M("output", r, u.length);
5450
5603
  return `
5451
5604
  ${S.registerUniform("output_size", "u32").declareVariables($, v)}
5452
- var<workgroup> tile : array<array<${v.type.value}, ${_ + 1}>, ${_}>;
5605
+ var<workgroup> tile : array<array<${v.type.value}, 17>, ${_}>;
5453
5606
  ${S.mainStart([
5454
5607
  _,
5455
5608
  _,
@@ -5535,7 +5688,28 @@
5535
5688
  pm(e.inputs, t.perm), e.compute(Ee(e.inputs[0], t.perm));
5536
5689
  }, os = (e) => J({ perm: e.perm });
5537
5690
  });
5538
- var bm, ym, _m, wm, vm, $m, xm, Sm, Tm, Im, et, is, as, ss, us, ds, ls, cs, ps, ms, fs, hs = U(() => {
5691
+ var bm;
5692
+ var ym;
5693
+ var _m;
5694
+ var wm;
5695
+ var vm;
5696
+ var $m;
5697
+ var xm;
5698
+ var Sm;
5699
+ var Tm;
5700
+ var Im;
5701
+ var et;
5702
+ var is;
5703
+ var as;
5704
+ var ss;
5705
+ var us;
5706
+ var ds;
5707
+ var ls;
5708
+ var cs;
5709
+ var ps;
5710
+ var ms;
5711
+ var fs;
5712
+ var hs = U(() => {
5539
5713
  "use strict";
5540
5714
  ee();
5541
5715
  ne();
@@ -5700,7 +5874,33 @@
5700
5874
  et(e, "ReduceLogSumShared", t, "logSum");
5701
5875
  };
5702
5876
  });
5703
- var tt, Cm, Hr, so, rt, Am, Em, km, Pm, zm, Om, Bm, Dm, Mm, Rm, nt, gs, bs, ys, _s, ws, vs, $s, xs, Ss, Ts, Gr = U(() => {
5877
+ var tt;
5878
+ var Cm;
5879
+ var Hr;
5880
+ var so;
5881
+ var rt;
5882
+ var Am;
5883
+ var Em;
5884
+ var km;
5885
+ var Pm;
5886
+ var zm;
5887
+ var Om;
5888
+ var Bm;
5889
+ var Dm;
5890
+ var Mm;
5891
+ var Rm;
5892
+ var nt;
5893
+ var gs;
5894
+ var bs;
5895
+ var ys;
5896
+ var _s;
5897
+ var ws;
5898
+ var vs;
5899
+ var $s;
5900
+ var xs;
5901
+ var Ss;
5902
+ var Ts;
5903
+ var Gr = U(() => {
5704
5904
  "use strict";
5705
5905
  ee();
5706
5906
  ne();
@@ -5886,7 +6086,11 @@
5886
6086
  nt(e.inputs[0].dims, t.axes, t.noopWithEmptyAxes) ? Am(e, t) : fs(e, t);
5887
6087
  };
5888
6088
  });
5889
- var Is, Cs, As, uo, Es = U(() => {
6089
+ var Is;
6090
+ var Cs;
6091
+ var As;
6092
+ var uo;
6093
+ var Es = U(() => {
5890
6094
  "use strict";
5891
6095
  ee();
5892
6096
  Se();
@@ -5940,7 +6144,15 @@ var best_index : i32 = 0;`,
5940
6144
  }, [e.inputs[0]], r, [t.axis], 7, t.keepDims), { inputs: [0] });
5941
6145
  }, uo = (e) => J(e);
5942
6146
  });
5943
- var Um, lo, Nm, Vm, Wm, Rt, Lm, ks, Fr = U(() => {
6147
+ var Um;
6148
+ var lo;
6149
+ var Nm;
6150
+ var Vm;
6151
+ var Wm;
6152
+ var Rt;
6153
+ var Lm;
6154
+ var ks;
6155
+ var Fr = U(() => {
5944
6156
  "use strict";
5945
6157
  ee();
5946
6158
  ne();
@@ -6246,8 +6458,8 @@ var best_index : i32 = 0;`,
6246
6458
  return `
6247
6459
  const TILE_SIZE = ${v}u;
6248
6460
 
6249
- var<workgroup> tileQ: array<${L.type.storage}, ${v * v}>;
6250
- var<workgroup> tileK: array<${L.type.storage}, ${v * v}>;
6461
+ var<workgroup> tileQ: array<${L.type.storage}, 144>;
6462
+ var<workgroup> tileK: array<${L.type.storage}, 144>;
6251
6463
  ${D.registerUniforms([
6252
6464
  {
6253
6465
  name: "M",
@@ -6437,8 +6649,8 @@ var best_index : i32 = 0;`,
6437
6649
  m && W.push(M("present_value", t.dataType, b));
6438
6650
  return `
6439
6651
  const TILE_SIZE = ${_}u;
6440
- var<workgroup> tileQ: array<${z.type.value}, ${_ * _}>;
6441
- var<workgroup> tileV: array<${z.type.value}, ${_ * _}>;
6652
+ var<workgroup> tileQ: array<${z.type.value}, 144>;
6653
+ var<workgroup> tileV: array<${z.type.value}, 144>;
6442
6654
  ${I.registerUniforms([
6443
6655
  {
6444
6656
  name: "M",
@@ -6613,10 +6825,10 @@ var best_index : i32 = 0;`,
6613
6825
  let f = M("output_q", d[0].dataType, r), b = M("output_k", d[0].dataType, r), g = M("output_v", d[0].dataType, r), _ = P("input", d[0].dataType, d[0].dims), S = P("weight", d[1].dataType, d[1].dims), $ = P("bias", d[2].dataType, d[2].dims), v = _.type.storage;
6614
6826
  return `
6615
6827
  const TILE_SIZE = ${a}u;
6616
- var<workgroup> tileInput: array<${v}, ${a * a}>;
6617
- var<workgroup> tileWeightQ: array<${v}, ${a * a}>;
6618
- var<workgroup> tileWeightK: array<${v}, ${a * a}>;
6619
- var<workgroup> tileWeightV: array<${v}, ${a * a}>;
6828
+ var<workgroup> tileInput: array<${v}, 144>;
6829
+ var<workgroup> tileWeightQ: array<${v}, 144>;
6830
+ var<workgroup> tileWeightK: array<${v}, 144>;
6831
+ var<workgroup> tileWeightV: array<${v}, 144>;
6620
6832
  ${m.registerUniforms([
6621
6833
  {
6622
6834
  name: "M",
@@ -6743,7 +6955,11 @@ var best_index : i32 = 0;`,
6743
6955
  return Rt(e, n, o, i, e.inputs[4], void 0, void 0, void 0, e.inputs[5], r);
6744
6956
  };
6745
6957
  });
6746
- var Gm, Hm, Fm, Ps, zs = U(() => {
6958
+ var Gm;
6959
+ var Hm;
6960
+ var Fm;
6961
+ var Ps;
6962
+ var zs = U(() => {
6747
6963
  "use strict";
6748
6964
  We();
6749
6965
  ee();
@@ -6829,7 +7045,10 @@ var best_index : i32 = 0;`,
6829
7045
  e.compute(Hm(r, o));
6830
7046
  };
6831
7047
  });
6832
- var qm, jm, Os, Bs = U(() => {
7048
+ var qm;
7049
+ var jm;
7050
+ var Os;
7051
+ var Bs = U(() => {
6833
7052
  "use strict";
6834
7053
  ne();
6835
7054
  ie();
@@ -6868,7 +7087,52 @@ var best_index : i32 = 0;`,
6868
7087
  qm(e.inputs), e.compute(jm(e.inputs));
6869
7088
  };
6870
7089
  });
6871
- var Km, me, Ds, Ms, Rs, Us, Ns, Vs, Ws, Ls, Gs, Zm, Hs, Fs, qs, js, Yt, Ks, qr, Zs, Qs, Ys, Xs, Js, eu, tu, ru, nu, ou, iu, au, su, uu, du, lu, cu, pu, co, po, mu, fu, hu, Qm, Ym, gu, jr = U(() => {
7090
+ var Km;
7091
+ var me;
7092
+ var Ds;
7093
+ var Ms;
7094
+ var Rs;
7095
+ var Us;
7096
+ var Ns;
7097
+ var Vs;
7098
+ var Ws;
7099
+ var Ls;
7100
+ var Gs;
7101
+ var Zm;
7102
+ var Hs;
7103
+ var Fs;
7104
+ var qs;
7105
+ var js;
7106
+ var Yt;
7107
+ var Ks;
7108
+ var qr;
7109
+ var Zs;
7110
+ var Qs;
7111
+ var Ys;
7112
+ var Xs;
7113
+ var Js;
7114
+ var eu;
7115
+ var tu;
7116
+ var ru;
7117
+ var nu;
7118
+ var ou;
7119
+ var iu;
7120
+ var au;
7121
+ var su;
7122
+ var uu;
7123
+ var du;
7124
+ var lu;
7125
+ var cu;
7126
+ var pu;
7127
+ var co;
7128
+ var po;
7129
+ var mu;
7130
+ var fu;
7131
+ var hu;
7132
+ var Qm;
7133
+ var Ym;
7134
+ var gu;
7135
+ var jr = U(() => {
6872
7136
  "use strict";
6873
7137
  ee();
6874
7138
  ne();
@@ -7083,7 +7347,10 @@ fn quick_gelu_impl(x: vec4<${e}>) -> vec4<${e}> {
7083
7347
  e.compute(me(e.inputs[0], "QuickGelu", Ym, Qm(r, t.alpha), t.cacheKey, e.inputs[0].dataType));
7084
7348
  };
7085
7349
  });
7086
- var Xm, Jm, yu, _u = U(() => {
7350
+ var Xm;
7351
+ var Jm;
7352
+ var yu;
7353
+ var _u = U(() => {
7087
7354
  "use strict";
7088
7355
  ne();
7089
7356
  ie();
@@ -7134,7 +7401,20 @@ fn quick_gelu_impl(x: vec4<${e}>) -> vec4<${e}> {
7134
7401
  Xm(e.inputs), e.compute(Jm(e.inputs));
7135
7402
  };
7136
7403
  });
7137
- var ef, tf, ot, wu, vu, $u, xu, Su, Tu, Iu, Cu, Au, Eu, ku = U(() => {
7404
+ var ef;
7405
+ var tf;
7406
+ var ot;
7407
+ var wu;
7408
+ var vu;
7409
+ var $u;
7410
+ var xu;
7411
+ var Su;
7412
+ var Tu;
7413
+ var Iu;
7414
+ var Cu;
7415
+ var Au;
7416
+ var Eu;
7417
+ var ku = U(() => {
7138
7418
  "use strict";
7139
7419
  ee();
7140
7420
  ne();
@@ -7280,7 +7560,13 @@ fn quick_gelu_impl(x: vec4<${e}>) -> vec4<${e}> {
7280
7560
  }, void 0, void 0, 9);
7281
7561
  };
7282
7562
  });
7283
- var nf, of, af, sf, Pu, zu, Ou = U(() => {
7563
+ var nf;
7564
+ var of;
7565
+ var af;
7566
+ var sf;
7567
+ var Pu;
7568
+ var zu;
7569
+ var Ou = U(() => {
7284
7570
  "use strict";
7285
7571
  ee();
7286
7572
  ne();
@@ -7374,7 +7660,11 @@ fn quick_gelu_impl(x: vec4<${e}>) -> vec4<${e}> {
7374
7660
  e.compute(sf(a, o, i, r[0].dataType), { inputs: a });
7375
7661
  }, zu = (e) => J({ axis: e.axis });
7376
7662
  });
7377
- var Fe, qe, je, Kr, bt = U(() => {
7663
+ var Fe;
7664
+ var qe;
7665
+ var je;
7666
+ var Kr;
7667
+ var bt = U(() => {
7378
7668
  "use strict";
7379
7669
  ee();
7380
7670
  ne();
@@ -7451,7 +7741,9 @@ fn quick_gelu_impl(x: vec4<${e}>) -> vec4<${e}> {
7451
7741
  return { activation: t };
7452
7742
  };
7453
7743
  });
7454
- var Ie, Bu, Zr = U(() => {
7744
+ var Ie;
7745
+ var Bu;
7746
+ var Zr = U(() => {
7455
7747
  "use strict";
7456
7748
  Ie = (e, t) => {
7457
7749
  switch (e) {
@@ -7465,7 +7757,8 @@ fn quick_gelu_impl(x: vec4<${e}>) -> vec4<${e}> {
7465
7757
  ${e ? "value = value + getBiasByOutputCoords(coords);" : ""}
7466
7758
  `;
7467
7759
  });
7468
- var Du, Mu = U(() => {
7760
+ var Du;
7761
+ var Mu = U(() => {
7469
7762
  "use strict";
7470
7763
  Du = (e) => `
7471
7764
  fn getIndexFromCoords4D(coords : vec4<i32>, shape : vec4<i32>) -> i32 {
@@ -7478,7 +7771,9 @@ fn getOutputIndexFromCoords(coords : vec4<i32>) -> i32 {
7478
7771
  }
7479
7772
  `;
7480
7773
  });
7481
- var Xt, Qr, Yr = U(() => {
7774
+ var Xt;
7775
+ var Qr;
7776
+ var Yr = U(() => {
7482
7777
  "use strict";
7483
7778
  ee();
7484
7779
  ne();
@@ -7615,7 +7910,15 @@ fn getOutputIndexFromCoords(coords : vec4<i32>) -> i32 {
7615
7910
  };
7616
7911
  };
7617
7912
  });
7618
- var uf, df, mo, Ru, lf, fo, cf, Jt, Xr = U(() => {
7913
+ var uf;
7914
+ var df;
7915
+ var mo;
7916
+ var Ru;
7917
+ var lf;
7918
+ var fo;
7919
+ var cf;
7920
+ var Jt;
7921
+ var Xr = U(() => {
7619
7922
  "use strict";
7620
7923
  ee();
7621
7924
  ne();
@@ -7999,7 +8302,9 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
7999
8302
  };
8000
8303
  };
8001
8304
  });
8002
- var pf, Uu, Nu = U(() => {
8305
+ var pf;
8306
+ var Uu;
8307
+ var Nu = U(() => {
8003
8308
  "use strict";
8004
8309
  ee();
8005
8310
  Xe();
@@ -8237,7 +8542,15 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
8237
8542
  };
8238
8543
  };
8239
8544
  });
8240
- var mf, Vu, Jr, ff, Wu, hf, Lu, Gu, Hu = U(() => {
8545
+ var mf;
8546
+ var Vu;
8547
+ var Jr;
8548
+ var ff;
8549
+ var Wu;
8550
+ var hf;
8551
+ var Lu;
8552
+ var Gu;
8553
+ var Hu = U(() => {
8241
8554
  "use strict";
8242
8555
  ee();
8243
8556
  Xe();
@@ -8453,7 +8766,7 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
8453
8766
  }
8454
8767
  ];
8455
8768
  je(t, x);
8456
- let T = 1, E = be(e[0].dataType), I = P("x", e[0].dataType, e[0].dims.length, f === 3 ? 1 : f), z = P("W", e[1].dataType, e[1].dims.length, T), O = [I, z], D = M("result", e[0].dataType, r.length, T), L = "";
8769
+ let T = 1, E = be(e[0].dataType), I = P("x", e[0].dataType, e[0].dims.length, f), z = P("W", e[1].dataType, e[1].dims.length, T), O = [I, z], D = M("result", e[0].dataType, r.length, T), L = "";
8457
8770
  if (S) {
8458
8771
  let W = P("bias", e[2].dataType, e[2].dims.length, T);
8459
8772
  O.push(W), L += `
@@ -8591,7 +8904,9 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
8591
8904
  };
8592
8905
  };
8593
8906
  });
8594
- var Fu, qu, ju = U(() => {
8907
+ var Fu;
8908
+ var qu;
8909
+ var ju = U(() => {
8595
8910
  "use strict";
8596
8911
  ee();
8597
8912
  ne();
@@ -8866,7 +9181,16 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
8866
9181
  };
8867
9182
  };
8868
9183
  });
8869
- var gf, ho, bf, go, bo, Ku, yf, _f, yo, Zu = U(() => {
9184
+ var gf;
9185
+ var ho;
9186
+ var bf;
9187
+ var go;
9188
+ var bo;
9189
+ var Ku;
9190
+ var yf;
9191
+ var _f;
9192
+ var yo;
9193
+ var Zu = U(() => {
8870
9194
  "use strict";
8871
9195
  ne();
8872
9196
  Nu();
@@ -9062,7 +9386,8 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
9062
9386
  }
9063
9387
  };
9064
9388
  });
9065
- var Qu, Yu = U(() => {
9389
+ var Qu;
9390
+ var Yu = U(() => {
9066
9391
  "use strict";
9067
9392
  ee();
9068
9393
  Xe();
@@ -9292,7 +9617,16 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
9292
9617
  };
9293
9618
  };
9294
9619
  });
9295
- var wf, vf, $f, Xu, Ju, xf, ed, Sf, td, rd = U(() => {
9620
+ var wf;
9621
+ var vf;
9622
+ var $f;
9623
+ var Xu;
9624
+ var Ju;
9625
+ var xf;
9626
+ var ed;
9627
+ var Sf;
9628
+ var td;
9629
+ var rd = U(() => {
9296
9630
  "use strict";
9297
9631
  Yu();
9298
9632
  bt();
@@ -9443,7 +9777,10 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
9443
9777
  }
9444
9778
  };
9445
9779
  });
9446
- var Tf, nd, od, id = U(() => {
9780
+ var Tf;
9781
+ var nd;
9782
+ var od;
9783
+ var id = U(() => {
9447
9784
  "use strict";
9448
9785
  ee();
9449
9786
  ne();
@@ -9504,7 +9841,12 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
9504
9841
  });
9505
9842
  };
9506
9843
  });
9507
- var If, Cf, Af, ad, sd, ud = U(() => {
9844
+ var If;
9845
+ var Cf;
9846
+ var Af;
9847
+ var ad;
9848
+ var sd;
9849
+ var ud = U(() => {
9508
9850
  "use strict";
9509
9851
  ee();
9510
9852
  ne();
@@ -9637,7 +9979,18 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
9637
9979
  format: e.format
9638
9980
  });
9639
9981
  });
9640
- var _o, en, dd, Ef, kf, wo, vo, ld, Pf, cd, pd, md = U(() => {
9982
+ var _o;
9983
+ var en;
9984
+ var dd;
9985
+ var Ef;
9986
+ var kf;
9987
+ var wo;
9988
+ var vo;
9989
+ var ld;
9990
+ var Pf;
9991
+ var cd;
9992
+ var pd;
9993
+ var md = U(() => {
9641
9994
  "use strict";
9642
9995
  ee();
9643
9996
  ne();
@@ -9792,7 +10145,12 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
9792
10145
  return J({ equation: t });
9793
10146
  };
9794
10147
  });
9795
- var zf, fd, Of, Bf, hd, gd = U(() => {
10148
+ var zf;
10149
+ var fd;
10150
+ var Of;
10151
+ var Bf;
10152
+ var hd;
10153
+ var gd = U(() => {
9796
10154
  "use strict";
9797
10155
  ee();
9798
10156
  ne();
@@ -9861,7 +10219,9 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
9861
10219
  zf(e.inputs), e.compute(Bf(e.inputs), { inputs: [0] });
9862
10220
  };
9863
10221
  });
9864
- var Df, bd, yd = U(() => {
10222
+ var Df;
10223
+ var bd;
10224
+ var yd = U(() => {
9865
10225
  "use strict";
9866
10226
  ee();
9867
10227
  ne();
@@ -9919,7 +10279,11 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
9919
10279
  e.inputs.length < 2 || k.size(e.inputs[1].dims) === 0 ? mu(e) : e.compute(Df(e.inputs));
9920
10280
  };
9921
10281
  });
9922
- var Mf, Rf, _d, wd, vd = U(() => {
10282
+ var Mf;
10283
+ var Rf;
10284
+ var _d;
10285
+ var wd;
10286
+ var vd = U(() => {
9923
10287
  "use strict";
9924
10288
  ee();
9925
10289
  ne();
@@ -10010,7 +10374,10 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
10010
10374
  Mf(r), e.compute(Rf(e.inputs, t));
10011
10375
  };
10012
10376
  });
10013
- var Uf, $d, xd, Sd = U(() => {
10377
+ var Uf;
10378
+ var $d;
10379
+ var xd;
10380
+ var Sd = U(() => {
10014
10381
  "use strict";
10015
10382
  ee();
10016
10383
  ne();
@@ -10166,7 +10533,11 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
10166
10533
  cacheKey: ""
10167
10534
  });
10168
10535
  });
10169
- var Nf, Vf, Td, Id, Cd = U(() => {
10536
+ var Nf;
10537
+ var Vf;
10538
+ var Td;
10539
+ var Id;
10540
+ var Cd = U(() => {
10170
10541
  "use strict";
10171
10542
  ee();
10172
10543
  ne();
@@ -10297,7 +10668,11 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
10297
10668
  quantizeAxis: e.quantizeAxis
10298
10669
  });
10299
10670
  });
10300
- var Wf, Lf, Ad, Ed, kd = U(() => {
10671
+ var Wf;
10672
+ var Lf;
10673
+ var Ad;
10674
+ var Ed;
10675
+ var kd = U(() => {
10301
10676
  "use strict";
10302
10677
  ee();
10303
10678
  ne();
@@ -10357,7 +10732,11 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
10357
10732
  Wf(r), e.compute(Lf(e.inputs, t));
10358
10733
  };
10359
10734
  });
10360
- var Gf, Hf, Pd, zd, Od = U(() => {
10735
+ var Gf;
10736
+ var Hf;
10737
+ var Pd;
10738
+ var zd;
10739
+ var Od = U(() => {
10361
10740
  "use strict";
10362
10741
  ee();
10363
10742
  ne();
@@ -10558,7 +10937,21 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
10558
10937
  Gf(e.inputs), e.compute(Hf(e.inputs, t));
10559
10938
  };
10560
10939
  });
10561
- var ut, yt, Ut, Nt, Ff, qf, jf, Kf, Zf, Qf, Yf, Xf, Bd, Dd, Md = U(() => {
10940
+ var ut;
10941
+ var yt;
10942
+ var Ut;
10943
+ var Nt;
10944
+ var Ff;
10945
+ var qf;
10946
+ var jf;
10947
+ var Kf;
10948
+ var Zf;
10949
+ var Qf;
10950
+ var Yf;
10951
+ var Xf;
10952
+ var Bd;
10953
+ var Dd;
10954
+ var Md = U(() => {
10562
10955
  "use strict";
10563
10956
  ee();
10564
10957
  ne();
@@ -10786,7 +11179,14 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
10786
11179
  format: e.format
10787
11180
  });
10788
11181
  });
10789
- var Be, th, Ud, Rd, rh, er, Nd, $o = U(() => {
11182
+ var Be;
11183
+ var th;
11184
+ var Ud;
11185
+ var Rd;
11186
+ var rh;
11187
+ var er;
11188
+ var Nd;
11189
+ var $o = U(() => {
10790
11190
  "use strict";
10791
11191
  ee();
10792
11192
  ne();
@@ -10975,7 +11375,14 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
10975
11375
  Rt(e, f, b, g, u, void 0, c, p, d, r);
10976
11376
  };
10977
11377
  });
10978
- var nh, oh, ih, ah, xo, Vd, Wd, So = U(() => {
11378
+ var nh;
11379
+ var oh;
11380
+ var ih;
11381
+ var ah;
11382
+ var xo;
11383
+ var Vd;
11384
+ var Wd;
11385
+ var So = U(() => {
10979
11386
  "use strict";
10980
11387
  ee();
10981
11388
  ne();
@@ -11070,7 +11477,10 @@ fn calculateOutputIndex(index: u32) -> u32 {
11070
11477
  });
11071
11478
  };
11072
11479
  });
11073
- var sh, tn, Ld, To = U(() => {
11480
+ var sh;
11481
+ var tn;
11482
+ var Ld;
11483
+ var To = U(() => {
11074
11484
  "use strict";
11075
11485
  ee();
11076
11486
  ne();
@@ -11200,7 +11610,12 @@ fn calculateOutputIndex(index: u32) -> u32 {
11200
11610
  sh(e.inputs, t), e.compute(tn(e.inputs, t));
11201
11611
  };
11202
11612
  });
11203
- var uh, dh, Gd, lh, Hd, Fd = U(() => {
11613
+ var uh;
11614
+ var dh;
11615
+ var Gd;
11616
+ var lh;
11617
+ var Hd;
11618
+ var Fd = U(() => {
11204
11619
  "use strict";
11205
11620
  Se();
11206
11621
  ee();
@@ -11437,7 +11852,11 @@ fn calculateOutputIndex(index: u32) -> u32 {
11437
11852
  Rt(e, $, v, x, void 0, void 0, a, u, void 0, r, d, c);
11438
11853
  };
11439
11854
  });
11440
- var qd, ch, ph, jd, Kd = U(() => {
11855
+ var qd;
11856
+ var ch;
11857
+ var ph;
11858
+ var jd;
11859
+ var Kd = U(() => {
11441
11860
  "use strict";
11442
11861
  ee();
11443
11862
  ne();
@@ -11627,7 +12046,10 @@ fn calculateOutputIndex(index: u32) -> u32 {
11627
12046
  t.format === "NHWC" ? ph(e, e.inputs, t) : ch(e, e.inputs, t);
11628
12047
  };
11629
12048
  });
11630
- var mh, fh, Zd, Qd = U(() => {
12049
+ var mh;
12050
+ var fh;
12051
+ var Zd;
12052
+ var Qd = U(() => {
11631
12053
  "use strict";
11632
12054
  ee();
11633
12055
  ne();
@@ -11734,7 +12156,9 @@ fn calculateOutputIndex(index: u32) -> u32 {
11734
12156
  mh(e.inputs), e.compute(fh(e.inputs, t, e.outputCount));
11735
12157
  };
11736
12158
  });
11737
- var hh, Yd, Xd = U(() => {
12159
+ var hh;
12160
+ var Yd;
12161
+ var Xd = U(() => {
11738
12162
  "use strict";
11739
12163
  ne();
11740
12164
  Yr();
@@ -11769,7 +12193,12 @@ fn calculateOutputIndex(index: u32) -> u32 {
11769
12193
  }
11770
12194
  };
11771
12195
  });
11772
- var gh, bh, yh, Jd, el, tl = U(() => {
12196
+ var gh;
12197
+ var bh;
12198
+ var yh;
12199
+ var Jd;
12200
+ var el;
12201
+ var tl = U(() => {
11773
12202
  "use strict";
11774
12203
  ee();
11775
12204
  ne();
@@ -12058,7 +12487,16 @@ fn calculateOutputIndex(index: u32) -> u32 {
12058
12487
  gh(e.inputs, t), t.blockSize === 32 && e.adapterInfo.isVendor("intel") && e.adapterInfo.isArchitecture("gen-12lp") ? e.compute(yh(e.inputs, t)) : e.compute(bh(e.inputs, t));
12059
12488
  }, el = (e) => J(e);
12060
12489
  });
12061
- var _h, wh, vh, $h, xh, Sh, Th, Ih, rl, nl = U(() => {
12490
+ var _h;
12491
+ var wh;
12492
+ var vh;
12493
+ var $h;
12494
+ var xh;
12495
+ var Sh;
12496
+ var Th;
12497
+ var Ih;
12498
+ var rl;
12499
+ var nl = U(() => {
12062
12500
  "use strict";
12063
12501
  ee();
12064
12502
  ne();
@@ -12229,7 +12667,26 @@ fn calculateOutputIndex(index: u32) -> u32 {
12229
12667
  e.compute(Th(e.inputs, r), { inputs: [0] });
12230
12668
  };
12231
12669
  });
12232
- var rn, ol, il, al, sl, Ch, Ah, ul, dl, ll, cl, pl, ml, fl, hl, gl, bl, yl, _l, wl = U(() => {
12670
+ var rn;
12671
+ var ol;
12672
+ var il;
12673
+ var al;
12674
+ var sl;
12675
+ var Ch;
12676
+ var Ah;
12677
+ var ul;
12678
+ var dl;
12679
+ var ll;
12680
+ var cl;
12681
+ var pl;
12682
+ var ml;
12683
+ var fl;
12684
+ var hl;
12685
+ var gl;
12686
+ var bl;
12687
+ var yl;
12688
+ var _l;
12689
+ var wl = U(() => {
12233
12690
  "use strict";
12234
12691
  We();
12235
12692
  ee();
@@ -12582,7 +13039,11 @@ fn calculateOutputIndex(index: u32) -> u32 {
12582
13039
  rn(e.inputs), e.compute(hl("GlobalMaxPool", e.inputs[0], !0, t));
12583
13040
  };
12584
13041
  });
12585
- var kh, Ph, vl, $l, xl = U(() => {
13042
+ var kh;
13043
+ var Ph;
13044
+ var vl;
13045
+ var $l;
13046
+ var xl = U(() => {
12586
13047
  "use strict";
12587
13048
  ee();
12588
13049
  ne();
@@ -12710,7 +13171,10 @@ fn calculateOutputIndex(index: u32) -> u32 {
12710
13171
  blockSize: e.blockSize
12711
13172
  });
12712
13173
  });
12713
- var zh, Oh, Sl, Tl = U(() => {
13174
+ var zh;
13175
+ var Oh;
13176
+ var Sl;
13177
+ var Tl = U(() => {
12714
13178
  "use strict";
12715
13179
  We();
12716
13180
  ee();
@@ -12772,7 +13236,13 @@ fn calculateOutputIndex(index: u32) -> u32 {
12772
13236
  e.inputs[0].dataType === 6 ? (t = e.inputs[0].getInt32Array()[0], r = e.inputs[1].getInt32Array()[0], n = e.inputs[2].getInt32Array()[0]) : e.inputs[0].dataType === 1 && (t = e.inputs[0].getFloat32Array()[0], r = e.inputs[1].getFloat32Array()[0], n = e.inputs[2].getFloat32Array()[0]), ge.webgpu.validateInputContent && zh(t, r, n), e.compute(Oh(t, r, n, e.inputs[0].dataType), { inputs: [] });
12773
13237
  };
12774
13238
  });
12775
- var Bh, Il, Cl, Dh, Al, El, kl = U(() => {
13239
+ var Bh;
13240
+ var Il;
13241
+ var Cl;
13242
+ var Dh;
13243
+ var Al;
13244
+ var El;
13245
+ var kl = U(() => {
12776
13246
  "use strict";
12777
13247
  ee();
12778
13248
  ne();
@@ -12909,7 +13379,27 @@ fn calculateOutputIndex(index: u32) -> u32 {
12909
13379
  });
12910
13380
  };
12911
13381
  });
12912
- var Mh, Rh, Uh, Pl, Nh, Vh, Wh, Lh, Gh, Hh, Fh, qh, zl, jh, Kh, Zh, Qh, Yh, Ol, Bl, Dl = U(() => {
13382
+ var Mh;
13383
+ var Rh;
13384
+ var Uh;
13385
+ var Pl;
13386
+ var Nh;
13387
+ var Vh;
13388
+ var Wh;
13389
+ var Lh;
13390
+ var Gh;
13391
+ var Hh;
13392
+ var Fh;
13393
+ var qh;
13394
+ var zl;
13395
+ var jh;
13396
+ var Kh;
13397
+ var Zh;
13398
+ var Qh;
13399
+ var Yh;
13400
+ var Ol;
13401
+ var Bl;
13402
+ var Dl = U(() => {
12913
13403
  "use strict";
12914
13404
  ee();
12915
13405
  ne();
@@ -13380,7 +13870,10 @@ fn calculateOutputIndex(index: u32) -> u32 {
13380
13870
  });
13381
13871
  };
13382
13872
  });
13383
- var Xh, Jh, Ml, Rl = U(() => {
13873
+ var Xh;
13874
+ var Jh;
13875
+ var Ml;
13876
+ var Rl = U(() => {
13384
13877
  "use strict";
13385
13878
  ee();
13386
13879
  ne();
@@ -13467,7 +13960,7 @@ fn calculateOutputIndex(index: u32) -> u32 {
13467
13960
  var stride = hidden_size_vectorized / ${S};
13468
13961
  let offset = ix * stride + iy * hidden_size_vectorized;
13469
13962
  let offset1d = stride * ix;
13470
- if (ix == ${S - 1}) {
13963
+ if (ix == 63) {
13471
13964
  stride = hidden_size_vectorized - stride * ix;
13472
13965
  }
13473
13966
  for (var i: u32 = 0; i < stride; i++) {
@@ -13538,7 +14031,15 @@ fn calculateOutputIndex(index: u32) -> u32 {
13538
14031
  e.outputCount > 1 && n.push(-3), e.outputCount > 2 && n.push(-3), e.outputCount > 3 && n.push(3), e.compute(Jh(e.inputs, t, e.outputCount, !1), { outputs: n });
13539
14032
  };
13540
14033
  });
13541
- var eg, nn, tg, Ul, rg, ng, Nl, Vl, Wl = U(() => {
14034
+ var eg;
14035
+ var nn;
14036
+ var tg;
14037
+ var Ul;
14038
+ var rg;
14039
+ var ng;
14040
+ var Nl;
14041
+ var Vl;
14042
+ var Wl = U(() => {
13542
14043
  "use strict";
13543
14044
  ee();
13544
14045
  ne();
@@ -13599,8 +14100,8 @@ fn calculateOutputIndex(index: u32) -> u32 {
13599
14100
  let d = i.map(($) => Math.sign($));
13600
14101
  i.forEach(($, v, x) => {
13601
14102
  if ($ < 0) {
13602
- let T = (u[v] - a[v]) / $, E = a[v];
13603
- a[v] = E + T * i[v], u[v] = E, x[v] = -$;
14103
+ let T = (u[v] - a[v]) / $, E = a[v], I = E + T * i[v];
14104
+ a[v] = I, u[v] = E, x[v] = -$;
13604
14105
  }
13605
14106
  });
13606
14107
  let c = r.slice(0);
@@ -13683,7 +14184,11 @@ fn calculateOutputIndex(index: u32) -> u32 {
13683
14184
  });
13684
14185
  };
13685
14186
  });
13686
- var og, ig, Ll, Gl, Hl = U(() => {
14187
+ var og;
14188
+ var ig;
14189
+ var Ll;
14190
+ var Gl;
14191
+ var Hl = U(() => {
13687
14192
  "use strict";
13688
14193
  ee();
13689
14194
  ne();
@@ -13799,7 +14304,12 @@ fn calculateOutputIndex(index: u32) -> u32 {
13799
14304
  og(e.inputs), ig(e, t);
13800
14305
  }, Gl = (e) => J({ axis: e.axis });
13801
14306
  });
13802
- var Fl, ag, sg, ug, ql, jl = U(() => {
14307
+ var Fl;
14308
+ var ag;
14309
+ var sg;
14310
+ var ug;
14311
+ var ql;
14312
+ var jl = U(() => {
13803
14313
  "use strict";
13804
14314
  ee();
13805
14315
  ne();
@@ -13853,7 +14363,10 @@ fn calculateOutputIndex(index: u32) -> u32 {
13853
14363
  ag(e.inputs), e.compute(ug(e.inputs), { inputs: [0] });
13854
14364
  };
13855
14365
  });
13856
- var dg, lg, Kl, Zl = U(() => {
14366
+ var dg;
14367
+ var lg;
14368
+ var Kl;
14369
+ var Zl = U(() => {
13857
14370
  "use strict";
13858
14371
  ee();
13859
14372
  ne();
@@ -13929,7 +14442,8 @@ fn calculateOutputIndex(index: u32) -> u32 {
13929
14442
  e.compute(lg(e.inputs));
13930
14443
  };
13931
14444
  });
13932
- var Ql, Yl = U(() => {
14445
+ var Ql;
14446
+ var Yl = U(() => {
13933
14447
  "use strict";
13934
14448
  Es();
13935
14449
  Fr();
@@ -13973,7 +14487,7 @@ fn calculateOutputIndex(index: u32) -> u32 {
13973
14487
  st();
13974
14488
  jr();
13975
14489
  Zl();
13976
- Ql = new Map([
14490
+ Ql = /* @__PURE__ */ new Map([
13977
14491
  ["Abs", [Ds]],
13978
14492
  ["Acos", [Ms]],
13979
14493
  ["Acosh", [Rs]],
@@ -14072,7 +14586,8 @@ fn calculateOutputIndex(index: u32) -> u32 {
14072
14586
  ["Where", [Kl]]
14073
14587
  ]);
14074
14588
  });
14075
- var on, Xl = U(() => {
14589
+ var on;
14590
+ var Xl = U(() => {
14076
14591
  "use strict";
14077
14592
  We();
14078
14593
  Xe();
@@ -14181,7 +14696,11 @@ ${u}`, c = n.createShaderModule({
14181
14696
  });
14182
14697
  var Jl = {};
14183
14698
  Dt(Jl, { WebGpuBackend: () => Co });
14184
- var cg, pg, Io, Co, ec = U(() => {
14699
+ var cg;
14700
+ var pg;
14701
+ var Io;
14702
+ var Co;
14703
+ var ec = U(() => {
14185
14704
  "use strict";
14186
14705
  We();
14187
14706
  ee();
@@ -14536,7 +15055,10 @@ ${u}`, c = n.createShaderModule({
14536
15055
  });
14537
15056
  var tc = {};
14538
15057
  Dt(tc, { init: () => mg });
14539
- var tr, Ao, mg, rc = U(() => {
15058
+ var tr;
15059
+ var Ao;
15060
+ var mg;
15061
+ var rc = U(() => {
14540
15062
  "use strict";
14541
15063
  ee();
14542
15064
  Xe();
@@ -14552,22 +15074,22 @@ ${u}`, c = n.createShaderModule({
14552
15074
  getFloat32Array() {
14553
15075
  if (this.dataType !== 1) throw new Error("Invalid data type");
14554
15076
  let t = k.size(this.dims);
14555
- return t === 0 ? new Float32Array() : new Float32Array(this.module.HEAP8.buffer, this.data, t);
15077
+ return t === 0 ? /* @__PURE__ */ new Float32Array() : new Float32Array(this.module.HEAP8.buffer, this.data, t);
14556
15078
  }
14557
15079
  getBigInt64Array() {
14558
15080
  if (this.dataType !== 7) throw new Error("Invalid data type");
14559
15081
  let t = k.size(this.dims);
14560
- return t === 0 ? new BigInt64Array() : new BigInt64Array(this.module.HEAP8.buffer, this.data, t);
15082
+ return t === 0 ? /* @__PURE__ */ new BigInt64Array() : new BigInt64Array(this.module.HEAP8.buffer, this.data, t);
14561
15083
  }
14562
15084
  getInt32Array() {
14563
15085
  if (this.dataType !== 6) throw new Error("Invalid data type");
14564
15086
  let t = k.size(this.dims);
14565
- return t === 0 ? new Int32Array() : new Int32Array(this.module.HEAP8.buffer, this.data, t);
15087
+ return t === 0 ? /* @__PURE__ */ new Int32Array() : new Int32Array(this.module.HEAP8.buffer, this.data, t);
14566
15088
  }
14567
15089
  getUint16Array() {
14568
15090
  if (this.dataType !== 10 && this.dataType !== 4) throw new Error("Invalid data type");
14569
15091
  let t = k.size(this.dims);
14570
- return t === 0 ? new Uint16Array() : new Uint16Array(this.module.HEAP8.buffer, this.data, t);
15092
+ return t === 0 ? /* @__PURE__ */ new Uint16Array() : new Uint16Array(this.module.HEAP8.buffer, this.data, t);
14571
15093
  }
14572
15094
  reshape(t) {
14573
15095
  if (k.size(t) !== k.size(this.dims)) throw new Error("Invalid new shape");
@@ -14666,7 +15188,20 @@ ${u}`, c = n.createShaderModule({
14666
15188
  }
14667
15189
  };
14668
15190
  });
14669
- var fg, vr, $r, At, hg, nc, jt, xr, Sr, oc, Tr, Ir, Cr, Vn = U(() => {
15191
+ var fg;
15192
+ var vr;
15193
+ var $r;
15194
+ var At;
15195
+ var hg;
15196
+ var nc;
15197
+ var jt;
15198
+ var xr;
15199
+ var Sr;
15200
+ var oc;
15201
+ var Tr;
15202
+ var Ir;
15203
+ var Cr;
15204
+ var Vn = U(() => {
14670
15205
  "use strict";
14671
15206
  Ma();
14672
15207
  Ua();
@@ -14866,15 +15401,16 @@ ${u}`, c = n.createShaderModule({
14866
15401
  }
14867
15402
  } else {
14868
15403
  let v = u.webnnIsGraphInput;
14869
- if (c !== "string" && v) if (v(n, u.UTF8ToString(o))) {
14870
- let T = Mt(c);
14871
- g = gt(T, p), f = "ml-tensor";
14872
- let E = u.webnnCreateTemporaryTensor, I = u.webnnUploadTensor;
14873
- if (!E || !I) throw new Error("Tensor location \"ml-tensor\" is not supported without using WebNN.");
14874
- let z = await E(n, T, p);
14875
- I(z, new Uint8Array($.buffer, $.byteOffset, $.byteLength)), b = z;
15404
+ if (c !== "string" && v) {
15405
+ if (v(n, u.UTF8ToString(o))) {
15406
+ let T = Mt(c);
15407
+ g = gt(T, p), f = "ml-tensor";
15408
+ let E = u.webnnCreateTemporaryTensor, I = u.webnnUploadTensor;
15409
+ if (!E || !I) throw new Error("Tensor location \"ml-tensor\" is not supported without using WebNN.");
15410
+ let z = await E(n, T, p);
15411
+ I(z, new Uint8Array($.buffer, $.byteOffset, $.byteLength)), b = z;
15412
+ } else g = $.byteLength, b = u._malloc(g), r.push(b), u.HEAPU8.set(new Uint8Array($.buffer, $.byteOffset, g), b);
14876
15413
  } else g = $.byteLength, b = u._malloc(g), r.push(b), u.HEAPU8.set(new Uint8Array($.buffer, $.byteOffset, g), b);
14877
- else g = $.byteLength, b = u._malloc(g), r.push(b), u.HEAPU8.set(new Uint8Array($.buffer, $.byteOffset, g), b);
14878
15414
  }
14879
15415
  }
14880
15416
  let _ = u.stackSave(), S = u.stackAlloc(4 * p.length);
@@ -15022,7 +15558,25 @@ ${u}`, c = n.createShaderModule({
15022
15558
  return t;
15023
15559
  };
15024
15560
  });
15025
- var Et, Le, rr, sn, un, an, Eo, ko, Vt, Wt, bg, ic, ac, sc, uc, dc, lc, cc, Po = U(() => {
15561
+ var Et;
15562
+ var Le;
15563
+ var rr;
15564
+ var sn;
15565
+ var un;
15566
+ var an;
15567
+ var Eo;
15568
+ var ko;
15569
+ var Vt;
15570
+ var Wt;
15571
+ var bg;
15572
+ var ic;
15573
+ var ac;
15574
+ var sc;
15575
+ var uc;
15576
+ var dc;
15577
+ var lc;
15578
+ var cc;
15579
+ var Po = U(() => {
15026
15580
  "use strict";
15027
15581
  We();
15028
15582
  Vn();
@@ -15048,7 +15602,6 @@ ${u}`, c = n.createShaderModule({
15048
15602
  e.data.err ? t.shift()[1](e.data.err) : t.shift()[0](e.data.out);
15049
15603
  break;
15050
15604
  }
15051
- default:
15052
15605
  }
15053
15606
  }, ic = async () => {
15054
15607
  if (!sn) {
@@ -15152,7 +15705,10 @@ ${u}`, c = n.createShaderModule({
15152
15705
  Ir(e);
15153
15706
  };
15154
15707
  });
15155
- var pc, yg, dn, mc = U(() => {
15708
+ var pc;
15709
+ var yg;
15710
+ var dn;
15711
+ var mc = U(() => {
15156
15712
  "use strict";
15157
15713
  We();
15158
15714
  Po();
@@ -15250,7 +15806,10 @@ ${u}`, c = n.createShaderModule({
15250
15806
  initializeFlags: () => fc,
15251
15807
  wasmBackend: () => _g
15252
15808
  });
15253
- var fc, ln, _g, gc = U(() => {
15809
+ var fc;
15810
+ var ln;
15811
+ var _g;
15812
+ var gc = U(() => {
15254
15813
  "use strict";
15255
15814
  We();
15256
15815
  Po();
@@ -15339,19 +15898,56 @@ ${u}`, c = n.createShaderModule({
15339
15898
  var _vite_importMeta = { url: self.location.href };
15340
15899
  var __webpack_modules__ = {
15341
15900
  "onnxruntime-common": ((module) => {
15901
+ /*!*************************************!*\
15902
+ !*** external "onnxruntime-common" ***!
15903
+ \*************************************/
15342
15904
  module.exports = esm_exports;
15343
15905
  }),
15344
15906
  "onnxruntime-web": ((module) => {
15907
+ /*!**********************************!*\
15908
+ !*** external "onnxruntime-web" ***!
15909
+ \**********************************/
15345
15910
  module.exports = ort_bundle_min_exports;
15346
15911
  }),
15347
- "?2ce3": (() => {}),
15348
- "?7992": (() => {}),
15349
- "?5af5": (() => {}),
15350
- "?2b25": (() => {}),
15351
- "?db59": (() => {}),
15352
- "?383f": (() => {}),
15353
- "?fa4b": (() => {}),
15912
+ "?2ce3": (() => {
15913
+ /*!**********************************!*\
15914
+ !*** onnxruntime-node (ignored) ***!
15915
+ \**********************************/
15916
+ }),
15917
+ "?7992": (() => {
15918
+ /*!*************************!*\
15919
+ !*** node:fs (ignored) ***!
15920
+ \*************************/
15921
+ }),
15922
+ "?5af5": (() => {
15923
+ /*!***************************!*\
15924
+ !*** node:path (ignored) ***!
15925
+ \***************************/
15926
+ }),
15927
+ "?2b25": (() => {
15928
+ /*!***********************!*\
15929
+ !*** sharp (ignored) ***!
15930
+ \***********************/
15931
+ }),
15932
+ "?db59": (() => {
15933
+ /*!*************************!*\
15934
+ !*** node:fs (ignored) ***!
15935
+ \*************************/
15936
+ }),
15937
+ "?383f": (() => {
15938
+ /*!***************************!*\
15939
+ !*** node:path (ignored) ***!
15940
+ \***************************/
15941
+ }),
15942
+ "?fa4b": (() => {
15943
+ /*!**************************!*\
15944
+ !*** node:url (ignored) ***!
15945
+ \**************************/
15946
+ }),
15354
15947
  "./node_modules/@huggingface/jinja/dist/index.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
15948
+ /*!*******************************************************!*\
15949
+ !*** ./node_modules/@huggingface/jinja/dist/index.js ***!
15950
+ \*******************************************************/
15355
15951
  __webpack_require__.r(__webpack_exports__);
15356
15952
  __webpack_require__.d(__webpack_exports__, {
15357
15953
  Environment: () => Environment,
@@ -16384,9 +16980,10 @@ ${u}`, c = n.createShaderModule({
16384
16980
  const newValue = args[1];
16385
16981
  if (!(oldValue instanceof StringValue && newValue instanceof StringValue)) throw new Error("replace() arguments must be strings");
16386
16982
  let count;
16387
- if (args.length > 2) if (args[2].type === "KeywordArgumentsValue") count = args[2].value.get("count") ?? new NullValue();
16388
- else count = args[2];
16389
- else count = new NullValue();
16983
+ if (args.length > 2) {
16984
+ if (args[2].type === "KeywordArgumentsValue") count = args[2].value.get("count") ?? new NullValue();
16985
+ else count = args[2];
16986
+ } else count = new NullValue();
16390
16987
  if (!(count instanceof IntegerValue || count instanceof NullValue)) throw new Error("replace() count argument must be a number or null");
16391
16988
  return new StringValue(replace(this.value, oldValue.value, newValue.value, count.value));
16392
16989
  })]
@@ -17008,19 +17605,21 @@ ${u}`, c = n.createShaderModule({
17008
17605
  evaluateMemberExpression(expr, environment) {
17009
17606
  const object = this.evaluate(expr.object, environment);
17010
17607
  let property;
17011
- if (expr.computed) if (expr.property.type === "SliceExpression") return this.evaluateSliceExpression(object, expr.property, environment);
17012
- else property = this.evaluate(expr.property, environment);
17013
- else property = new StringValue(expr.property.value);
17608
+ if (expr.computed) {
17609
+ if (expr.property.type === "SliceExpression") return this.evaluateSliceExpression(object, expr.property, environment);
17610
+ else property = this.evaluate(expr.property, environment);
17611
+ } else property = new StringValue(expr.property.value);
17014
17612
  let value;
17015
17613
  if (object instanceof ObjectValue) {
17016
17614
  if (!(property instanceof StringValue)) throw new Error(`Cannot access property with non-string: got ${property.type}`);
17017
17615
  value = object.value.get(property.value) ?? object.builtins.get(property.value);
17018
- } else if (object instanceof ArrayValue || object instanceof StringValue) if (property instanceof IntegerValue) {
17019
- value = object.value.at(property.value);
17020
- if (object instanceof StringValue) value = new StringValue(object.value.at(property.value));
17021
- } else if (property instanceof StringValue) value = object.builtins.get(property.value);
17022
- else throw new Error(`Cannot access property with non-string/non-number: got ${property.type}`);
17023
- else {
17616
+ } else if (object instanceof ArrayValue || object instanceof StringValue) {
17617
+ if (property instanceof IntegerValue) {
17618
+ value = object.value.at(property.value);
17619
+ if (object instanceof StringValue) value = new StringValue(object.value.at(property.value));
17620
+ } else if (property instanceof StringValue) value = object.builtins.get(property.value);
17621
+ else throw new Error(`Cannot access property with non-string/non-number: got ${property.type}`);
17622
+ } else {
17024
17623
  if (!(property instanceof StringValue)) throw new Error(`Cannot access property with non-string: got ${property.type}`);
17025
17624
  value = object.builtins.get(property.value);
17026
17625
  }
@@ -17410,10 +18009,11 @@ ${u}`, c = n.createShaderModule({
17410
18009
  * @param {string} template The template string
17411
18010
  */
17412
18011
  constructor(template) {
17413
- this.parsed = parse(tokenize(template, {
18012
+ const tokens = tokenize(template, {
17414
18013
  lstrip_blocks: true,
17415
18014
  trim_blocks: true
17416
- }));
18015
+ });
18016
+ this.parsed = parse(tokens);
17417
18017
  }
17418
18018
  render(items) {
17419
18019
  const env = new Environment();
@@ -17427,6 +18027,9 @@ ${u}`, c = n.createShaderModule({
17427
18027
  };
17428
18028
  }),
17429
18029
  "./src/backends/onnx.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
18030
+ /*!******************************!*\
18031
+ !*** ./src/backends/onnx.js ***!
18032
+ \******************************/
17430
18033
  var onnxruntime_node__WEBPACK_IMPORTED_MODULE_1___namespace_cache;
17431
18034
  __webpack_require__.r(__webpack_exports__);
17432
18035
  __webpack_require__.d(__webpack_exports__, {
@@ -17515,10 +18118,7 @@ ${u}`, c = n.createShaderModule({
17515
18118
  case "win32":
17516
18119
  supportedDevices.push("dml");
17517
18120
  break;
17518
- case "linux":
17519
- if (process.arch === "x64") supportedDevices.push("cuda");
17520
- break;
17521
- case "darwin": break;
18121
+ case "linux": if (process.arch === "x64") supportedDevices.push("cuda");
17522
18122
  }
17523
18123
  supportedDevices.push("cpu");
17524
18124
  defaultDevices = ["cpu"];
@@ -17613,6 +18213,9 @@ ${u}`, c = n.createShaderModule({
17613
18213
  _env_js__WEBPACK_IMPORTED_MODULE_0__.env.backends.onnx = ONNX_ENV;
17614
18214
  }),
17615
18215
  "./src/base/feature_extraction_utils.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
18216
+ /*!**********************************************!*\
18217
+ !*** ./src/base/feature_extraction_utils.js ***!
18218
+ \**********************************************/
17616
18219
  __webpack_require__.r(__webpack_exports__);
17617
18220
  __webpack_require__.d(__webpack_exports__, {
17618
18221
  FeatureExtractor: () => FeatureExtractor,
@@ -17674,6 +18277,9 @@ ${u}`, c = n.createShaderModule({
17674
18277
  }
17675
18278
  }),
17676
18279
  "./src/base/image_processors_utils.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
18280
+ /*!********************************************!*\
18281
+ !*** ./src/base/image_processors_utils.js ***!
18282
+ \********************************************/
17677
18283
  __webpack_require__.r(__webpack_exports__);
17678
18284
  __webpack_require__.d(__webpack_exports__, {
17679
18285
  ImageProcessor: () => ImageProcessor,
@@ -17973,7 +18579,7 @@ ${u}`, c = n.createShaderModule({
17973
18579
  * @returns {[number, number]} The new height and width of the image.
17974
18580
  * @throws {Error} If the height or width is smaller than the factor.
17975
18581
  */
17976
- function smart_resize(height, width, factor = 28, min_pixels = 3136, max_pixels = 784 * 1280) {
18582
+ function smart_resize(height, width, factor = 28, min_pixels = 3136, max_pixels = 1003520) {
17977
18583
  if (height < factor || width < factor) throw new Error(`height:${height} or width:${width} must be larger than factor:${factor}`);
17978
18584
  else if (Math.max(height, width) / Math.min(height, width) > 200) throw new Error(`absolute aspect ratio must be smaller than 200, got ${Math.max(height, width) / Math.min(height, width)}`);
17979
18585
  let h_bar = Math.round(height / factor) * factor;
@@ -18392,6 +18998,9 @@ ${u}`, c = n.createShaderModule({
18392
18998
  }
18393
18999
  }),
18394
19000
  "./src/base/processing_utils.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
19001
+ /*!**************************************!*\
19002
+ !*** ./src/base/processing_utils.js ***!
19003
+ \**************************************/
18395
19004
  __webpack_require__.r(__webpack_exports__);
18396
19005
  __webpack_require__.d(__webpack_exports__, { Processor: () => Processor });
18397
19006
  var _utils_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -18544,6 +19153,9 @@ ${u}`, c = n.createShaderModule({
18544
19153
  }
18545
19154
  }),
18546
19155
  "./src/configs.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
19156
+ /*!************************!*\
19157
+ !*** ./src/configs.js ***!
19158
+ \************************/
18547
19159
  __webpack_require__.r(__webpack_exports__);
18548
19160
  __webpack_require__.d(__webpack_exports__, {
18549
19161
  AutoConfig: () => AutoConfig,
@@ -18989,6 +19601,9 @@ ${u}`, c = n.createShaderModule({
18989
19601
  */
18990
19602
  }),
18991
19603
  "./src/env.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
19604
+ /*!********************!*\
19605
+ !*** ./src/env.js ***!
19606
+ \********************/
18992
19607
  __webpack_require__.r(__webpack_exports__);
18993
19608
  __webpack_require__.d(__webpack_exports__, {
18994
19609
  apis: () => apis,
@@ -19049,14 +19664,23 @@ ${u}`, c = n.createShaderModule({
19049
19664
  * A read-only object containing information about the APIs available in the current environment.
19050
19665
  */
19051
19666
  const apis = Object.freeze({
19667
+ /** Whether we are running in a browser environment (and not a web worker) */
19052
19668
  IS_BROWSER_ENV,
19669
+ /** Whether we are running in a web worker environment */
19053
19670
  IS_WEBWORKER_ENV,
19671
+ /** Whether the Cache API is available */
19054
19672
  IS_WEB_CACHE_AVAILABLE,
19673
+ /** Whether the WebGPU API is available */
19055
19674
  IS_WEBGPU_AVAILABLE,
19675
+ /** Whether the WebNN API is available */
19056
19676
  IS_WEBNN_AVAILABLE,
19677
+ /** Whether the Node.js process API is available */
19057
19678
  IS_PROCESS_AVAILABLE,
19679
+ /** Whether we are running in a Node.js-like environment (node, deno, bun) */
19058
19680
  IS_NODE_ENV,
19681
+ /** Whether the filesystem API is available */
19059
19682
  IS_FS_AVAILABLE,
19683
+ /** Whether the path API is available */
19060
19684
  IS_PATH_AVAILABLE
19061
19685
  });
19062
19686
  const RUNNING_LOCALLY = IS_FS_AVAILABLE && IS_PATH_AVAILABLE;
@@ -19116,6 +19740,9 @@ ${u}`, c = n.createShaderModule({
19116
19740
  }
19117
19741
  }),
19118
19742
  "./src/generation/configuration_utils.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
19743
+ /*!***********************************************!*\
19744
+ !*** ./src/generation/configuration_utils.js ***!
19745
+ \***********************************************/
19119
19746
  __webpack_require__.r(__webpack_exports__);
19120
19747
  __webpack_require__.d(__webpack_exports__, { GenerationConfig: () => GenerationConfig });
19121
19748
  var _utils_core_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -19454,6 +20081,9 @@ ${u}`, c = n.createShaderModule({
19454
20081
  }
19455
20082
  }),
19456
20083
  "./src/generation/logits_process.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
20084
+ /*!******************************************!*\
20085
+ !*** ./src/generation/logits_process.js ***!
20086
+ \******************************************/
19457
20087
  __webpack_require__.r(__webpack_exports__);
19458
20088
  __webpack_require__.d(__webpack_exports__, {
19459
20089
  ClassifierFreeGuidanceLogitsProcessor: () => ClassifierFreeGuidanceLogitsProcessor,
@@ -19686,8 +20316,10 @@ ${u}`, c = n.createShaderModule({
19686
20316
  const seq = input_ids[i].slice(this.begin_index);
19687
20317
  const last_was_timestamp = seq.length >= 1 && seq[seq.length - 1] >= this.timestamp_begin;
19688
20318
  const penultimate_was_timestamp = seq.length < 2 || seq[seq.length - 2] >= this.timestamp_begin;
19689
- if (last_was_timestamp) if (penultimate_was_timestamp) batch_logits_data.subarray(this.timestamp_begin).fill(-Infinity);
19690
- else batch_logits_data.subarray(0, this.eos_token_id).fill(-Infinity);
20319
+ if (last_was_timestamp) {
20320
+ if (penultimate_was_timestamp) batch_logits_data.subarray(this.timestamp_begin).fill(-Infinity);
20321
+ else batch_logits_data.subarray(0, this.eos_token_id).fill(-Infinity);
20322
+ }
19691
20323
  if (input_ids[i].length === this.begin_index && this.max_initial_timestamp_index !== null) {
19692
20324
  const last_allowed = this.timestamp_begin + this.max_initial_timestamp_index;
19693
20325
  batch_logits_data.subarray(last_allowed + 1).fill(-Infinity);
@@ -20014,6 +20646,9 @@ ${u}`, c = n.createShaderModule({
20014
20646
  }
20015
20647
  }),
20016
20648
  "./src/generation/logits_sampler.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
20649
+ /*!******************************************!*\
20650
+ !*** ./src/generation/logits_sampler.js ***!
20651
+ \******************************************/
20017
20652
  __webpack_require__.r(__webpack_exports__);
20018
20653
  __webpack_require__.d(__webpack_exports__, { LogitsSampler: () => LogitsSampler });
20019
20654
  var _utils_generic_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -20164,6 +20799,9 @@ ${u}`, c = n.createShaderModule({
20164
20799
  }
20165
20800
  }),
20166
20801
  "./src/generation/stopping_criteria.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
20802
+ /*!*********************************************!*\
20803
+ !*** ./src/generation/stopping_criteria.js ***!
20804
+ \*********************************************/
20167
20805
  __webpack_require__.r(__webpack_exports__);
20168
20806
  __webpack_require__.d(__webpack_exports__, {
20169
20807
  EosTokenCriteria: () => EosTokenCriteria,
@@ -20303,6 +20941,9 @@ ${u}`, c = n.createShaderModule({
20303
20941
  }
20304
20942
  }),
20305
20943
  "./src/generation/streamers.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
20944
+ /*!*************************************!*\
20945
+ !*** ./src/generation/streamers.js ***!
20946
+ \*************************************/
20306
20947
  __webpack_require__.r(__webpack_exports__);
20307
20948
  __webpack_require__.d(__webpack_exports__, {
20308
20949
  BaseStreamer: () => BaseStreamer,
@@ -20484,6 +21125,9 @@ ${u}`, c = n.createShaderModule({
20484
21125
  }
20485
21126
  }),
20486
21127
  "./src/models.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
21128
+ /*!***********************!*\
21129
+ !*** ./src/models.js ***!
21130
+ \***********************/
20487
21131
  __webpack_require__.r(__webpack_exports__);
20488
21132
  __webpack_require__.d(__webpack_exports__, {
20489
21133
  ASTForAudioClassification: () => ASTForAudioClassification,
@@ -21220,10 +21864,12 @@ ${u}`, c = n.createShaderModule({
21220
21864
  async function getSession(pretrained_model_name_or_path, fileName, options) {
21221
21865
  let custom_config = options.config?.["transformers.js_config"] ?? {};
21222
21866
  let device = options.device ?? custom_config.device;
21223
- if (device && typeof device !== "string") if (device.hasOwnProperty(fileName)) device = device[fileName];
21224
- else {
21225
- console.warn(`device not specified for "${fileName}". Using the default device.`);
21226
- device = null;
21867
+ if (device && typeof device !== "string") {
21868
+ if (device.hasOwnProperty(fileName)) device = device[fileName];
21869
+ else {
21870
+ console.warn(`device not specified for "${fileName}". Using the default device.`);
21871
+ device = null;
21872
+ }
21227
21873
  }
21228
21874
  const selectedDevice = device ?? (_env_js__WEBPACK_IMPORTED_MODULE_14__.apis.IS_NODE_ENV ? "cpu" : "wasm");
21229
21875
  const executionProviders = (0, _backends_onnx_js__WEBPACK_IMPORTED_MODULE_1__.deviceToExecutionProviders)(selectedDevice);
@@ -21233,10 +21879,12 @@ ${u}`, c = n.createShaderModule({
21233
21879
  ...device_config[selectedDevice]
21234
21880
  };
21235
21881
  let dtype = options.dtype ?? custom_config.dtype;
21236
- if (typeof dtype !== "string") if (dtype && dtype.hasOwnProperty(fileName)) dtype = dtype[fileName];
21237
- else {
21238
- dtype = _utils_dtypes_js__WEBPACK_IMPORTED_MODULE_2__.DEFAULT_DEVICE_DTYPE_MAPPING[selectedDevice] ?? _utils_dtypes_js__WEBPACK_IMPORTED_MODULE_2__.DATA_TYPES.fp32;
21239
- console.warn(`dtype not specified for "${fileName}". Using the default dtype (${dtype}) for this device (${selectedDevice}).`);
21882
+ if (typeof dtype !== "string") {
21883
+ if (dtype && dtype.hasOwnProperty(fileName)) dtype = dtype[fileName];
21884
+ else {
21885
+ dtype = _utils_dtypes_js__WEBPACK_IMPORTED_MODULE_2__.DEFAULT_DEVICE_DTYPE_MAPPING[selectedDevice] ?? _utils_dtypes_js__WEBPACK_IMPORTED_MODULE_2__.DATA_TYPES.fp32;
21886
+ console.warn(`dtype not specified for "${fileName}". Using the default dtype (${dtype}) for this device (${selectedDevice}).`);
21887
+ }
21240
21888
  }
21241
21889
  if (dtype === _utils_dtypes_js__WEBPACK_IMPORTED_MODULE_2__.DATA_TYPES.auto) {
21242
21890
  let config_dtype = custom_config.dtype;
@@ -21269,10 +21917,11 @@ ${u}`, c = n.createShaderModule({
21269
21917
  let externalDataPromises = [];
21270
21918
  if (use_external_data_format) {
21271
21919
  let external_data_format;
21272
- if (typeof use_external_data_format === "object") if (use_external_data_format.hasOwnProperty(baseName)) external_data_format = use_external_data_format[baseName];
21273
- else if (use_external_data_format.hasOwnProperty(fileName)) external_data_format = use_external_data_format[fileName];
21274
- else external_data_format = false;
21275
- else external_data_format = use_external_data_format;
21920
+ if (typeof use_external_data_format === "object") {
21921
+ if (use_external_data_format.hasOwnProperty(baseName)) external_data_format = use_external_data_format[baseName];
21922
+ else if (use_external_data_format.hasOwnProperty(fileName)) external_data_format = use_external_data_format[fileName];
21923
+ else external_data_format = false;
21924
+ } else external_data_format = use_external_data_format;
21276
21925
  const num_chunks = +external_data_format;
21277
21926
  if (num_chunks > _utils_hub_js__WEBPACK_IMPORTED_MODULE_5__.MAX_EXTERNAL_DATA_CHUNKS) throw new Error(`The number of external data chunks (${num_chunks}) exceeds the maximum allowed value (${_utils_hub_js__WEBPACK_IMPORTED_MODULE_5__.MAX_EXTERNAL_DATA_CHUNKS}).`);
21278
21927
  for (let i = 0; i < num_chunks; ++i) {
@@ -21720,10 +22369,12 @@ ${u}`, c = n.createShaderModule({
21720
22369
  }
21721
22370
  function multimodality_prepare_inputs_for_generation(self, input_ids, model_inputs, generation_config) {
21722
22371
  const has_past_key_values = !!model_inputs.past_key_values;
21723
- if (generation_config.guidance_scale !== null && generation_config.guidance_scale > 1) if (has_past_key_values) model_inputs.input_ids = (0, _utils_tensor_js__WEBPACK_IMPORTED_MODULE_9__.cat)([model_inputs.input_ids, model_inputs.input_ids], 0);
21724
- else {
21725
- model_inputs.input_ids = (0, _utils_tensor_js__WEBPACK_IMPORTED_MODULE_9__.cat)([model_inputs.input_ids, (0, _utils_tensor_js__WEBPACK_IMPORTED_MODULE_9__.full_like)(model_inputs.input_ids, BigInt(generation_config.pad_token_id))], 0);
21726
- model_inputs.attention_mask = (0, _utils_tensor_js__WEBPACK_IMPORTED_MODULE_9__.cat)([model_inputs.attention_mask, (0, _utils_tensor_js__WEBPACK_IMPORTED_MODULE_9__.full_like)(model_inputs.attention_mask, 0n)], 0);
22372
+ if (generation_config.guidance_scale !== null && generation_config.guidance_scale > 1) {
22373
+ if (has_past_key_values) model_inputs.input_ids = (0, _utils_tensor_js__WEBPACK_IMPORTED_MODULE_9__.cat)([model_inputs.input_ids, model_inputs.input_ids], 0);
22374
+ else {
22375
+ model_inputs.input_ids = (0, _utils_tensor_js__WEBPACK_IMPORTED_MODULE_9__.cat)([model_inputs.input_ids, (0, _utils_tensor_js__WEBPACK_IMPORTED_MODULE_9__.full_like)(model_inputs.input_ids, BigInt(generation_config.pad_token_id))], 0);
22376
+ model_inputs.attention_mask = (0, _utils_tensor_js__WEBPACK_IMPORTED_MODULE_9__.cat)([model_inputs.attention_mask, (0, _utils_tensor_js__WEBPACK_IMPORTED_MODULE_9__.full_like)(model_inputs.attention_mask, 0n)], 0);
22377
+ }
21727
22378
  }
21728
22379
  if (has_past_key_values || !model_inputs.pixel_values) model_inputs.pixel_values = (0, _utils_tensor_js__WEBPACK_IMPORTED_MODULE_9__.full)([
21729
22380
  0,
@@ -21735,10 +22386,9 @@ ${u}`, c = n.createShaderModule({
21735
22386
  if (has_past_key_values) {
21736
22387
  const num_img_tokens = 0;
21737
22388
  const num_text_tokens = 1;
21738
- const has_image = num_img_tokens > 0 ? 1 : 0;
21739
22389
  const batch_size = 1;
21740
- model_inputs.images_seq_mask = new _utils_tensor_js__WEBPACK_IMPORTED_MODULE_9__.Tensor("bool", new Array(num_img_tokens + num_text_tokens).fill(true).fill(false, 0, num_text_tokens), [batch_size, num_img_tokens + num_text_tokens]);
21741
- model_inputs.images_emb_mask = new _utils_tensor_js__WEBPACK_IMPORTED_MODULE_9__.Tensor("bool", new Array(num_img_tokens).fill(!!has_image), [
22390
+ model_inputs.images_seq_mask = new _utils_tensor_js__WEBPACK_IMPORTED_MODULE_9__.Tensor("bool", new Array(1).fill(true).fill(false, 0, num_text_tokens), [batch_size, 1]);
22391
+ model_inputs.images_emb_mask = new _utils_tensor_js__WEBPACK_IMPORTED_MODULE_9__.Tensor("bool", new Array(num_img_tokens).fill(false), [
21742
22392
  batch_size,
21743
22393
  1,
21744
22394
  num_img_tokens
@@ -21806,9 +22456,7 @@ ${u}`, c = n.createShaderModule({
21806
22456
  case MODEL_TYPES.AutoEncoder:
21807
22457
  this._forward = autoEncoderForward;
21808
22458
  break;
21809
- default:
21810
- this._forward = encoderForward;
21811
- break;
22459
+ default: this._forward = encoderForward;
21812
22460
  }
21813
22461
  if (this.can_generate) this.forward_params.push("past_key_values");
21814
22462
  /** @type {import('./configs.js').TransformersJSConfig} */
@@ -23626,13 +24274,14 @@ ${u}`, c = n.createShaderModule({
23626
24274
  if (!decoder_input_ids) throw new Error("Either `decoder_input_ids` or `decoder_inputs_embeds` should be provided.");
23627
24275
  decoder_inputs_embeds = await this.encode_text({ input_ids: decoder_input_ids });
23628
24276
  }
23629
- return await decoderForward(this, {
24277
+ const decoderFeeds = {
23630
24278
  inputs_embeds: decoder_inputs_embeds,
23631
24279
  attention_mask: decoder_attention_mask,
23632
24280
  encoder_attention_mask: attention_mask,
23633
24281
  encoder_hidden_states: encoder_outputs,
23634
24282
  past_key_values
23635
- }, true);
24283
+ };
24284
+ return await decoderForward(this, decoderFeeds, true);
23636
24285
  }
23637
24286
  }
23638
24287
  class PaliGemmaPreTrainedModel extends PreTrainedModel {
@@ -24468,16 +25117,18 @@ ${u}`, c = n.createShaderModule({
24468
25117
  });
24469
25118
  }
24470
25119
  prepare_inputs_for_generation(input_ids, model_inputs, generation_config) {
24471
- if (model_inputs.attention_mask && !model_inputs.position_ids) if (!model_inputs.past_key_values) [model_inputs.position_ids, model_inputs.rope_deltas] = this.get_rope_index(model_inputs.input_ids, model_inputs.image_grid_thw, model_inputs.video_grid_thw, model_inputs.attention_mask);
24472
- else {
24473
- model_inputs.pixel_values = null;
24474
- const delta = BigInt(Object.values(model_inputs.past_key_values)[0].dims.at(-2));
24475
- const rope_deltas_list = model_inputs.rope_deltas.map((x) => delta + x);
24476
- model_inputs.position_ids = (0, _utils_tensor_js__WEBPACK_IMPORTED_MODULE_9__.stack)([
24477
- rope_deltas_list,
24478
- rope_deltas_list,
24479
- rope_deltas_list
24480
- ], 0);
25120
+ if (model_inputs.attention_mask && !model_inputs.position_ids) {
25121
+ if (!model_inputs.past_key_values) [model_inputs.position_ids, model_inputs.rope_deltas] = this.get_rope_index(model_inputs.input_ids, model_inputs.image_grid_thw, model_inputs.video_grid_thw, model_inputs.attention_mask);
25122
+ else {
25123
+ model_inputs.pixel_values = null;
25124
+ const delta = BigInt(Object.values(model_inputs.past_key_values)[0].dims.at(-2));
25125
+ const rope_deltas_list = model_inputs.rope_deltas.map((x) => delta + x);
25126
+ model_inputs.position_ids = (0, _utils_tensor_js__WEBPACK_IMPORTED_MODULE_9__.stack)([
25127
+ rope_deltas_list,
25128
+ rope_deltas_list,
25129
+ rope_deltas_list
25130
+ ], 0);
25131
+ }
24481
25132
  }
24482
25133
  return model_inputs;
24483
25134
  }
@@ -25879,7 +26530,8 @@ ${u}`, c = n.createShaderModule({
25879
26530
  * @returns {Promise<SpeechOutput>} A promise which resolves to an object containing the spectrogram, waveform, and cross-attention tensors.
25880
26531
  */
25881
26532
  async generate_speech(input_values, speaker_embeddings, { threshold = .5, minlenratio = 0, maxlenratio = 20, vocoder = null } = {}) {
25882
- const { encoder_outputs, encoder_attention_mask } = await encoderForward(this, { input_ids: input_values });
26533
+ const model_inputs = { input_ids: input_values };
26534
+ const { encoder_outputs, encoder_attention_mask } = await encoderForward(this, model_inputs);
25883
26535
  const r = encoder_outputs.dims[1] / this.config.reduction_factor;
25884
26536
  const maxlen = Math.floor(r * maxlenratio);
25885
26537
  const minlen = Math.floor(r * minlenratio);
@@ -26674,7 +27326,7 @@ ${u}`, c = n.createShaderModule({
26674
27326
  } else throw Error(`Unsupported model type: ${model_type}`);
26675
27327
  }
26676
27328
  }
26677
- const MODEL_MAPPING_NAMES_ENCODER_ONLY = new Map([
27329
+ const MODEL_MAPPING_NAMES_ENCODER_ONLY = /* @__PURE__ */ new Map([
26678
27330
  ["bert", ["BertModel", BertModel]],
26679
27331
  ["neobert", ["NeoBertModel", NeoBertModel]],
26680
27332
  ["modernbert", ["ModernBertModel", ModernBertModel]],
@@ -26756,7 +27408,7 @@ ${u}`, c = n.createShaderModule({
26756
27408
  ["mgp-str", ["MgpstrForSceneTextRecognition", MgpstrForSceneTextRecognition]],
26757
27409
  ["style_text_to_speech_2", ["StyleTextToSpeech2Model", StyleTextToSpeech2Model]]
26758
27410
  ]);
26759
- const MODEL_MAPPING_NAMES_ENCODER_DECODER = new Map([
27411
+ const MODEL_MAPPING_NAMES_ENCODER_DECODER = /* @__PURE__ */ new Map([
26760
27412
  ["t5", ["T5Model", T5Model]],
26761
27413
  ["longt5", ["LongT5Model", LongT5Model]],
26762
27414
  ["mt5", ["MT5Model", MT5Model]],
@@ -26768,12 +27420,12 @@ ${u}`, c = n.createShaderModule({
26768
27420
  ["blenderbot", ["BlenderbotModel", BlenderbotModel]],
26769
27421
  ["blenderbot-small", ["BlenderbotSmallModel", BlenderbotSmallModel]]
26770
27422
  ]);
26771
- const MODEL_MAPPING_NAMES_AUTO_ENCODER = new Map([
27423
+ const MODEL_MAPPING_NAMES_AUTO_ENCODER = /* @__PURE__ */ new Map([
26772
27424
  ["mimi", ["MimiModel", MimiModel]],
26773
27425
  ["dac", ["DacModel", DacModel]],
26774
27426
  ["snac", ["SnacModel", SnacModel]]
26775
27427
  ]);
26776
- const MODEL_MAPPING_NAMES_DECODER_ONLY = new Map([
27428
+ const MODEL_MAPPING_NAMES_DECODER_ONLY = /* @__PURE__ */ new Map([
26777
27429
  ["bloom", ["BloomModel", BloomModel]],
26778
27430
  ["jais", ["JAISModel", JAISModel]],
26779
27431
  ["gpt2", ["GPT2Model", GPT2Model]],
@@ -26816,19 +27468,19 @@ ${u}`, c = n.createShaderModule({
26816
27468
  ["stablelm", ["StableLmModel", StableLmModel]],
26817
27469
  ["modernbert-decoder", ["ModernBertDecoderModel", ModernBertDecoderModel]]
26818
27470
  ]);
26819
- const MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING_NAMES = new Map([
27471
+ const MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING_NAMES = /* @__PURE__ */ new Map([
26820
27472
  ["speecht5", ["SpeechT5ForSpeechToText", SpeechT5ForSpeechToText]],
26821
27473
  ["whisper", ["WhisperForConditionalGeneration", WhisperForConditionalGeneration]],
26822
27474
  ["lite-whisper", ["LiteWhisperForConditionalGeneration", LiteWhisperForConditionalGeneration]],
26823
27475
  ["moonshine", ["MoonshineForConditionalGeneration", MoonshineForConditionalGeneration]]
26824
27476
  ]);
26825
- const MODEL_FOR_TEXT_TO_SPECTROGRAM_MAPPING_NAMES = new Map([["speecht5", ["SpeechT5ForTextToSpeech", SpeechT5ForTextToSpeech]]]);
26826
- const MODEL_FOR_TEXT_TO_WAVEFORM_MAPPING_NAMES = new Map([
27477
+ const MODEL_FOR_TEXT_TO_SPECTROGRAM_MAPPING_NAMES = /* @__PURE__ */ new Map([["speecht5", ["SpeechT5ForTextToSpeech", SpeechT5ForTextToSpeech]]]);
27478
+ const MODEL_FOR_TEXT_TO_WAVEFORM_MAPPING_NAMES = /* @__PURE__ */ new Map([
26827
27479
  ["vits", ["VitsModel", VitsModel]],
26828
27480
  ["musicgen", ["MusicgenForConditionalGeneration", MusicgenForConditionalGeneration]],
26829
27481
  ["supertonic", ["SupertonicForConditionalGeneration", SupertonicForConditionalGeneration]]
26830
27482
  ]);
26831
- const MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING_NAMES = new Map([
27483
+ const MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING_NAMES = /* @__PURE__ */ new Map([
26832
27484
  ["bert", ["BertForSequenceClassification", BertForSequenceClassification]],
26833
27485
  ["neobert", ["NeoBertForSequenceClassification", NeoBertForSequenceClassification]],
26834
27486
  ["modernbert", ["ModernBertForSequenceClassification", ModernBertForSequenceClassification]],
@@ -26850,7 +27502,7 @@ ${u}`, c = n.createShaderModule({
26850
27502
  ["mobilebert", ["MobileBertForSequenceClassification", MobileBertForSequenceClassification]],
26851
27503
  ["squeezebert", ["SqueezeBertForSequenceClassification", SqueezeBertForSequenceClassification]]
26852
27504
  ]);
26853
- const MODEL_FOR_TOKEN_CLASSIFICATION_MAPPING_NAMES = new Map([
27505
+ const MODEL_FOR_TOKEN_CLASSIFICATION_MAPPING_NAMES = /* @__PURE__ */ new Map([
26854
27506
  ["bert", ["BertForTokenClassification", BertForTokenClassification]],
26855
27507
  ["neobert", ["NeoBertForTokenClassification", NeoBertForTokenClassification]],
26856
27508
  ["modernbert", ["ModernBertForTokenClassification", ModernBertForTokenClassification]],
@@ -26867,7 +27519,7 @@ ${u}`, c = n.createShaderModule({
26867
27519
  ["xlm", ["XLMForTokenClassification", XLMForTokenClassification]],
26868
27520
  ["xlm-roberta", ["XLMRobertaForTokenClassification", XLMRobertaForTokenClassification]]
26869
27521
  ]);
26870
- const MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING_NAMES = new Map([
27522
+ const MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING_NAMES = /* @__PURE__ */ new Map([
26871
27523
  ["t5", ["T5ForConditionalGeneration", T5ForConditionalGeneration]],
26872
27524
  ["longt5", ["LongT5ForConditionalGeneration", LongT5ForConditionalGeneration]],
26873
27525
  ["mt5", ["MT5ForConditionalGeneration", MT5ForConditionalGeneration]],
@@ -26878,7 +27530,7 @@ ${u}`, c = n.createShaderModule({
26878
27530
  ["blenderbot", ["BlenderbotForConditionalGeneration", BlenderbotForConditionalGeneration]],
26879
27531
  ["blenderbot-small", ["BlenderbotSmallForConditionalGeneration", BlenderbotSmallForConditionalGeneration]]
26880
27532
  ]);
26881
- const MODEL_FOR_CAUSAL_LM_MAPPING_NAMES = new Map([
27533
+ const MODEL_FOR_CAUSAL_LM_MAPPING_NAMES = /* @__PURE__ */ new Map([
26882
27534
  ["bloom", ["BloomForCausalLM", BloomForCausalLM]],
26883
27535
  ["gpt2", ["GPT2LMHeadModel", GPT2LMHeadModel]],
26884
27536
  ["jais", ["JAISLMHeadModel", JAISLMHeadModel]],
@@ -26925,8 +27577,8 @@ ${u}`, c = n.createShaderModule({
26925
27577
  ["modernbert-decoder", ["ModernBertDecoderForCausalLM", ModernBertDecoderForCausalLM]],
26926
27578
  ["phi3_v", ["Phi3VForCausalLM", Phi3VForCausalLM]]
26927
27579
  ]);
26928
- const MODEL_FOR_MULTIMODALITY_MAPPING_NAMES = new Map([["multi_modality", ["MultiModalityCausalLM", MultiModalityCausalLM]]]);
26929
- const MODEL_FOR_MASKED_LM_MAPPING_NAMES = new Map([
27580
+ const MODEL_FOR_MULTIMODALITY_MAPPING_NAMES = /* @__PURE__ */ new Map([["multi_modality", ["MultiModalityCausalLM", MultiModalityCausalLM]]]);
27581
+ const MODEL_FOR_MASKED_LM_MAPPING_NAMES = /* @__PURE__ */ new Map([
26930
27582
  ["bert", ["BertForMaskedLM", BertForMaskedLM]],
26931
27583
  ["neobert", ["NeoBertForMaskedLM", NeoBertForMaskedLM]],
26932
27584
  ["modernbert", ["ModernBertForMaskedLM", ModernBertForMaskedLM]],
@@ -26946,7 +27598,7 @@ ${u}`, c = n.createShaderModule({
26946
27598
  ["mobilebert", ["MobileBertForMaskedLM", MobileBertForMaskedLM]],
26947
27599
  ["squeezebert", ["SqueezeBertForMaskedLM", SqueezeBertForMaskedLM]]
26948
27600
  ]);
26949
- const MODEL_FOR_QUESTION_ANSWERING_MAPPING_NAMES = new Map([
27601
+ const MODEL_FOR_QUESTION_ANSWERING_MAPPING_NAMES = /* @__PURE__ */ new Map([
26950
27602
  ["bert", ["BertForQuestionAnswering", BertForQuestionAnswering]],
26951
27603
  ["neobert", ["NeoBertForQuestionAnswering", NeoBertForQuestionAnswering]],
26952
27604
  ["roformer", ["RoFormerForQuestionAnswering", RoFormerForQuestionAnswering]],
@@ -26964,12 +27616,12 @@ ${u}`, c = n.createShaderModule({
26964
27616
  ["mobilebert", ["MobileBertForQuestionAnswering", MobileBertForQuestionAnswering]],
26965
27617
  ["squeezebert", ["SqueezeBertForQuestionAnswering", SqueezeBertForQuestionAnswering]]
26966
27618
  ]);
26967
- const MODEL_FOR_VISION_2_SEQ_MAPPING_NAMES = new Map([
27619
+ const MODEL_FOR_VISION_2_SEQ_MAPPING_NAMES = /* @__PURE__ */ new Map([
26968
27620
  ["vision-encoder-decoder", ["VisionEncoderDecoderModel", VisionEncoderDecoderModel]],
26969
27621
  ["idefics3", ["Idefics3ForConditionalGeneration", Idefics3ForConditionalGeneration]],
26970
27622
  ["smolvlm", ["SmolVLMForConditionalGeneration", SmolVLMForConditionalGeneration]]
26971
27623
  ]);
26972
- const MODEL_FOR_IMAGE_TEXT_TO_TEXT_MAPPING_NAMES = new Map([
27624
+ const MODEL_FOR_IMAGE_TEXT_TO_TEXT_MAPPING_NAMES = /* @__PURE__ */ new Map([
26973
27625
  ["llava", ["LlavaForConditionalGeneration", LlavaForConditionalGeneration]],
26974
27626
  ["llava_onevision", ["LlavaOnevisionForConditionalGeneration", LlavaOnevisionForConditionalGeneration]],
26975
27627
  ["moondream1", ["Moondream1ForConditionalGeneration", Moondream1ForConditionalGeneration]],
@@ -26982,9 +27634,9 @@ ${u}`, c = n.createShaderModule({
26982
27634
  ["gemma3n", ["Gemma3nForConditionalGeneration", Gemma3nForConditionalGeneration]],
26983
27635
  ["mistral3", ["Mistral3ForConditionalGeneration", Mistral3ForConditionalGeneration]]
26984
27636
  ]);
26985
- const MODEL_FOR_AUDIO_TEXT_TO_TEXT_MAPPING_NAMES = new Map([["ultravox", ["UltravoxModel", UltravoxModel]], ["voxtral", ["VoxtralForConditionalGeneration", VoxtralForConditionalGeneration]]]);
26986
- const MODEL_FOR_DOCUMENT_QUESTION_ANSWERING_MAPPING_NAMES = new Map([["vision-encoder-decoder", ["VisionEncoderDecoderModel", VisionEncoderDecoderModel]]]);
26987
- const MODEL_FOR_IMAGE_CLASSIFICATION_MAPPING_NAMES = new Map([
27637
+ const MODEL_FOR_AUDIO_TEXT_TO_TEXT_MAPPING_NAMES = /* @__PURE__ */ new Map([["ultravox", ["UltravoxModel", UltravoxModel]], ["voxtral", ["VoxtralForConditionalGeneration", VoxtralForConditionalGeneration]]]);
27638
+ const MODEL_FOR_DOCUMENT_QUESTION_ANSWERING_MAPPING_NAMES = /* @__PURE__ */ new Map([["vision-encoder-decoder", ["VisionEncoderDecoderModel", VisionEncoderDecoderModel]]]);
27639
+ const MODEL_FOR_IMAGE_CLASSIFICATION_MAPPING_NAMES = /* @__PURE__ */ new Map([
26988
27640
  ["vit", ["ViTForImageClassification", ViTForImageClassification]],
26989
27641
  ["ijepa", ["IJepaForImageClassification", IJepaForImageClassification]],
26990
27642
  ["pvt", ["PvtForImageClassification", PvtForImageClassification]],
@@ -27008,7 +27660,7 @@ ${u}`, c = n.createShaderModule({
27008
27660
  ["mobilenet_v3", ["MobileNetV3ForImageClassification", MobileNetV3ForImageClassification]],
27009
27661
  ["mobilenet_v4", ["MobileNetV4ForImageClassification", MobileNetV4ForImageClassification]]
27010
27662
  ]);
27011
- const MODEL_FOR_OBJECT_DETECTION_MAPPING_NAMES = new Map([
27663
+ const MODEL_FOR_OBJECT_DETECTION_MAPPING_NAMES = /* @__PURE__ */ new Map([
27012
27664
  ["detr", ["DetrForObjectDetection", DetrForObjectDetection]],
27013
27665
  ["rt_detr", ["RTDetrForObjectDetection", RTDetrForObjectDetection]],
27014
27666
  ["rt_detr_v2", ["RTDetrV2ForObjectDetection", RTDetrV2ForObjectDetection]],
@@ -27017,13 +27669,13 @@ ${u}`, c = n.createShaderModule({
27017
27669
  ["table-transformer", ["TableTransformerForObjectDetection", TableTransformerForObjectDetection]],
27018
27670
  ["yolos", ["YolosForObjectDetection", YolosForObjectDetection]]
27019
27671
  ]);
27020
- const MODEL_FOR_ZERO_SHOT_OBJECT_DETECTION_MAPPING_NAMES = new Map([
27672
+ const MODEL_FOR_ZERO_SHOT_OBJECT_DETECTION_MAPPING_NAMES = /* @__PURE__ */ new Map([
27021
27673
  ["owlvit", ["OwlViTForObjectDetection", OwlViTForObjectDetection]],
27022
27674
  ["owlv2", ["Owlv2ForObjectDetection", Owlv2ForObjectDetection]],
27023
27675
  ["grounding-dino", ["GroundingDinoForObjectDetection", GroundingDinoForObjectDetection]]
27024
27676
  ]);
27025
- const MODEL_FOR_IMAGE_SEGMENTATION_MAPPING_NAMES = new Map([["detr", ["DetrForSegmentation", DetrForSegmentation]], ["clipseg", ["CLIPSegForImageSegmentation", CLIPSegForImageSegmentation]]]);
27026
- const MODEL_FOR_SEMANTIC_SEGMENTATION_MAPPING_NAMES = new Map([
27677
+ const MODEL_FOR_IMAGE_SEGMENTATION_MAPPING_NAMES = /* @__PURE__ */ new Map([["detr", ["DetrForSegmentation", DetrForSegmentation]], ["clipseg", ["CLIPSegForImageSegmentation", CLIPSegForImageSegmentation]]]);
27678
+ const MODEL_FOR_SEMANTIC_SEGMENTATION_MAPPING_NAMES = /* @__PURE__ */ new Map([
27027
27679
  ["segformer", ["SegformerForSemanticSegmentation", SegformerForSemanticSegmentation]],
27028
27680
  ["sapiens", ["SapiensForSemanticSegmentation", SapiensForSemanticSegmentation]],
27029
27681
  ["swin", ["SwinForSemanticSegmentation", SwinForSemanticSegmentation]],
@@ -27032,14 +27684,14 @@ ${u}`, c = n.createShaderModule({
27032
27684
  ["mobilenet_v3", ["MobileNetV3ForSemanticSegmentation", MobileNetV3ForSemanticSegmentation]],
27033
27685
  ["mobilenet_v4", ["MobileNetV4ForSemanticSegmentation", MobileNetV4ForSemanticSegmentation]]
27034
27686
  ]);
27035
- const MODEL_FOR_UNIVERSAL_SEGMENTATION_MAPPING_NAMES = new Map([["detr", ["DetrForSegmentation", DetrForSegmentation]], ["maskformer", ["MaskFormerForInstanceSegmentation", MaskFormerForInstanceSegmentation]]]);
27036
- const MODEL_FOR_MASK_GENERATION_MAPPING_NAMES = new Map([
27687
+ const MODEL_FOR_UNIVERSAL_SEGMENTATION_MAPPING_NAMES = /* @__PURE__ */ new Map([["detr", ["DetrForSegmentation", DetrForSegmentation]], ["maskformer", ["MaskFormerForInstanceSegmentation", MaskFormerForInstanceSegmentation]]]);
27688
+ const MODEL_FOR_MASK_GENERATION_MAPPING_NAMES = /* @__PURE__ */ new Map([
27037
27689
  ["sam", ["SamModel", SamModel]],
27038
27690
  ["sam2", ["Sam2Model", Sam2Model]],
27039
27691
  ["edgetam", ["EdgeTamModel", EdgeTamModel]],
27040
27692
  ["sam3_tracker", ["Sam3TrackerModel", Sam3TrackerModel]]
27041
27693
  ]);
27042
- const MODEL_FOR_CTC_MAPPING_NAMES = new Map([
27694
+ const MODEL_FOR_CTC_MAPPING_NAMES = /* @__PURE__ */ new Map([
27043
27695
  ["wav2vec2", ["Wav2Vec2ForCTC", Wav2Vec2ForCTC]],
27044
27696
  ["wav2vec2-bert", ["Wav2Vec2BertForCTC", Wav2Vec2BertForCTC]],
27045
27697
  ["unispeech", ["UniSpeechForCTC", UniSpeechForCTC]],
@@ -27048,7 +27700,7 @@ ${u}`, c = n.createShaderModule({
27048
27700
  ["hubert", ["HubertForCTC", HubertForCTC]],
27049
27701
  ["parakeet_ctc", ["ParakeetForCTC", ParakeetForCTC]]
27050
27702
  ]);
27051
- const MODEL_FOR_AUDIO_CLASSIFICATION_MAPPING_NAMES = new Map([
27703
+ const MODEL_FOR_AUDIO_CLASSIFICATION_MAPPING_NAMES = /* @__PURE__ */ new Map([
27052
27704
  ["wav2vec2", ["Wav2Vec2ForSequenceClassification", Wav2Vec2ForSequenceClassification]],
27053
27705
  ["wav2vec2-bert", ["Wav2Vec2BertForSequenceClassification", Wav2Vec2BertForSequenceClassification]],
27054
27706
  ["unispeech", ["UniSpeechForSequenceClassification", UniSpeechForSequenceClassification]],
@@ -27057,17 +27709,17 @@ ${u}`, c = n.createShaderModule({
27057
27709
  ["hubert", ["HubertForSequenceClassification", HubertForSequenceClassification]],
27058
27710
  ["audio-spectrogram-transformer", ["ASTForAudioClassification", ASTForAudioClassification]]
27059
27711
  ]);
27060
- const MODEL_FOR_AUDIO_XVECTOR_MAPPING_NAMES = new Map([["wavlm", ["WavLMForXVector", WavLMForXVector]]]);
27061
- const MODEL_FOR_AUDIO_FRAME_CLASSIFICATION_MAPPING_NAMES = new Map([
27712
+ const MODEL_FOR_AUDIO_XVECTOR_MAPPING_NAMES = /* @__PURE__ */ new Map([["wavlm", ["WavLMForXVector", WavLMForXVector]]]);
27713
+ const MODEL_FOR_AUDIO_FRAME_CLASSIFICATION_MAPPING_NAMES = /* @__PURE__ */ new Map([
27062
27714
  ["unispeech-sat", ["UniSpeechSatForAudioFrameClassification", UniSpeechSatForAudioFrameClassification]],
27063
27715
  ["wavlm", ["WavLMForAudioFrameClassification", WavLMForAudioFrameClassification]],
27064
27716
  ["wav2vec2", ["Wav2Vec2ForAudioFrameClassification", Wav2Vec2ForAudioFrameClassification]],
27065
27717
  ["pyannote", ["PyAnnoteForAudioFrameClassification", PyAnnoteForAudioFrameClassification]]
27066
27718
  ]);
27067
- const MODEL_FOR_IMAGE_MATTING_MAPPING_NAMES = new Map([["vitmatte", ["VitMatteForImageMatting", VitMatteForImageMatting]]]);
27068
- const MODEL_FOR_TIME_SERIES_PREDICTION_MAPPING_NAMES = new Map([["patchtst", ["PatchTSTForPrediction", PatchTSTForPrediction]], ["patchtsmixer", ["PatchTSMixerForPrediction", PatchTSMixerForPrediction]]]);
27069
- const MODEL_FOR_IMAGE_TO_IMAGE_MAPPING_NAMES = new Map([["swin2sr", ["Swin2SRForImageSuperResolution", Swin2SRForImageSuperResolution]]]);
27070
- const MODEL_FOR_DEPTH_ESTIMATION_MAPPING_NAMES = new Map([
27719
+ const MODEL_FOR_IMAGE_MATTING_MAPPING_NAMES = /* @__PURE__ */ new Map([["vitmatte", ["VitMatteForImageMatting", VitMatteForImageMatting]]]);
27720
+ const MODEL_FOR_TIME_SERIES_PREDICTION_MAPPING_NAMES = /* @__PURE__ */ new Map([["patchtst", ["PatchTSTForPrediction", PatchTSTForPrediction]], ["patchtsmixer", ["PatchTSMixerForPrediction", PatchTSMixerForPrediction]]]);
27721
+ const MODEL_FOR_IMAGE_TO_IMAGE_MAPPING_NAMES = /* @__PURE__ */ new Map([["swin2sr", ["Swin2SRForImageSuperResolution", Swin2SRForImageSuperResolution]]]);
27722
+ const MODEL_FOR_DEPTH_ESTIMATION_MAPPING_NAMES = /* @__PURE__ */ new Map([
27071
27723
  ["dpt", ["DPTForDepthEstimation", DPTForDepthEstimation]],
27072
27724
  ["depth_anything", ["DepthAnythingForDepthEstimation", DepthAnythingForDepthEstimation]],
27073
27725
  ["glpn", ["GLPNForDepthEstimation", GLPNForDepthEstimation]],
@@ -27076,9 +27728,9 @@ ${u}`, c = n.createShaderModule({
27076
27728
  ["metric3d", ["Metric3DForDepthEstimation", Metric3DForDepthEstimation]],
27077
27729
  ["metric3dv2", ["Metric3Dv2ForDepthEstimation", Metric3Dv2ForDepthEstimation]]
27078
27730
  ]);
27079
- const MODEL_FOR_NORMAL_ESTIMATION_MAPPING_NAMES = new Map([["sapiens", ["SapiensForNormalEstimation", SapiensForNormalEstimation]]]);
27080
- const MODEL_FOR_POSE_ESTIMATION_MAPPING_NAMES = new Map([["vitpose", ["VitPoseForPoseEstimation", VitPoseForPoseEstimation]]]);
27081
- const MODEL_FOR_IMAGE_FEATURE_EXTRACTION_MAPPING_NAMES = new Map([
27731
+ const MODEL_FOR_NORMAL_ESTIMATION_MAPPING_NAMES = /* @__PURE__ */ new Map([["sapiens", ["SapiensForNormalEstimation", SapiensForNormalEstimation]]]);
27732
+ const MODEL_FOR_POSE_ESTIMATION_MAPPING_NAMES = /* @__PURE__ */ new Map([["vitpose", ["VitPoseForPoseEstimation", VitPoseForPoseEstimation]]]);
27733
+ const MODEL_FOR_IMAGE_FEATURE_EXTRACTION_MAPPING_NAMES = /* @__PURE__ */ new Map([
27082
27734
  ["clip", ["CLIPVisionModelWithProjection", CLIPVisionModelWithProjection]],
27083
27735
  ["siglip", ["SiglipVisionModel", SiglipVisionModel]],
27084
27736
  ["jina_clip", ["JinaCLIPVisionModel", JinaCLIPVisionModel]]
@@ -27207,7 +27859,7 @@ ${u}`, c = n.createShaderModule({
27207
27859
  MODEL_CLASS_TO_NAME_MAPPING.set(model, name);
27208
27860
  MODEL_NAME_TO_CLASS_MAPPING.set(name, model);
27209
27861
  }
27210
- const CUSTOM_ARCHITECTURES = new Map([
27862
+ const CUSTOM_ARCHITECTURES = /* @__PURE__ */ new Map([
27211
27863
  ["modnet", MODEL_FOR_IMAGE_SEGMENTATION_MAPPING_NAMES],
27212
27864
  ["birefnet", MODEL_FOR_IMAGE_SEGMENTATION_MAPPING_NAMES],
27213
27865
  ["isnet", MODEL_FOR_IMAGE_SEGMENTATION_MAPPING_NAMES],
@@ -27581,6 +28233,9 @@ ${u}`, c = n.createShaderModule({
27581
28233
  }
27582
28234
  }),
27583
28235
  "./src/models/audio_spectrogram_transformer/feature_extraction_audio_spectrogram_transformer.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
28236
+ /*!******************************************************************************************************!*\
28237
+ !*** ./src/models/audio_spectrogram_transformer/feature_extraction_audio_spectrogram_transformer.js ***!
28238
+ \******************************************************************************************************/
27584
28239
  __webpack_require__.r(__webpack_exports__);
27585
28240
  __webpack_require__.d(__webpack_exports__, { ASTFeatureExtractor: () => ASTFeatureExtractor });
27586
28241
  var _base_feature_extraction_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -27599,7 +28254,8 @@ ${u}`, c = n.createShaderModule({
27599
28254
  constructor(config) {
27600
28255
  super(config);
27601
28256
  const sampling_rate = this.config.sampling_rate;
27602
- this.mel_filters = (0, _utils_audio_js__WEBPACK_IMPORTED_MODULE_2__.mel_filter_bank)(257, this.config.num_mel_bins, 20, Math.floor(sampling_rate / 2), sampling_rate, null, "kaldi", true);
28257
+ const mel_filters = (0, _utils_audio_js__WEBPACK_IMPORTED_MODULE_2__.mel_filter_bank)(257, this.config.num_mel_bins, 20, Math.floor(sampling_rate / 2), sampling_rate, null, "kaldi", true);
28258
+ this.mel_filters = mel_filters;
27603
28259
  this.window = (0, _utils_audio_js__WEBPACK_IMPORTED_MODULE_2__.window_function)(400, "hann", { periodic: false });
27604
28260
  this.mean = this.config.mean;
27605
28261
  this.std = this.config.std;
@@ -27642,6 +28298,9 @@ ${u}`, c = n.createShaderModule({
27642
28298
  }
27643
28299
  }),
27644
28300
  "./src/models/auto/feature_extraction_auto.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
28301
+ /*!****************************************************!*\
28302
+ !*** ./src/models/auto/feature_extraction_auto.js ***!
28303
+ \****************************************************/
27645
28304
  __webpack_require__.r(__webpack_exports__);
27646
28305
  __webpack_require__.d(__webpack_exports__, { AutoFeatureExtractor: () => AutoFeatureExtractor });
27647
28306
  var _utils_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -27672,6 +28331,9 @@ ${u}`, c = n.createShaderModule({
27672
28331
  }
27673
28332
  }),
27674
28333
  "./src/models/auto/image_processing_auto.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
28334
+ /*!**************************************************!*\
28335
+ !*** ./src/models/auto/image_processing_auto.js ***!
28336
+ \**************************************************/
27675
28337
  __webpack_require__.r(__webpack_exports__);
27676
28338
  __webpack_require__.d(__webpack_exports__, { AutoImageProcessor: () => AutoImageProcessor });
27677
28339
  var _utils_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -27705,6 +28367,9 @@ ${u}`, c = n.createShaderModule({
27705
28367
  }
27706
28368
  }),
27707
28369
  "./src/models/auto/processing_auto.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
28370
+ /*!********************************************!*\
28371
+ !*** ./src/models/auto/processing_auto.js ***!
28372
+ \********************************************/
27708
28373
  __webpack_require__.r(__webpack_exports__);
27709
28374
  __webpack_require__.d(__webpack_exports__, { AutoProcessor: () => AutoProcessor });
27710
28375
  var _utils_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -27791,6 +28456,9 @@ ${u}`, c = n.createShaderModule({
27791
28456
  }
27792
28457
  }),
27793
28458
  "./src/models/beit/image_processing_beit.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
28459
+ /*!**************************************************!*\
28460
+ !*** ./src/models/beit/image_processing_beit.js ***!
28461
+ \**************************************************/
27794
28462
  __webpack_require__.r(__webpack_exports__);
27795
28463
  __webpack_require__.d(__webpack_exports__, { BeitFeatureExtractor: () => BeitFeatureExtractor });
27796
28464
  var _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -27800,6 +28468,9 @@ ${u}`, c = n.createShaderModule({
27800
28468
  class BeitFeatureExtractor extends _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__.ImageProcessor {}
27801
28469
  }),
27802
28470
  "./src/models/bit/image_processing_bit.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
28471
+ /*!************************************************!*\
28472
+ !*** ./src/models/bit/image_processing_bit.js ***!
28473
+ \************************************************/
27803
28474
  __webpack_require__.r(__webpack_exports__);
27804
28475
  __webpack_require__.d(__webpack_exports__, { BitImageProcessor: () => BitImageProcessor });
27805
28476
  var _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -27809,6 +28480,9 @@ ${u}`, c = n.createShaderModule({
27809
28480
  class BitImageProcessor extends _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__.ImageProcessor {}
27810
28481
  }),
27811
28482
  "./src/models/chinese_clip/image_processing_chinese_clip.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
28483
+ /*!******************************************************************!*\
28484
+ !*** ./src/models/chinese_clip/image_processing_chinese_clip.js ***!
28485
+ \******************************************************************/
27812
28486
  __webpack_require__.r(__webpack_exports__);
27813
28487
  __webpack_require__.d(__webpack_exports__, { ChineseCLIPFeatureExtractor: () => ChineseCLIPFeatureExtractor });
27814
28488
  var _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -27818,6 +28492,9 @@ ${u}`, c = n.createShaderModule({
27818
28492
  class ChineseCLIPFeatureExtractor extends _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__.ImageProcessor {}
27819
28493
  }),
27820
28494
  "./src/models/clap/feature_extraction_clap.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
28495
+ /*!****************************************************!*\
28496
+ !*** ./src/models/clap/feature_extraction_clap.js ***!
28497
+ \****************************************************/
27821
28498
  __webpack_require__.r(__webpack_exports__);
27822
28499
  __webpack_require__.d(__webpack_exports__, { ClapFeatureExtractor: () => ClapFeatureExtractor });
27823
28500
  var _base_feature_extraction_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -27864,12 +28541,13 @@ ${u}`, c = n.createShaderModule({
27864
28541
  /** @type {Tensor} */
27865
28542
  let input_mel;
27866
28543
  const diff = waveform.length - max_length;
27867
- if (diff > 0) if (truncation === "rand_trunc") {
27868
- const idx = Math.floor(Math.random() * (diff + 1));
27869
- waveform = waveform.subarray(idx, idx + max_length);
27870
- input_mel = await this._extract_fbank_features(waveform, this.mel_filters_slaney, this.config.nb_max_samples);
27871
- } else throw new Error(`Truncation strategy "${truncation}" not implemented`);
27872
- else {
28544
+ if (diff > 0) {
28545
+ if (truncation === "rand_trunc") {
28546
+ const idx = Math.floor(Math.random() * (diff + 1));
28547
+ waveform = waveform.subarray(idx, idx + max_length);
28548
+ input_mel = await this._extract_fbank_features(waveform, this.mel_filters_slaney, this.config.nb_max_samples);
28549
+ } else throw new Error(`Truncation strategy "${truncation}" not implemented`);
28550
+ } else {
27873
28551
  if (diff < 0) {
27874
28552
  let padded = new Float64Array(max_length);
27875
28553
  padded.set(waveform);
@@ -27919,6 +28597,9 @@ ${u}`, c = n.createShaderModule({
27919
28597
  }
27920
28598
  }),
27921
28599
  "./src/models/clip/image_processing_clip.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
28600
+ /*!**************************************************!*\
28601
+ !*** ./src/models/clip/image_processing_clip.js ***!
28602
+ \**************************************************/
27922
28603
  __webpack_require__.r(__webpack_exports__);
27923
28604
  __webpack_require__.d(__webpack_exports__, {
27924
28605
  CLIPFeatureExtractor: () => CLIPFeatureExtractor,
@@ -27932,6 +28613,9 @@ ${u}`, c = n.createShaderModule({
27932
28613
  class CLIPFeatureExtractor extends CLIPImageProcessor {}
27933
28614
  }),
27934
28615
  "./src/models/convnext/image_processing_convnext.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
28616
+ /*!**********************************************************!*\
28617
+ !*** ./src/models/convnext/image_processing_convnext.js ***!
28618
+ \**********************************************************/
27935
28619
  __webpack_require__.r(__webpack_exports__);
27936
28620
  __webpack_require__.d(__webpack_exports__, {
27937
28621
  ConvNextFeatureExtractor: () => ConvNextFeatureExtractor,
@@ -27964,6 +28648,9 @@ ${u}`, c = n.createShaderModule({
27964
28648
  class ConvNextFeatureExtractor extends ConvNextImageProcessor {}
27965
28649
  }),
27966
28650
  "./src/models/dac/feature_extraction_dac.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
28651
+ /*!**************************************************!*\
28652
+ !*** ./src/models/dac/feature_extraction_dac.js ***!
28653
+ \**************************************************/
27967
28654
  __webpack_require__.r(__webpack_exports__);
27968
28655
  __webpack_require__.d(__webpack_exports__, { DacFeatureExtractor: () => DacFeatureExtractor });
27969
28656
  var _encodec_feature_extraction_encodec_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -27973,6 +28660,9 @@ ${u}`, c = n.createShaderModule({
27973
28660
  class DacFeatureExtractor extends _encodec_feature_extraction_encodec_js__WEBPACK_IMPORTED_MODULE_0__.EncodecFeatureExtractor {}
27974
28661
  }),
27975
28662
  "./src/models/deit/image_processing_deit.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
28663
+ /*!**************************************************!*\
28664
+ !*** ./src/models/deit/image_processing_deit.js ***!
28665
+ \**************************************************/
27976
28666
  __webpack_require__.r(__webpack_exports__);
27977
28667
  __webpack_require__.d(__webpack_exports__, {
27978
28668
  DeiTFeatureExtractor: () => DeiTFeatureExtractor,
@@ -27986,6 +28676,9 @@ ${u}`, c = n.createShaderModule({
27986
28676
  class DeiTFeatureExtractor extends DeiTImageProcessor {}
27987
28677
  }),
27988
28678
  "./src/models/detr/image_processing_detr.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
28679
+ /*!**************************************************!*\
28680
+ !*** ./src/models/detr/image_processing_detr.js ***!
28681
+ \**************************************************/
27989
28682
  __webpack_require__.r(__webpack_exports__);
27990
28683
  __webpack_require__.d(__webpack_exports__, {
27991
28684
  DetrFeatureExtractor: () => DetrFeatureExtractor,
@@ -28040,6 +28733,9 @@ ${u}`, c = n.createShaderModule({
28040
28733
  class DetrFeatureExtractor extends DetrImageProcessor {}
28041
28734
  }),
28042
28735
  "./src/models/dinov3_vit/image_processing_dinov3_vit.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
28736
+ /*!**************************************************************!*\
28737
+ !*** ./src/models/dinov3_vit/image_processing_dinov3_vit.js ***!
28738
+ \**************************************************************/
28043
28739
  __webpack_require__.r(__webpack_exports__);
28044
28740
  __webpack_require__.d(__webpack_exports__, { DINOv3ViTImageProcessor: () => DINOv3ViTImageProcessor });
28045
28741
  var _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -28049,6 +28745,9 @@ ${u}`, c = n.createShaderModule({
28049
28745
  class DINOv3ViTImageProcessor extends _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__.ImageProcessor {}
28050
28746
  }),
28051
28747
  "./src/models/donut/image_processing_donut.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
28748
+ /*!****************************************************!*\
28749
+ !*** ./src/models/donut/image_processing_donut.js ***!
28750
+ \****************************************************/
28052
28751
  __webpack_require__.r(__webpack_exports__);
28053
28752
  __webpack_require__.d(__webpack_exports__, {
28054
28753
  DonutFeatureExtractor: () => DonutFeatureExtractor,
@@ -28076,6 +28775,9 @@ ${u}`, c = n.createShaderModule({
28076
28775
  class DonutFeatureExtractor extends DonutImageProcessor {}
28077
28776
  }),
28078
28777
  "./src/models/dpt/image_processing_dpt.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
28778
+ /*!************************************************!*\
28779
+ !*** ./src/models/dpt/image_processing_dpt.js ***!
28780
+ \************************************************/
28079
28781
  __webpack_require__.r(__webpack_exports__);
28080
28782
  __webpack_require__.d(__webpack_exports__, {
28081
28783
  DPTFeatureExtractor: () => DPTFeatureExtractor,
@@ -28089,6 +28791,9 @@ ${u}`, c = n.createShaderModule({
28089
28791
  class DPTFeatureExtractor extends DPTImageProcessor {}
28090
28792
  }),
28091
28793
  "./src/models/efficientnet/image_processing_efficientnet.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
28794
+ /*!******************************************************************!*\
28795
+ !*** ./src/models/efficientnet/image_processing_efficientnet.js ***!
28796
+ \******************************************************************/
28092
28797
  __webpack_require__.r(__webpack_exports__);
28093
28798
  __webpack_require__.d(__webpack_exports__, { EfficientNetImageProcessor: () => EfficientNetImageProcessor });
28094
28799
  var _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -28104,6 +28809,9 @@ ${u}`, c = n.createShaderModule({
28104
28809
  }
28105
28810
  }),
28106
28811
  "./src/models/encodec/feature_extraction_encodec.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
28812
+ /*!**********************************************************!*\
28813
+ !*** ./src/models/encodec/feature_extraction_encodec.js ***!
28814
+ \**********************************************************/
28107
28815
  __webpack_require__.r(__webpack_exports__);
28108
28816
  __webpack_require__.d(__webpack_exports__, { EncodecFeatureExtractor: () => EncodecFeatureExtractor });
28109
28817
  var _base_feature_extraction_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -28135,6 +28843,9 @@ ${u}`, c = n.createShaderModule({
28135
28843
  }
28136
28844
  }),
28137
28845
  "./src/models/feature_extractors.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
28846
+ /*!******************************************!*\
28847
+ !*** ./src/models/feature_extractors.js ***!
28848
+ \******************************************/
28138
28849
  __webpack_require__.r(__webpack_exports__);
28139
28850
  __webpack_require__.d(__webpack_exports__, {
28140
28851
  ASTFeatureExtractor: () => _audio_spectrogram_transformer_feature_extraction_audio_spectrogram_transformer_js__WEBPACK_IMPORTED_MODULE_0__.ASTFeatureExtractor,
@@ -28215,6 +28926,9 @@ ${u}`, c = n.createShaderModule({
28215
28926
  );
28216
28927
  }),
28217
28928
  "./src/models/florence2/processing_florence2.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
28929
+ /*!******************************************************!*\
28930
+ !*** ./src/models/florence2/processing_florence2.js ***!
28931
+ \******************************************************/
28218
28932
  __webpack_require__.r(__webpack_exports__);
28219
28933
  __webpack_require__.d(__webpack_exports__, { Florence2Processor: () => Florence2Processor });
28220
28934
  var _base_processing_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -28312,6 +29026,9 @@ ${u}`, c = n.createShaderModule({
28312
29026
  }
28313
29027
  }),
28314
29028
  "./src/models/gemma3n/feature_extraction_gemma3n.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
29029
+ /*!**********************************************************!*\
29030
+ !*** ./src/models/gemma3n/feature_extraction_gemma3n.js ***!
29031
+ \**********************************************************/
28315
29032
  __webpack_require__.r(__webpack_exports__);
28316
29033
  __webpack_require__.d(__webpack_exports__, { Gemma3nAudioFeatureExtractor: () => Gemma3nAudioFeatureExtractor });
28317
29034
  var _base_feature_extraction_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -28330,7 +29047,8 @@ ${u}`, c = n.createShaderModule({
28330
29047
  constructor(config) {
28331
29048
  super(config);
28332
29049
  const { fft_length, feature_size, min_frequency, max_frequency, sampling_rate, frame_length } = this.config;
28333
- this.mel_filters = (0, _utils_audio_js__WEBPACK_IMPORTED_MODULE_2__.mel_filter_bank)(Math.floor(1 + fft_length / 2), feature_size, min_frequency, max_frequency, sampling_rate, null, "htk", false);
29050
+ const mel_filters = (0, _utils_audio_js__WEBPACK_IMPORTED_MODULE_2__.mel_filter_bank)(Math.floor(1 + fft_length / 2), feature_size, min_frequency, max_frequency, sampling_rate, null, "htk", false);
29051
+ this.mel_filters = mel_filters;
28334
29052
  this.window = (0, _utils_audio_js__WEBPACK_IMPORTED_MODULE_2__.window_function)(frame_length, "hann");
28335
29053
  }
28336
29054
  /**
@@ -28384,6 +29102,9 @@ ${u}`, c = n.createShaderModule({
28384
29102
  }
28385
29103
  }),
28386
29104
  "./src/models/gemma3n/processing_gemma3n.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
29105
+ /*!**************************************************!*\
29106
+ !*** ./src/models/gemma3n/processing_gemma3n.js ***!
29107
+ \**************************************************/
28387
29108
  __webpack_require__.r(__webpack_exports__);
28388
29109
  __webpack_require__.d(__webpack_exports__, { Gemma3nProcessor: () => Gemma3nProcessor });
28389
29110
  var _base_processing_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -28424,11 +29145,13 @@ ${u}`, c = n.createShaderModule({
28424
29145
  this.audio_token_id = audio_token_id;
28425
29146
  this.boa_token = boa_token;
28426
29147
  this.audio_token = audio_token;
28427
- this.full_audio_sequence = `\n\n${boa_token}${audio_token.repeat(this.audio_seq_length)}${eoa_token}\n\n`;
29148
+ const audio_tokens_expanded = audio_token.repeat(this.audio_seq_length);
29149
+ this.full_audio_sequence = `\n\n${boa_token}${audio_tokens_expanded}${eoa_token}\n\n`;
28428
29150
  this.image_token_id = image_token_id;
28429
29151
  this.boi_token = boi_token;
28430
29152
  this.image_token = image_token;
28431
- this.full_image_sequence = `\n\n${boi_token}${image_token.repeat(this.image_seq_length)}${eoi_token}\n\n`;
29153
+ const image_tokens_expanded = image_token.repeat(this.image_seq_length);
29154
+ this.full_image_sequence = `\n\n${boi_token}${image_tokens_expanded}${eoi_token}\n\n`;
28432
29155
  }
28433
29156
  /**
28434
29157
  *
@@ -28458,6 +29181,9 @@ ${u}`, c = n.createShaderModule({
28458
29181
  }
28459
29182
  }),
28460
29183
  "./src/models/glpn/image_processing_glpn.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
29184
+ /*!**************************************************!*\
29185
+ !*** ./src/models/glpn/image_processing_glpn.js ***!
29186
+ \**************************************************/
28461
29187
  __webpack_require__.r(__webpack_exports__);
28462
29188
  __webpack_require__.d(__webpack_exports__, { GLPNFeatureExtractor: () => GLPNFeatureExtractor });
28463
29189
  var _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -28467,6 +29193,9 @@ ${u}`, c = n.createShaderModule({
28467
29193
  class GLPNFeatureExtractor extends _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__.ImageProcessor {}
28468
29194
  }),
28469
29195
  "./src/models/grounding_dino/image_processing_grounding_dino.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
29196
+ /*!**********************************************************************!*\
29197
+ !*** ./src/models/grounding_dino/image_processing_grounding_dino.js ***!
29198
+ \**********************************************************************/
28470
29199
  __webpack_require__.r(__webpack_exports__);
28471
29200
  __webpack_require__.d(__webpack_exports__, { GroundingDinoImageProcessor: () => GroundingDinoImageProcessor });
28472
29201
  var _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -28505,6 +29234,9 @@ ${u}`, c = n.createShaderModule({
28505
29234
  }
28506
29235
  }),
28507
29236
  "./src/models/grounding_dino/processing_grounding_dino.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
29237
+ /*!****************************************************************!*\
29238
+ !*** ./src/models/grounding_dino/processing_grounding_dino.js ***!
29239
+ \****************************************************************/
28508
29240
  __webpack_require__.r(__webpack_exports__);
28509
29241
  __webpack_require__.d(__webpack_exports__, { GroundingDinoProcessor: () => GroundingDinoProcessor });
28510
29242
  var _base_processing_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -28529,10 +29261,9 @@ ${u}`, c = n.createShaderModule({
28529
29261
  * @param {import('../../utils/tensor.js').Tensor} input_ids A tensor of token ids of shape `(sequence_length, )`.
28530
29262
  */
28531
29263
  function get_phrases_from_posmap(posmaps, input_ids) {
28532
- const left_idx = 0;
28533
29264
  const right_idx = posmaps.dims.at(-1) - 1;
28534
29265
  const posmaps_list = posmaps.tolist();
28535
- posmaps_list.fill(false, 0, left_idx + 1);
29266
+ posmaps_list.fill(false, 0, 1);
28536
29267
  posmaps_list.fill(false, right_idx);
28537
29268
  const input_ids_list = input_ids.tolist();
28538
29269
  return posmaps_list.map((val, idx) => val ? idx : null).filter((idx) => idx !== null).map((i) => input_ids_list[i]);
@@ -28593,6 +29324,9 @@ ${u}`, c = n.createShaderModule({
28593
29324
  }
28594
29325
  }),
28595
29326
  "./src/models/idefics3/image_processing_idefics3.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
29327
+ /*!**********************************************************!*\
29328
+ !*** ./src/models/idefics3/image_processing_idefics3.js ***!
29329
+ \**********************************************************/
28596
29330
  __webpack_require__.r(__webpack_exports__);
28597
29331
  __webpack_require__.d(__webpack_exports__, { Idefics3ImageProcessor: () => Idefics3ImageProcessor });
28598
29332
  var _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -28776,6 +29510,9 @@ ${u}`, c = n.createShaderModule({
28776
29510
  }
28777
29511
  }),
28778
29512
  "./src/models/idefics3/processing_idefics3.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
29513
+ /*!****************************************************!*\
29514
+ !*** ./src/models/idefics3/processing_idefics3.js ***!
29515
+ \****************************************************/
28779
29516
  __webpack_require__.r(__webpack_exports__);
28780
29517
  __webpack_require__.d(__webpack_exports__, { Idefics3Processor: () => Idefics3Processor });
28781
29518
  var _base_processing_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -28865,6 +29602,9 @@ ${u}`, c = n.createShaderModule({
28865
29602
  }
28866
29603
  }),
28867
29604
  "./src/models/image_processors.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
29605
+ /*!****************************************!*\
29606
+ !*** ./src/models/image_processors.js ***!
29607
+ \****************************************/
28868
29608
  __webpack_require__.r(__webpack_exports__);
28869
29609
  __webpack_require__.d(__webpack_exports__, {
28870
29610
  BeitFeatureExtractor: () => _beit_image_processing_beit_js__WEBPACK_IMPORTED_MODULE_0__.BeitFeatureExtractor,
@@ -29101,6 +29841,9 @@ ${u}`, c = n.createShaderModule({
29101
29841
  );
29102
29842
  }),
29103
29843
  "./src/models/janus/image_processing_janus.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
29844
+ /*!****************************************************!*\
29845
+ !*** ./src/models/janus/image_processing_janus.js ***!
29846
+ \****************************************************/
29104
29847
  __webpack_require__.r(__webpack_exports__);
29105
29848
  __webpack_require__.d(__webpack_exports__, { VLMImageProcessor: () => VLMImageProcessor });
29106
29849
  var _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -29129,6 +29872,9 @@ ${u}`, c = n.createShaderModule({
29129
29872
  }
29130
29873
  }),
29131
29874
  "./src/models/janus/processing_janus.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
29875
+ /*!**********************************************!*\
29876
+ !*** ./src/models/janus/processing_janus.js ***!
29877
+ \**********************************************/
29132
29878
  __webpack_require__.r(__webpack_exports__);
29133
29879
  __webpack_require__.d(__webpack_exports__, { VLChatProcessor: () => VLChatProcessor });
29134
29880
  var _base_processing_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -29236,6 +29982,9 @@ ${u}`, c = n.createShaderModule({
29236
29982
  }
29237
29983
  }),
29238
29984
  "./src/models/jina_clip/image_processing_jina_clip.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
29985
+ /*!************************************************************!*\
29986
+ !*** ./src/models/jina_clip/image_processing_jina_clip.js ***!
29987
+ \************************************************************/
29239
29988
  __webpack_require__.r(__webpack_exports__);
29240
29989
  __webpack_require__.d(__webpack_exports__, { JinaCLIPImageProcessor: () => JinaCLIPImageProcessor });
29241
29990
  var _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -29262,6 +30011,9 @@ ${u}`, c = n.createShaderModule({
29262
30011
  }
29263
30012
  }),
29264
30013
  "./src/models/jina_clip/processing_jina_clip.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
30014
+ /*!******************************************************!*\
30015
+ !*** ./src/models/jina_clip/processing_jina_clip.js ***!
30016
+ \******************************************************/
29265
30017
  __webpack_require__.r(__webpack_exports__);
29266
30018
  __webpack_require__.d(__webpack_exports__, { JinaCLIPProcessor: () => JinaCLIPProcessor });
29267
30019
  var _base_processing_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -29291,6 +30043,9 @@ ${u}`, c = n.createShaderModule({
29291
30043
  }
29292
30044
  }),
29293
30045
  "./src/models/llava/processing_llava.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
30046
+ /*!**********************************************!*\
30047
+ !*** ./src/models/llava/processing_llava.js ***!
30048
+ \**********************************************/
29294
30049
  __webpack_require__.r(__webpack_exports__);
29295
30050
  __webpack_require__.d(__webpack_exports__, { LlavaProcessor: () => LlavaProcessor });
29296
30051
  var _base_processing_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -29331,6 +30086,9 @@ ${u}`, c = n.createShaderModule({
29331
30086
  }
29332
30087
  }),
29333
30088
  "./src/models/llava_onevision/image_processing_llava_onevision.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
30089
+ /*!************************************************************************!*\
30090
+ !*** ./src/models/llava_onevision/image_processing_llava_onevision.js ***!
30091
+ \************************************************************************/
29334
30092
  __webpack_require__.r(__webpack_exports__);
29335
30093
  __webpack_require__.d(__webpack_exports__, { LlavaOnevisionImageProcessor: () => LlavaOnevisionImageProcessor });
29336
30094
  var _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -29340,6 +30098,9 @@ ${u}`, c = n.createShaderModule({
29340
30098
  class LlavaOnevisionImageProcessor extends _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__.ImageProcessor {}
29341
30099
  }),
29342
30100
  "./src/models/mask2former/image_processing_mask2former.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
30101
+ /*!****************************************************************!*\
30102
+ !*** ./src/models/mask2former/image_processing_mask2former.js ***!
30103
+ \****************************************************************/
29343
30104
  __webpack_require__.r(__webpack_exports__);
29344
30105
  __webpack_require__.d(__webpack_exports__, { Mask2FormerImageProcessor: () => Mask2FormerImageProcessor });
29345
30106
  var _maskformer_image_processing_maskformer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -29349,6 +30110,9 @@ ${u}`, c = n.createShaderModule({
29349
30110
  class Mask2FormerImageProcessor extends _maskformer_image_processing_maskformer_js__WEBPACK_IMPORTED_MODULE_0__.MaskFormerImageProcessor {}
29350
30111
  }),
29351
30112
  "./src/models/maskformer/image_processing_maskformer.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
30113
+ /*!**************************************************************!*\
30114
+ !*** ./src/models/maskformer/image_processing_maskformer.js ***!
30115
+ \**************************************************************/
29352
30116
  __webpack_require__.r(__webpack_exports__);
29353
30117
  __webpack_require__.d(__webpack_exports__, {
29354
30118
  MaskFormerFeatureExtractor: () => MaskFormerFeatureExtractor,
@@ -29371,6 +30135,9 @@ ${u}`, c = n.createShaderModule({
29371
30135
  class MaskFormerFeatureExtractor extends MaskFormerImageProcessor {}
29372
30136
  }),
29373
30137
  "./src/models/mgp_str/processing_mgp_str.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
30138
+ /*!**************************************************!*\
30139
+ !*** ./src/models/mgp_str/processing_mgp_str.js ***!
30140
+ \**************************************************/
29374
30141
  __webpack_require__.r(__webpack_exports__);
29375
30142
  __webpack_require__.d(__webpack_exports__, { MgpstrProcessor: () => MgpstrProcessor });
29376
30143
  var _base_processing_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -29529,6 +30296,9 @@ ${u}`, c = n.createShaderModule({
29529
30296
  }
29530
30297
  }),
29531
30298
  "./src/models/mobilenet_v1/image_processing_mobilenet_v1.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
30299
+ /*!******************************************************************!*\
30300
+ !*** ./src/models/mobilenet_v1/image_processing_mobilenet_v1.js ***!
30301
+ \******************************************************************/
29532
30302
  __webpack_require__.r(__webpack_exports__);
29533
30303
  __webpack_require__.d(__webpack_exports__, {
29534
30304
  MobileNetV1FeatureExtractor: () => MobileNetV1FeatureExtractor,
@@ -29542,6 +30312,9 @@ ${u}`, c = n.createShaderModule({
29542
30312
  class MobileNetV1FeatureExtractor extends MobileNetV1ImageProcessor {}
29543
30313
  }),
29544
30314
  "./src/models/mobilenet_v2/image_processing_mobilenet_v2.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
30315
+ /*!******************************************************************!*\
30316
+ !*** ./src/models/mobilenet_v2/image_processing_mobilenet_v2.js ***!
30317
+ \******************************************************************/
29545
30318
  __webpack_require__.r(__webpack_exports__);
29546
30319
  __webpack_require__.d(__webpack_exports__, {
29547
30320
  MobileNetV2FeatureExtractor: () => MobileNetV2FeatureExtractor,
@@ -29555,6 +30328,9 @@ ${u}`, c = n.createShaderModule({
29555
30328
  class MobileNetV2FeatureExtractor extends MobileNetV2ImageProcessor {}
29556
30329
  }),
29557
30330
  "./src/models/mobilenet_v3/image_processing_mobilenet_v3.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
30331
+ /*!******************************************************************!*\
30332
+ !*** ./src/models/mobilenet_v3/image_processing_mobilenet_v3.js ***!
30333
+ \******************************************************************/
29558
30334
  __webpack_require__.r(__webpack_exports__);
29559
30335
  __webpack_require__.d(__webpack_exports__, {
29560
30336
  MobileNetV3FeatureExtractor: () => MobileNetV3FeatureExtractor,
@@ -29568,6 +30344,9 @@ ${u}`, c = n.createShaderModule({
29568
30344
  class MobileNetV3FeatureExtractor extends MobileNetV3ImageProcessor {}
29569
30345
  }),
29570
30346
  "./src/models/mobilenet_v4/image_processing_mobilenet_v4.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
30347
+ /*!******************************************************************!*\
30348
+ !*** ./src/models/mobilenet_v4/image_processing_mobilenet_v4.js ***!
30349
+ \******************************************************************/
29571
30350
  __webpack_require__.r(__webpack_exports__);
29572
30351
  __webpack_require__.d(__webpack_exports__, {
29573
30352
  MobileNetV4FeatureExtractor: () => MobileNetV4FeatureExtractor,
@@ -29581,6 +30360,9 @@ ${u}`, c = n.createShaderModule({
29581
30360
  class MobileNetV4FeatureExtractor extends MobileNetV4ImageProcessor {}
29582
30361
  }),
29583
30362
  "./src/models/mobilevit/image_processing_mobilevit.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
30363
+ /*!************************************************************!*\
30364
+ !*** ./src/models/mobilevit/image_processing_mobilevit.js ***!
30365
+ \************************************************************/
29584
30366
  __webpack_require__.r(__webpack_exports__);
29585
30367
  __webpack_require__.d(__webpack_exports__, {
29586
30368
  MobileViTFeatureExtractor: () => MobileViTFeatureExtractor,
@@ -29594,6 +30376,9 @@ ${u}`, c = n.createShaderModule({
29594
30376
  class MobileViTFeatureExtractor extends MobileViTImageProcessor {}
29595
30377
  }),
29596
30378
  "./src/models/moonshine/feature_extraction_moonshine.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
30379
+ /*!**************************************************************!*\
30380
+ !*** ./src/models/moonshine/feature_extraction_moonshine.js ***!
30381
+ \**************************************************************/
29597
30382
  __webpack_require__.r(__webpack_exports__);
29598
30383
  __webpack_require__.d(__webpack_exports__, { MoonshineFeatureExtractor: () => MoonshineFeatureExtractor });
29599
30384
  var _base_feature_extraction_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -29619,6 +30404,9 @@ ${u}`, c = n.createShaderModule({
29619
30404
  }
29620
30405
  }),
29621
30406
  "./src/models/moonshine/processing_moonshine.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
30407
+ /*!******************************************************!*\
30408
+ !*** ./src/models/moonshine/processing_moonshine.js ***!
30409
+ \******************************************************/
29622
30410
  __webpack_require__.r(__webpack_exports__);
29623
30411
  __webpack_require__.d(__webpack_exports__, { MoonshineProcessor: () => MoonshineProcessor });
29624
30412
  var _auto_feature_extraction_auto_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -29650,6 +30438,9 @@ ${u}`, c = n.createShaderModule({
29650
30438
  }
29651
30439
  }),
29652
30440
  "./src/models/nougat/image_processing_nougat.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
30441
+ /*!******************************************************!*\
30442
+ !*** ./src/models/nougat/image_processing_nougat.js ***!
30443
+ \******************************************************/
29653
30444
  __webpack_require__.r(__webpack_exports__);
29654
30445
  __webpack_require__.d(__webpack_exports__, { NougatImageProcessor: () => NougatImageProcessor });
29655
30446
  var _donut_image_processing_donut_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -29659,6 +30450,9 @@ ${u}`, c = n.createShaderModule({
29659
30450
  class NougatImageProcessor extends _donut_image_processing_donut_js__WEBPACK_IMPORTED_MODULE_0__.DonutImageProcessor {}
29660
30451
  }),
29661
30452
  "./src/models/owlv2/image_processing_owlv2.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
30453
+ /*!****************************************************!*\
30454
+ !*** ./src/models/owlv2/image_processing_owlv2.js ***!
30455
+ \****************************************************/
29662
30456
  __webpack_require__.r(__webpack_exports__);
29663
30457
  __webpack_require__.d(__webpack_exports__, { Owlv2ImageProcessor: () => Owlv2ImageProcessor });
29664
30458
  var _owlvit_image_processing_owlvit_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -29668,6 +30462,9 @@ ${u}`, c = n.createShaderModule({
29668
30462
  class Owlv2ImageProcessor extends _owlvit_image_processing_owlvit_js__WEBPACK_IMPORTED_MODULE_0__.OwlViTImageProcessor {}
29669
30463
  }),
29670
30464
  "./src/models/owlvit/image_processing_owlvit.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
30465
+ /*!******************************************************!*\
30466
+ !*** ./src/models/owlvit/image_processing_owlvit.js ***!
30467
+ \******************************************************/
29671
30468
  __webpack_require__.r(__webpack_exports__);
29672
30469
  __webpack_require__.d(__webpack_exports__, {
29673
30470
  OwlViTFeatureExtractor: () => OwlViTFeatureExtractor,
@@ -29686,6 +30483,9 @@ ${u}`, c = n.createShaderModule({
29686
30483
  class OwlViTFeatureExtractor extends OwlViTImageProcessor {}
29687
30484
  }),
29688
30485
  "./src/models/owlvit/processing_owlvit.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
30486
+ /*!************************************************!*\
30487
+ !*** ./src/models/owlvit/processing_owlvit.js ***!
30488
+ \************************************************/
29689
30489
  __webpack_require__.r(__webpack_exports__);
29690
30490
  __webpack_require__.d(__webpack_exports__, { OwlViTProcessor: () => OwlViTProcessor });
29691
30491
  var _base_processing_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -29706,6 +30506,9 @@ ${u}`, c = n.createShaderModule({
29706
30506
  }
29707
30507
  }),
29708
30508
  "./src/models/paligemma/processing_paligemma.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
30509
+ /*!******************************************************!*\
30510
+ !*** ./src/models/paligemma/processing_paligemma.js ***!
30511
+ \******************************************************/
29709
30512
  __webpack_require__.r(__webpack_exports__);
29710
30513
  __webpack_require__.d(__webpack_exports__, { PaliGemmaProcessor: () => PaliGemmaProcessor });
29711
30514
  var _base_processing_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -29760,6 +30563,9 @@ ${u}`, c = n.createShaderModule({
29760
30563
  }
29761
30564
  }),
29762
30565
  "./src/models/parakeet/feature_extraction_parakeet.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
30566
+ /*!************************************************************!*\
30567
+ !*** ./src/models/parakeet/feature_extraction_parakeet.js ***!
30568
+ \************************************************************/
29763
30569
  __webpack_require__.r(__webpack_exports__);
29764
30570
  __webpack_require__.d(__webpack_exports__, { ParakeetFeatureExtractor: () => ParakeetFeatureExtractor });
29765
30571
  var _base_feature_extraction_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -29847,6 +30653,9 @@ ${u}`, c = n.createShaderModule({
29847
30653
  }
29848
30654
  }),
29849
30655
  "./src/models/phi3_v/image_processing_phi3_v.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
30656
+ /*!******************************************************!*\
30657
+ !*** ./src/models/phi3_v/image_processing_phi3_v.js ***!
30658
+ \******************************************************/
29850
30659
  __webpack_require__.r(__webpack_exports__);
29851
30660
  __webpack_require__.d(__webpack_exports__, { Phi3VImageProcessor: () => Phi3VImageProcessor });
29852
30661
  var _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -29968,6 +30777,9 @@ ${u}`, c = n.createShaderModule({
29968
30777
  }
29969
30778
  }),
29970
30779
  "./src/models/phi3_v/processing_phi3_v.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
30780
+ /*!************************************************!*\
30781
+ !*** ./src/models/phi3_v/processing_phi3_v.js ***!
30782
+ \************************************************/
29971
30783
  __webpack_require__.r(__webpack_exports__);
29972
30784
  __webpack_require__.d(__webpack_exports__, { Phi3VProcessor: () => Phi3VProcessor });
29973
30785
  var _base_processing_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -30020,6 +30832,9 @@ ${u}`, c = n.createShaderModule({
30020
30832
  }
30021
30833
  }),
30022
30834
  "./src/models/pixtral/image_processing_pixtral.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
30835
+ /*!********************************************************!*\
30836
+ !*** ./src/models/pixtral/image_processing_pixtral.js ***!
30837
+ \********************************************************/
30023
30838
  __webpack_require__.r(__webpack_exports__);
30024
30839
  __webpack_require__.d(__webpack_exports__, { PixtralImageProcessor: () => PixtralImageProcessor });
30025
30840
  var _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -30049,6 +30864,9 @@ ${u}`, c = n.createShaderModule({
30049
30864
  }
30050
30865
  }),
30051
30866
  "./src/models/pixtral/processing_pixtral.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
30867
+ /*!**************************************************!*\
30868
+ !*** ./src/models/pixtral/processing_pixtral.js ***!
30869
+ \**************************************************/
30052
30870
  __webpack_require__.r(__webpack_exports__);
30053
30871
  __webpack_require__.d(__webpack_exports__, { PixtralProcessor: () => PixtralProcessor });
30054
30872
  var _base_processing_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -30097,6 +30915,9 @@ ${u}`, c = n.createShaderModule({
30097
30915
  }
30098
30916
  }),
30099
30917
  "./src/models/processors.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
30918
+ /*!**********************************!*\
30919
+ !*** ./src/models/processors.js ***!
30920
+ \**********************************/
30100
30921
  __webpack_require__.r(__webpack_exports__);
30101
30922
  __webpack_require__.d(__webpack_exports__, {
30102
30923
  Florence2Processor: () => _florence2_processing_florence2_js__WEBPACK_IMPORTED_MODULE_0__.Florence2Processor,
@@ -30223,6 +31044,9 @@ ${u}`, c = n.createShaderModule({
30223
31044
  );
30224
31045
  }),
30225
31046
  "./src/models/pvt/image_processing_pvt.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31047
+ /*!************************************************!*\
31048
+ !*** ./src/models/pvt/image_processing_pvt.js ***!
31049
+ \************************************************/
30226
31050
  __webpack_require__.r(__webpack_exports__);
30227
31051
  __webpack_require__.d(__webpack_exports__, { PvtImageProcessor: () => PvtImageProcessor });
30228
31052
  var _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -30232,6 +31056,9 @@ ${u}`, c = n.createShaderModule({
30232
31056
  class PvtImageProcessor extends _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__.ImageProcessor {}
30233
31057
  }),
30234
31058
  "./src/models/pyannote/feature_extraction_pyannote.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31059
+ /*!************************************************************!*\
31060
+ !*** ./src/models/pyannote/feature_extraction_pyannote.js ***!
31061
+ \************************************************************/
30235
31062
  __webpack_require__.r(__webpack_exports__);
30236
31063
  __webpack_require__.d(__webpack_exports__, { PyAnnoteFeatureExtractor: () => PyAnnoteFeatureExtractor });
30237
31064
  var _base_feature_extraction_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -30312,6 +31139,9 @@ ${u}`, c = n.createShaderModule({
30312
31139
  }
30313
31140
  }),
30314
31141
  "./src/models/pyannote/processing_pyannote.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31142
+ /*!****************************************************!*\
31143
+ !*** ./src/models/pyannote/processing_pyannote.js ***!
31144
+ \****************************************************/
30315
31145
  __webpack_require__.r(__webpack_exports__);
30316
31146
  __webpack_require__.d(__webpack_exports__, { PyAnnoteProcessor: () => PyAnnoteProcessor });
30317
31147
  var _base_processing_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -30342,6 +31172,9 @@ ${u}`, c = n.createShaderModule({
30342
31172
  }
30343
31173
  }),
30344
31174
  "./src/models/qwen2_vl/image_processing_qwen2_vl.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31175
+ /*!**********************************************************!*\
31176
+ !*** ./src/models/qwen2_vl/image_processing_qwen2_vl.js ***!
31177
+ \**********************************************************/
30345
31178
  __webpack_require__.r(__webpack_exports__);
30346
31179
  __webpack_require__.d(__webpack_exports__, { Qwen2VLImageProcessor: () => Qwen2VLImageProcessor });
30347
31180
  var _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -30376,6 +31209,9 @@ ${u}`, c = n.createShaderModule({
30376
31209
  }
30377
31210
  }),
30378
31211
  "./src/models/qwen2_vl/processing_qwen2_vl.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31212
+ /*!****************************************************!*\
31213
+ !*** ./src/models/qwen2_vl/processing_qwen2_vl.js ***!
31214
+ \****************************************************/
30379
31215
  __webpack_require__.r(__webpack_exports__);
30380
31216
  __webpack_require__.d(__webpack_exports__, { Qwen2VLProcessor: () => Qwen2VLProcessor });
30381
31217
  var _base_processing_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -30431,6 +31267,9 @@ ${u}`, c = n.createShaderModule({
30431
31267
  }
30432
31268
  }),
30433
31269
  "./src/models/rt_detr/image_processing_rt_detr.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31270
+ /*!********************************************************!*\
31271
+ !*** ./src/models/rt_detr/image_processing_rt_detr.js ***!
31272
+ \********************************************************/
30434
31273
  __webpack_require__.r(__webpack_exports__);
30435
31274
  __webpack_require__.d(__webpack_exports__, { RTDetrImageProcessor: () => RTDetrImageProcessor });
30436
31275
  var _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -30445,6 +31284,9 @@ ${u}`, c = n.createShaderModule({
30445
31284
  }
30446
31285
  }),
30447
31286
  "./src/models/sam/image_processing_sam.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31287
+ /*!************************************************!*\
31288
+ !*** ./src/models/sam/image_processing_sam.js ***!
31289
+ \************************************************/
30448
31290
  __webpack_require__.r(__webpack_exports__);
30449
31291
  __webpack_require__.d(__webpack_exports__, { SamImageProcessor: () => SamImageProcessor });
30450
31292
  var _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -30595,6 +31437,9 @@ ${u}`, c = n.createShaderModule({
30595
31437
  }
30596
31438
  }),
30597
31439
  "./src/models/sam/processing_sam.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31440
+ /*!******************************************!*\
31441
+ !*** ./src/models/sam/processing_sam.js ***!
31442
+ \******************************************/
30598
31443
  __webpack_require__.r(__webpack_exports__);
30599
31444
  __webpack_require__.d(__webpack_exports__, { SamProcessor: () => SamProcessor });
30600
31445
  var _base_processing_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -30619,6 +31464,9 @@ ${u}`, c = n.createShaderModule({
30619
31464
  }
30620
31465
  }),
30621
31466
  "./src/models/sam2/image_processing_sam2.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31467
+ /*!**************************************************!*\
31468
+ !*** ./src/models/sam2/image_processing_sam2.js ***!
31469
+ \**************************************************/
30622
31470
  __webpack_require__.r(__webpack_exports__);
30623
31471
  __webpack_require__.d(__webpack_exports__, { Sam2ImageProcessor: () => _sam_image_processing_sam_js__WEBPACK_IMPORTED_MODULE_0__.SamImageProcessor });
30624
31472
  var _sam_image_processing_sam_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -30627,6 +31475,9 @@ ${u}`, c = n.createShaderModule({
30627
31475
  );
30628
31476
  }),
30629
31477
  "./src/models/sam2/processing_sam2.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31478
+ /*!********************************************!*\
31479
+ !*** ./src/models/sam2/processing_sam2.js ***!
31480
+ \********************************************/
30630
31481
  __webpack_require__.r(__webpack_exports__);
30631
31482
  __webpack_require__.d(__webpack_exports__, {
30632
31483
  Sam2Processor: () => Sam2Processor,
@@ -30640,6 +31491,9 @@ ${u}`, c = n.createShaderModule({
30640
31491
  class Sam2VideoProcessor extends Sam2Processor {}
30641
31492
  }),
30642
31493
  "./src/models/sam3/image_processing_sam3.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31494
+ /*!**************************************************!*\
31495
+ !*** ./src/models/sam3/image_processing_sam3.js ***!
31496
+ \**************************************************/
30643
31497
  __webpack_require__.r(__webpack_exports__);
30644
31498
  __webpack_require__.d(__webpack_exports__, { Sam3ImageProcessor: () => _sam2_image_processing_sam2_js__WEBPACK_IMPORTED_MODULE_0__.Sam2ImageProcessor });
30645
31499
  var _sam2_image_processing_sam2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -30648,6 +31502,9 @@ ${u}`, c = n.createShaderModule({
30648
31502
  );
30649
31503
  }),
30650
31504
  "./src/models/seamless_m4t/feature_extraction_seamless_m4t.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31505
+ /*!********************************************************************!*\
31506
+ !*** ./src/models/seamless_m4t/feature_extraction_seamless_m4t.js ***!
31507
+ \********************************************************************/
30651
31508
  __webpack_require__.r(__webpack_exports__);
30652
31509
  __webpack_require__.d(__webpack_exports__, { SeamlessM4TFeatureExtractor: () => SeamlessM4TFeatureExtractor });
30653
31510
  var _base_feature_extraction_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -30666,7 +31523,8 @@ ${u}`, c = n.createShaderModule({
30666
31523
  constructor(config) {
30667
31524
  super(config);
30668
31525
  const sampling_rate = this.config.sampling_rate;
30669
- this.mel_filters = (0, _utils_audio_js__WEBPACK_IMPORTED_MODULE_2__.mel_filter_bank)(257, this.config.num_mel_bins, 20, Math.floor(sampling_rate / 2), sampling_rate, null, "kaldi", true);
31526
+ const mel_filters = (0, _utils_audio_js__WEBPACK_IMPORTED_MODULE_2__.mel_filter_bank)(257, this.config.num_mel_bins, 20, Math.floor(sampling_rate / 2), sampling_rate, null, "kaldi", true);
31527
+ this.mel_filters = mel_filters;
30670
31528
  this.window = (0, _utils_audio_js__WEBPACK_IMPORTED_MODULE_2__.window_function)(400, "povey", { periodic: false });
30671
31529
  }
30672
31530
  /**
@@ -30756,6 +31614,9 @@ ${u}`, c = n.createShaderModule({
30756
31614
  }
30757
31615
  }),
30758
31616
  "./src/models/segformer/image_processing_segformer.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31617
+ /*!************************************************************!*\
31618
+ !*** ./src/models/segformer/image_processing_segformer.js ***!
31619
+ \************************************************************/
30759
31620
  __webpack_require__.r(__webpack_exports__);
30760
31621
  __webpack_require__.d(__webpack_exports__, {
30761
31622
  SegformerFeatureExtractor: () => SegformerFeatureExtractor,
@@ -30774,6 +31635,9 @@ ${u}`, c = n.createShaderModule({
30774
31635
  class SegformerFeatureExtractor extends SegformerImageProcessor {}
30775
31636
  }),
30776
31637
  "./src/models/siglip/image_processing_siglip.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31638
+ /*!******************************************************!*\
31639
+ !*** ./src/models/siglip/image_processing_siglip.js ***!
31640
+ \******************************************************/
30777
31641
  __webpack_require__.r(__webpack_exports__);
30778
31642
  __webpack_require__.d(__webpack_exports__, { SiglipImageProcessor: () => SiglipImageProcessor });
30779
31643
  var _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -30783,6 +31647,9 @@ ${u}`, c = n.createShaderModule({
30783
31647
  class SiglipImageProcessor extends _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__.ImageProcessor {}
30784
31648
  }),
30785
31649
  "./src/models/smolvlm/image_processing_smolvlm.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31650
+ /*!********************************************************!*\
31651
+ !*** ./src/models/smolvlm/image_processing_smolvlm.js ***!
31652
+ \********************************************************/
30786
31653
  __webpack_require__.r(__webpack_exports__);
30787
31654
  __webpack_require__.d(__webpack_exports__, { SmolVLMImageProcessor: () => _idefics3_image_processing_idefics3_js__WEBPACK_IMPORTED_MODULE_0__.Idefics3ImageProcessor });
30788
31655
  var _idefics3_image_processing_idefics3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -30791,6 +31658,9 @@ ${u}`, c = n.createShaderModule({
30791
31658
  );
30792
31659
  }),
30793
31660
  "./src/models/smolvlm/processing_smolvlm.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31661
+ /*!**************************************************!*\
31662
+ !*** ./src/models/smolvlm/processing_smolvlm.js ***!
31663
+ \**************************************************/
30794
31664
  __webpack_require__.r(__webpack_exports__);
30795
31665
  __webpack_require__.d(__webpack_exports__, { SmolVLMProcessor: () => _idefics3_processing_idefics3_js__WEBPACK_IMPORTED_MODULE_0__.Idefics3Processor });
30796
31666
  var _idefics3_processing_idefics3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -30799,6 +31669,9 @@ ${u}`, c = n.createShaderModule({
30799
31669
  );
30800
31670
  }),
30801
31671
  "./src/models/snac/feature_extraction_snac.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31672
+ /*!****************************************************!*\
31673
+ !*** ./src/models/snac/feature_extraction_snac.js ***!
31674
+ \****************************************************/
30802
31675
  __webpack_require__.r(__webpack_exports__);
30803
31676
  __webpack_require__.d(__webpack_exports__, { SnacFeatureExtractor: () => SnacFeatureExtractor });
30804
31677
  var _dac_feature_extraction_dac_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -30808,6 +31681,9 @@ ${u}`, c = n.createShaderModule({
30808
31681
  class SnacFeatureExtractor extends _dac_feature_extraction_dac_js__WEBPACK_IMPORTED_MODULE_0__.DacFeatureExtractor {}
30809
31682
  }),
30810
31683
  "./src/models/speecht5/feature_extraction_speecht5.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31684
+ /*!************************************************************!*\
31685
+ !*** ./src/models/speecht5/feature_extraction_speecht5.js ***!
31686
+ \************************************************************/
30811
31687
  __webpack_require__.r(__webpack_exports__);
30812
31688
  __webpack_require__.d(__webpack_exports__, { SpeechT5FeatureExtractor: () => SpeechT5FeatureExtractor });
30813
31689
  var _base_feature_extraction_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -30817,6 +31693,9 @@ ${u}`, c = n.createShaderModule({
30817
31693
  class SpeechT5FeatureExtractor extends _base_feature_extraction_utils_js__WEBPACK_IMPORTED_MODULE_0__.FeatureExtractor {}
30818
31694
  }),
30819
31695
  "./src/models/speecht5/processing_speecht5.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31696
+ /*!****************************************************!*\
31697
+ !*** ./src/models/speecht5/processing_speecht5.js ***!
31698
+ \****************************************************/
30820
31699
  __webpack_require__.r(__webpack_exports__);
30821
31700
  __webpack_require__.d(__webpack_exports__, { SpeechT5Processor: () => SpeechT5Processor });
30822
31701
  var _base_processing_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -30845,6 +31724,9 @@ ${u}`, c = n.createShaderModule({
30845
31724
  }
30846
31725
  }),
30847
31726
  "./src/models/swin2sr/image_processing_swin2sr.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31727
+ /*!********************************************************!*\
31728
+ !*** ./src/models/swin2sr/image_processing_swin2sr.js ***!
31729
+ \********************************************************/
30848
31730
  __webpack_require__.r(__webpack_exports__);
30849
31731
  __webpack_require__.d(__webpack_exports__, { Swin2SRImageProcessor: () => Swin2SRImageProcessor });
30850
31732
  var _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -30867,6 +31749,9 @@ ${u}`, c = n.createShaderModule({
30867
31749
  }
30868
31750
  }),
30869
31751
  "./src/models/ultravox/processing_ultravox.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31752
+ /*!****************************************************!*\
31753
+ !*** ./src/models/ultravox/processing_ultravox.js ***!
31754
+ \****************************************************/
30870
31755
  __webpack_require__.r(__webpack_exports__);
30871
31756
  __webpack_require__.d(__webpack_exports__, { UltravoxProcessor: () => UltravoxProcessor });
30872
31757
  var _auto_feature_extraction_auto_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -30920,6 +31805,9 @@ ${u}`, c = n.createShaderModule({
30920
31805
  }
30921
31806
  }),
30922
31807
  "./src/models/vit/image_processing_vit.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31808
+ /*!************************************************!*\
31809
+ !*** ./src/models/vit/image_processing_vit.js ***!
31810
+ \************************************************/
30923
31811
  __webpack_require__.r(__webpack_exports__);
30924
31812
  __webpack_require__.d(__webpack_exports__, {
30925
31813
  ViTFeatureExtractor: () => ViTFeatureExtractor,
@@ -30933,6 +31821,9 @@ ${u}`, c = n.createShaderModule({
30933
31821
  class ViTFeatureExtractor extends ViTImageProcessor {}
30934
31822
  }),
30935
31823
  "./src/models/vitmatte/image_processing_vitmatte.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31824
+ /*!**********************************************************!*\
31825
+ !*** ./src/models/vitmatte/image_processing_vitmatte.js ***!
31826
+ \**********************************************************/
30936
31827
  __webpack_require__.r(__webpack_exports__);
30937
31828
  __webpack_require__.d(__webpack_exports__, { VitMatteImageProcessor: () => VitMatteImageProcessor });
30938
31829
  var _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -30969,6 +31860,9 @@ ${u}`, c = n.createShaderModule({
30969
31860
  }
30970
31861
  }),
30971
31862
  "./src/models/vitpose/image_processing_vitpose.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31863
+ /*!********************************************************!*\
31864
+ !*** ./src/models/vitpose/image_processing_vitpose.js ***!
31865
+ \********************************************************/
30972
31866
  __webpack_require__.r(__webpack_exports__);
30973
31867
  __webpack_require__.d(__webpack_exports__, { VitPoseImageProcessor: () => VitPoseImageProcessor });
30974
31868
  var _base_image_processors_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -31041,6 +31935,9 @@ ${u}`, c = n.createShaderModule({
31041
31935
  }
31042
31936
  }),
31043
31937
  "./src/models/voxtral/processing_voxtral.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31938
+ /*!**************************************************!*\
31939
+ !*** ./src/models/voxtral/processing_voxtral.js ***!
31940
+ \**************************************************/
31044
31941
  __webpack_require__.r(__webpack_exports__);
31045
31942
  __webpack_require__.d(__webpack_exports__, { VoxtralProcessor: () => VoxtralProcessor });
31046
31943
  var _auto_feature_extraction_auto_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -31118,6 +32015,9 @@ ${u}`, c = n.createShaderModule({
31118
32015
  }
31119
32016
  }),
31120
32017
  "./src/models/wav2vec2/feature_extraction_wav2vec2.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
32018
+ /*!************************************************************!*\
32019
+ !*** ./src/models/wav2vec2/feature_extraction_wav2vec2.js ***!
32020
+ \************************************************************/
31121
32021
  __webpack_require__.r(__webpack_exports__);
31122
32022
  __webpack_require__.d(__webpack_exports__, { Wav2Vec2FeatureExtractor: () => Wav2Vec2FeatureExtractor });
31123
32023
  var _base_feature_extraction_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -31157,6 +32057,9 @@ ${u}`, c = n.createShaderModule({
31157
32057
  }
31158
32058
  }),
31159
32059
  "./src/models/wav2vec2/processing_wav2vec2.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
32060
+ /*!****************************************************!*\
32061
+ !*** ./src/models/wav2vec2/processing_wav2vec2.js ***!
32062
+ \****************************************************/
31160
32063
  __webpack_require__.r(__webpack_exports__);
31161
32064
  __webpack_require__.d(__webpack_exports__, { Wav2Vec2Processor: () => Wav2Vec2Processor });
31162
32065
  var _tokenizers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -31185,6 +32088,9 @@ ${u}`, c = n.createShaderModule({
31185
32088
  }
31186
32089
  }),
31187
32090
  "./src/models/wav2vec2_with_lm/processing_wav2vec2_with_lm.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
32091
+ /*!********************************************************************!*\
32092
+ !*** ./src/models/wav2vec2_with_lm/processing_wav2vec2_with_lm.js ***!
32093
+ \********************************************************************/
31188
32094
  __webpack_require__.r(__webpack_exports__);
31189
32095
  __webpack_require__.d(__webpack_exports__, { Wav2Vec2ProcessorWithLM: () => Wav2Vec2ProcessorWithLM });
31190
32096
  var _tokenizers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -31213,6 +32119,9 @@ ${u}`, c = n.createShaderModule({
31213
32119
  }
31214
32120
  }),
31215
32121
  "./src/models/wespeaker/feature_extraction_wespeaker.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
32122
+ /*!**************************************************************!*\
32123
+ !*** ./src/models/wespeaker/feature_extraction_wespeaker.js ***!
32124
+ \**************************************************************/
31216
32125
  __webpack_require__.r(__webpack_exports__);
31217
32126
  __webpack_require__.d(__webpack_exports__, { WeSpeakerFeatureExtractor: () => WeSpeakerFeatureExtractor });
31218
32127
  var _base_feature_extraction_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -31231,7 +32140,8 @@ ${u}`, c = n.createShaderModule({
31231
32140
  constructor(config) {
31232
32141
  super(config);
31233
32142
  const sampling_rate = this.config.sampling_rate;
31234
- this.mel_filters = (0, _utils_audio_js__WEBPACK_IMPORTED_MODULE_2__.mel_filter_bank)(257, this.config.num_mel_bins, 20, Math.floor(sampling_rate / 2), sampling_rate, null, "kaldi", true);
32143
+ const mel_filters = (0, _utils_audio_js__WEBPACK_IMPORTED_MODULE_2__.mel_filter_bank)(257, this.config.num_mel_bins, 20, Math.floor(sampling_rate / 2), sampling_rate, null, "kaldi", true);
32144
+ this.mel_filters = mel_filters;
31235
32145
  this.window = (0, _utils_audio_js__WEBPACK_IMPORTED_MODULE_2__.window_function)(400, "hamming", { periodic: false });
31236
32146
  this.min_num_frames = this.config.min_num_frames;
31237
32147
  }
@@ -31281,6 +32191,9 @@ ${u}`, c = n.createShaderModule({
31281
32191
  }
31282
32192
  }),
31283
32193
  "./src/models/whisper/common_whisper.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
32194
+ /*!**********************************************!*\
32195
+ !*** ./src/models/whisper/common_whisper.js ***!
32196
+ \**********************************************/
31284
32197
  __webpack_require__.r(__webpack_exports__);
31285
32198
  __webpack_require__.d(__webpack_exports__, {
31286
32199
  WHISPER_LANGUAGE_MAPPING: () => WHISPER_LANGUAGE_MAPPING,
@@ -31422,6 +32335,9 @@ ${u}`, c = n.createShaderModule({
31422
32335
  }
31423
32336
  }),
31424
32337
  "./src/models/whisper/feature_extraction_whisper.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
32338
+ /*!**********************************************************!*\
32339
+ !*** ./src/models/whisper/feature_extraction_whisper.js ***!
32340
+ \**********************************************************/
31425
32341
  __webpack_require__.r(__webpack_exports__);
31426
32342
  __webpack_require__.d(__webpack_exports__, { WhisperFeatureExtractor: () => WhisperFeatureExtractor });
31427
32343
  var _base_feature_extraction_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -31484,6 +32400,9 @@ ${u}`, c = n.createShaderModule({
31484
32400
  }
31485
32401
  }),
31486
32402
  "./src/models/whisper/generation_whisper.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
32403
+ /*!**************************************************!*\
32404
+ !*** ./src/models/whisper/generation_whisper.js ***!
32405
+ \**************************************************/
31487
32406
  __webpack_require__.r(__webpack_exports__);
31488
32407
  __webpack_require__.d(__webpack_exports__, { WhisperGenerationConfig: () => WhisperGenerationConfig });
31489
32408
  var _generation_configuration_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -31566,6 +32485,9 @@ ${u}`, c = n.createShaderModule({
31566
32485
  */
31567
32486
  }),
31568
32487
  "./src/models/whisper/processing_whisper.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
32488
+ /*!**************************************************!*\
32489
+ !*** ./src/models/whisper/processing_whisper.js ***!
32490
+ \**************************************************/
31569
32491
  __webpack_require__.r(__webpack_exports__);
31570
32492
  __webpack_require__.d(__webpack_exports__, { WhisperProcessor: () => WhisperProcessor });
31571
32493
  var _auto_feature_extraction_auto_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -31597,6 +32519,9 @@ ${u}`, c = n.createShaderModule({
31597
32519
  }
31598
32520
  }),
31599
32521
  "./src/models/yolos/image_processing_yolos.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
32522
+ /*!****************************************************!*\
32523
+ !*** ./src/models/yolos/image_processing_yolos.js ***!
32524
+ \****************************************************/
31600
32525
  __webpack_require__.r(__webpack_exports__);
31601
32526
  __webpack_require__.d(__webpack_exports__, {
31602
32527
  YolosFeatureExtractor: () => YolosFeatureExtractor,
@@ -31615,6 +32540,9 @@ ${u}`, c = n.createShaderModule({
31615
32540
  class YolosFeatureExtractor extends YolosImageProcessor {}
31616
32541
  }),
31617
32542
  "./src/ops/registry.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
32543
+ /*!*****************************!*\
32544
+ !*** ./src/ops/registry.js ***!
32545
+ \*****************************/
31618
32546
  __webpack_require__.r(__webpack_exports__);
31619
32547
  __webpack_require__.d(__webpack_exports__, { TensorOpRegistry: () => TensorOpRegistry });
31620
32548
  var _backends_onnx_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
@@ -32627,6 +33555,9 @@ ${u}`, c = n.createShaderModule({
32627
33555
  }
32628
33556
  }),
32629
33557
  "./src/pipelines.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
33558
+ /*!**************************!*\
33559
+ !*** ./src/pipelines.js ***!
33560
+ \**************************/
32630
33561
  __webpack_require__.r(__webpack_exports__);
32631
33562
  __webpack_require__.d(__webpack_exports__, {
32632
33563
  AudioClassificationPipeline: () => AudioClassificationPipeline,
@@ -32909,7 +33840,7 @@ ${u}`, c = n.createShaderModule({
32909
33840
  if (top_k === 1) toReturn.push(...vals);
32910
33841
  else toReturn.push(vals);
32911
33842
  }
32912
- return Array.isArray(texts) || top_k === 1 ? toReturn : /** @type {TextClassificationOutput[]} */ toReturn[0];
33843
+ return Array.isArray(texts) || top_k === 1 ? toReturn : /** @type {TextClassificationOutput[]} */ toReturn[0];
32913
33844
  }
32914
33845
  }
32915
33846
  /**
@@ -34356,12 +35287,11 @@ ${u}`, c = n.createShaderModule({
34356
35287
  /** @type {ImageSegmentationPipelineOutput[]} */
34357
35288
  const annotation = [];
34358
35289
  if (!subtask) {
34359
- const epsilon = 1e-5;
34360
35290
  const result = output[outputNames[0]];
34361
35291
  for (let i = 0; i < imageSizes.length; ++i) {
34362
35292
  const size = imageSizes[i];
34363
35293
  const item = result[i];
34364
- if (item.data.some((x) => x < -epsilon || x > 1 + epsilon)) item.sigmoid_();
35294
+ if (item.data.some((x) => x < -1e-5 || x > 1.00001)) item.sigmoid_();
34365
35295
  const mask = await _utils_image_js__WEBPACK_IMPORTED_MODULE_9__.RawImage.fromTensor(item.mul_(255).to("uint8")).resize(size[1], size[0]);
34366
35296
  annotation.push({
34367
35297
  label: null,
@@ -35269,7 +36199,7 @@ ${u}`, c = n.createShaderModule({
35269
36199
  model_file_name,
35270
36200
  session_options
35271
36201
  };
35272
- const results = await loadItems(new Map([
36202
+ const results = await loadItems(/* @__PURE__ */ new Map([
35273
36203
  ["tokenizer", pipelineInfo.tokenizer],
35274
36204
  ["model", pipelineInfo.model],
35275
36205
  ["processor", pipelineInfo.processor]
@@ -35329,6 +36259,9 @@ ${u}`, c = n.createShaderModule({
35329
36259
  }
35330
36260
  }),
35331
36261
  "./src/tokenizers.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
36262
+ /*!***************************!*\
36263
+ !*** ./src/tokenizers.js ***!
36264
+ \***************************/
35332
36265
  __webpack_require__.r(__webpack_exports__);
35333
36266
  __webpack_require__.d(__webpack_exports__, {
35334
36267
  AlbertTokenizer: () => AlbertTokenizer,
@@ -35583,7 +36516,7 @@ ${u}`, c = n.createShaderModule({
35583
36516
  const PUNCTUATION_REGEX = "\\p{P}\\u0021-\\u002F\\u003A-\\u0040\\u005B-\\u0060\\u007B-\\u007E";
35584
36517
  const PUNCTUATION_ONLY_REGEX = new RegExp(`^[${PUNCTUATION_REGEX}]+$`, "gu");
35585
36518
  const BLOOM_SPLIT_CHARS = ".,!?…。,、।۔،";
35586
- const PROBLEMATIC_REGEX_MAP = new Map([
36519
+ const PROBLEMATIC_REGEX_MAP = /* @__PURE__ */ new Map([
35587
36520
  ["(?i:'s|'t|'re|'ve|'m|'ll|'d)", "(?:'([sS]|[tT]|[rR][eE]|[vV][eE]|[mM]|[lL][lL]|[dD]))"],
35588
36521
  ["(?i:[sdmt]|ll|ve|re)", "(?:[sS]|[dD]|[mM]|[tT]|[lL][lL]|[vV][eE]|[rR][eE])"],
35589
36522
  ["[^\\r\\n\\p{L}\\p{N}]?+", "[^\\r\\n\\p{L}\\p{N}]?"],
@@ -35657,10 +36590,13 @@ ${u}`, c = n.createShaderModule({
35657
36590
  case "Unigram": return new Unigram(config, ...args);
35658
36591
  case "BPE": return new BPE(config);
35659
36592
  default:
35660
- if (config.vocab) if (Array.isArray(config.vocab)) return new Unigram(config, ...args);
35661
- else if (Object.hasOwn(config, "continuing_subword_prefix") && Object.hasOwn(config, "unk_token")) if (Object.hasOwn(config, "merges")) return new BPE(config);
35662
- else return new WordPieceTokenizer(config);
35663
- else return new LegacyTokenizerModel(config, ...args);
36593
+ if (config.vocab) {
36594
+ if (Array.isArray(config.vocab)) return new Unigram(config, ...args);
36595
+ else if (Object.hasOwn(config, "continuing_subword_prefix") && Object.hasOwn(config, "unk_token")) {
36596
+ if (Object.hasOwn(config, "merges")) return new BPE(config);
36597
+ else return new WordPieceTokenizer(config);
36598
+ } else return new LegacyTokenizerModel(config, ...args);
36599
+ }
35664
36600
  throw new Error(`Unknown TokenizerModel type: ${config.type}`);
35665
36601
  }
35666
36602
  }
@@ -35920,8 +36856,9 @@ ${u}`, c = n.createShaderModule({
35920
36856
  this.unk_token = config.unk_token;
35921
36857
  this.vocab = new Array(this.tokens_to_ids.size);
35922
36858
  for (const [key, value] of this.tokens_to_ids) this.vocab[value] = key;
36859
+ const use_new_merge_format = Array.isArray(config.merges[0]);
35923
36860
  /** @type {[string, string][]} */
35924
- this.merges = Array.isArray(config.merges[0]) ? config.merges : config.merges.map((x) => x.split(" ", 2));
36861
+ this.merges = use_new_merge_format ? config.merges : config.merges.map((x) => x.split(" ", 2));
35925
36862
  this.bpe_ranks = new Map(this.merges.map((x, i) => [JSON.stringify(x), i]));
35926
36863
  this.end_of_word_suffix = config.end_of_word_suffix;
35927
36864
  this.continuing_subword_suffix = config.continuing_subword_suffix ?? null;
@@ -36936,8 +37873,10 @@ ${u}`, c = n.createShaderModule({
36936
37873
  /** @type {Decoder['decode_chain']} */
36937
37874
  decode_chain(tokens) {
36938
37875
  return tokens.map((token, i) => {
36939
- if (i !== 0) if (token.startsWith(this.config.prefix)) token = token.replace(this.config.prefix, "");
36940
- else token = " " + token;
37876
+ if (i !== 0) {
37877
+ if (token.startsWith(this.config.prefix)) token = token.replace(this.config.prefix, "");
37878
+ else token = " " + token;
37879
+ }
36941
37880
  if (this.cleanup) token = clean_up_tokenization(token);
36942
37881
  return token;
36943
37882
  });
@@ -37381,9 +38320,10 @@ ${u}`, c = n.createShaderModule({
37381
38320
  for (const key of keys) {
37382
38321
  const item = this.config[key];
37383
38322
  if (!item) continue;
37384
- if (typeof item === "object") if (item.__type === "AddedToken") return item.content;
37385
- else throw Error(`Unknown token: ${item}`);
37386
- else return item;
38323
+ if (typeof item === "object") {
38324
+ if (item.__type === "AddedToken") return item.content;
38325
+ else throw Error(`Unknown token: ${item}`);
38326
+ } else return item;
37387
38327
  }
37388
38328
  return null;
37389
38329
  }
@@ -37653,11 +38593,15 @@ ${u}`, c = n.createShaderModule({
37653
38593
  if (this.chat_template && typeof this.chat_template === "object") {
37654
38594
  const template_dict = this.chat_template;
37655
38595
  if (chat_template !== null && Object.hasOwn(template_dict, chat_template)) chat_template = template_dict[chat_template];
37656
- else if (chat_template === null) if (tools !== null && "tool_use" in template_dict) chat_template = template_dict["tool_use"];
37657
- else if ("default" in template_dict) chat_template = template_dict["default"];
37658
- else throw Error(`This model has multiple chat templates with no default specified! Please either pass a chat template or the name of the template you wish to use to the 'chat_template' argument. Available template names are ${Object.keys(template_dict).sort()}.`);
37659
- } else if (chat_template === null) if (this.chat_template) chat_template = this.chat_template;
37660
- else throw Error("Cannot use apply_chat_template() because tokenizer.chat_template is not set and no template argument was passed! For information about writing templates and setting the tokenizer.chat_template attribute, please see the documentation at https://huggingface.co/docs/transformers/main/en/chat_templating");
38596
+ else if (chat_template === null) {
38597
+ if (tools !== null && "tool_use" in template_dict) chat_template = template_dict["tool_use"];
38598
+ else if ("default" in template_dict) chat_template = template_dict["default"];
38599
+ else throw Error(`This model has multiple chat templates with no default specified! Please either pass a chat template or the name of the template you wish to use to the 'chat_template' argument. Available template names are ${Object.keys(template_dict).sort()}.`);
38600
+ }
38601
+ } else if (chat_template === null) {
38602
+ if (this.chat_template) chat_template = this.chat_template;
38603
+ else throw Error("Cannot use apply_chat_template() because tokenizer.chat_template is not set and no template argument was passed! For information about writing templates and setting the tokenizer.chat_template attribute, please see the documentation at https://huggingface.co/docs/transformers/main/en/chat_templating");
38604
+ }
37661
38605
  return chat_template;
37662
38606
  }
37663
38607
  /**
@@ -38485,6 +39429,9 @@ ${u}`, c = n.createShaderModule({
38485
39429
  }
38486
39430
  }),
38487
39431
  "./src/utils/audio.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
39432
+ /*!****************************!*\
39433
+ !*** ./src/utils/audio.js ***!
39434
+ \****************************/
38488
39435
  __webpack_require__.r(__webpack_exports__);
38489
39436
  __webpack_require__.d(__webpack_exports__, {
38490
39437
  RawAudio: () => RawAudio,
@@ -38558,7 +39505,7 @@ ${u}`, c = n.createShaderModule({
38558
39505
  * @returns {Float64Array} The generated window.
38559
39506
  */
38560
39507
  function generalized_cosine_window(M, a_0) {
38561
- if (M < 1) return new Float64Array();
39508
+ if (M < 1) return /* @__PURE__ */ new Float64Array();
38562
39509
  if (M === 1) return new Float64Array([1]);
38563
39510
  const a_1 = 1 - a_0;
38564
39511
  const factor = 2 * Math.PI / (M - 1);
@@ -38862,9 +39809,11 @@ ${u}`, c = n.createShaderModule({
38862
39809
  const num_frequency_bins = onesided ? Math.floor(fft_length / 2) + 1 : fft_length;
38863
39810
  let d1 = num_frames;
38864
39811
  let d1Max = num_frames;
38865
- if (max_num_frames !== null) if (max_num_frames > num_frames) {
38866
- if (do_pad) d1Max = max_num_frames;
38867
- } else d1Max = d1 = max_num_frames;
39812
+ if (max_num_frames !== null) {
39813
+ if (max_num_frames > num_frames) {
39814
+ if (do_pad) d1Max = max_num_frames;
39815
+ } else d1Max = d1 = max_num_frames;
39816
+ }
38868
39817
  const fft = new _maths_js__WEBPACK_IMPORTED_MODULE_1__.FFT(fft_length);
38869
39818
  const inputBuffer = new Float64Array(fft_length);
38870
39819
  const outputBuffer = new Float64Array(fft.outputBufferSize);
@@ -39030,6 +39979,9 @@ ${u}`, c = n.createShaderModule({
39030
39979
  }
39031
39980
  }),
39032
39981
  "./src/utils/constants.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
39982
+ /*!********************************!*\
39983
+ !*** ./src/utils/constants.js ***!
39984
+ \********************************/
39033
39985
  __webpack_require__.r(__webpack_exports__);
39034
39986
  __webpack_require__.d(__webpack_exports__, {
39035
39987
  CHAT_TEMPLATE_NAME: () => CHAT_TEMPLATE_NAME,
@@ -39049,6 +40001,9 @@ ${u}`, c = n.createShaderModule({
39049
40001
  const GENERATION_CONFIG_NAME = "generation_config.json";
39050
40002
  }),
39051
40003
  "./src/utils/core.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
40004
+ /*!***************************!*\
40005
+ !*** ./src/utils/core.js ***!
40006
+ \***************************/
39052
40007
  __webpack_require__.r(__webpack_exports__);
39053
40008
  __webpack_require__.d(__webpack_exports__, {
39054
40009
  calculateDimensions: () => calculateDimensions,
@@ -39281,6 +40236,9 @@ ${u}`, c = n.createShaderModule({
39281
40236
  }
39282
40237
  }),
39283
40238
  "./src/utils/data-structures.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
40239
+ /*!**************************************!*\
40240
+ !*** ./src/utils/data-structures.js ***!
40241
+ \**************************************/
39284
40242
  __webpack_require__.r(__webpack_exports__);
39285
40243
  __webpack_require__.d(__webpack_exports__, {
39286
40244
  CharTrie: () => CharTrie,
@@ -39774,6 +40732,9 @@ ${u}`, c = n.createShaderModule({
39774
40732
  }
39775
40733
  }),
39776
40734
  "./src/utils/devices.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
40735
+ /*!******************************!*\
40736
+ !*** ./src/utils/devices.js ***!
40737
+ \******************************/
39777
40738
  __webpack_require__.r(__webpack_exports__);
39778
40739
  __webpack_require__.d(__webpack_exports__, { DEVICE_TYPES: () => DEVICE_TYPES });
39779
40740
  /**
@@ -39797,6 +40758,9 @@ ${u}`, c = n.createShaderModule({
39797
40758
  */
39798
40759
  }),
39799
40760
  "./src/utils/dtypes.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
40761
+ /*!*****************************!*\
40762
+ !*** ./src/utils/dtypes.js ***!
40763
+ \*****************************/
39800
40764
  __webpack_require__.r(__webpack_exports__);
39801
40765
  __webpack_require__.d(__webpack_exports__, {
39802
40766
  DATA_TYPES: () => DATA_TYPES,
@@ -39819,11 +40783,13 @@ ${u}`, c = n.createShaderModule({
39819
40783
  /** @type {boolean} */
39820
40784
  let cachedResult;
39821
40785
  return async function() {
39822
- if (cachedResult === void 0) if (!_env_js__WEBPACK_IMPORTED_MODULE_0__.apis.IS_WEBGPU_AVAILABLE) cachedResult = false;
39823
- else try {
39824
- cachedResult = (await navigator.gpu.requestAdapter()).features.has("shader-f16");
39825
- } catch (e) {
39826
- cachedResult = false;
40786
+ if (cachedResult === void 0) {
40787
+ if (!_env_js__WEBPACK_IMPORTED_MODULE_0__.apis.IS_WEBGPU_AVAILABLE) cachedResult = false;
40788
+ else try {
40789
+ cachedResult = (await navigator.gpu.requestAdapter()).features.has("shader-f16");
40790
+ } catch (e) {
40791
+ cachedResult = false;
40792
+ }
39827
40793
  }
39828
40794
  return cachedResult;
39829
40795
  };
@@ -39854,6 +40820,9 @@ ${u}`, c = n.createShaderModule({
39854
40820
  });
39855
40821
  }),
39856
40822
  "./src/utils/generic.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
40823
+ /*!******************************!*\
40824
+ !*** ./src/utils/generic.js ***!
40825
+ \******************************/
39857
40826
  __webpack_require__.r(__webpack_exports__);
39858
40827
  __webpack_require__.d(__webpack_exports__, { Callable: () => Callable });
39859
40828
  /**
@@ -39891,6 +40860,9 @@ ${u}`, c = n.createShaderModule({
39891
40860
  };
39892
40861
  }),
39893
40862
  "./src/utils/hub.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
40863
+ /*!**************************!*\
40864
+ !*** ./src/utils/hub.js ***!
40865
+ \**************************/
39894
40866
  __webpack_require__.r(__webpack_exports__);
39895
40867
  __webpack_require__.d(__webpack_exports__, {
39896
40868
  MAX_EXTERNAL_DATA_CHUNKS: () => MAX_EXTERNAL_DATA_CHUNKS,
@@ -40151,7 +41123,8 @@ ${u}`, c = n.createShaderModule({
40151
41123
  * @returns {Promise<FileResponse | undefined>}
40152
41124
  */
40153
41125
  async match(request) {
40154
- let file = new FileResponse(node_path__WEBPACK_IMPORTED_MODULE_1__.join(this.path, request));
41126
+ let filePath = node_path__WEBPACK_IMPORTED_MODULE_1__.join(this.path, request);
41127
+ let file = new FileResponse(filePath);
40155
41128
  if (file.exists) return file;
40156
41129
  else return;
40157
41130
  }
@@ -40283,8 +41256,10 @@ ${u}`, c = n.createShaderModule({
40283
41256
  else if (!_env_js__WEBPACK_IMPORTED_MODULE_2__.env.allowRemoteModels) throw new Error(`\`env.allowRemoteModels=false\`, but attempted to load a remote file from: ${requestURL}.`);
40284
41257
  }
40285
41258
  if (response === void 0 || response.status === 404) {
40286
- if (options.local_files_only || !_env_js__WEBPACK_IMPORTED_MODULE_2__.env.allowRemoteModels) if (fatal) throw Error(`\`local_files_only=true\` or \`env.allowRemoteModels=false\` and file was not found locally at "${localPath}".`);
40287
- else return null;
41259
+ if (options.local_files_only || !_env_js__WEBPACK_IMPORTED_MODULE_2__.env.allowRemoteModels) {
41260
+ if (fatal) throw Error(`\`local_files_only=true\` or \`env.allowRemoteModels=false\` and file was not found locally at "${localPath}".`);
41261
+ else return null;
41262
+ }
40288
41263
  if (!validModelId) throw Error(`Local file missing at "${localPath}" and download aborted due to invalid model ID "${path_or_repo_id}".`);
40289
41264
  response = await getFile(remoteURL);
40290
41265
  if (response.status !== 200) return handleError(response.status, remoteURL, fatal);
@@ -40322,17 +41297,19 @@ ${u}`, c = n.createShaderModule({
40322
41297
  });
40323
41298
  result = buffer;
40324
41299
  }
40325
- if (toCacheResponse && cacheKey && await cache.match(cacheKey) === void 0) if (!result) {
40326
- const wrapped_progress = options.progress_callback ? (data) => (0, _core_js__WEBPACK_IMPORTED_MODULE_3__.dispatchCallback)(options.progress_callback, {
40327
- status: "progress",
40328
- name: path_or_repo_id,
40329
- file: filename,
40330
- ...data
40331
- }) : void 0;
40332
- await cache.put(cacheKey, response, wrapped_progress);
40333
- } else await cache.put(cacheKey, new Response(result, { headers: response.headers })).catch((err) => {
40334
- console.warn(`Unable to add response to browser cache: ${err}.`);
40335
- });
41300
+ if (toCacheResponse && cacheKey && await cache.match(cacheKey) === void 0) {
41301
+ if (!result) {
41302
+ const wrapped_progress = options.progress_callback ? (data) => (0, _core_js__WEBPACK_IMPORTED_MODULE_3__.dispatchCallback)(options.progress_callback, {
41303
+ status: "progress",
41304
+ name: path_or_repo_id,
41305
+ file: filename,
41306
+ ...data
41307
+ }) : void 0;
41308
+ await cache.put(cacheKey, response, wrapped_progress);
41309
+ } else await cache.put(cacheKey, new Response(result, { headers: response.headers })).catch((err) => {
41310
+ console.warn(`Unable to add response to browser cache: ${err}.`);
41311
+ });
41312
+ }
40336
41313
  (0, _core_js__WEBPACK_IMPORTED_MODULE_3__.dispatchCallback)(options.progress_callback, {
40337
41314
  status: "done",
40338
41315
  name: path_or_repo_id,
@@ -40431,6 +41408,9 @@ ${u}`, c = n.createShaderModule({
40431
41408
  }
40432
41409
  }),
40433
41410
  "./src/utils/image.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
41411
+ /*!****************************!*\
41412
+ !*** ./src/utils/image.js ***!
41413
+ \****************************/
40434
41414
  __webpack_require__.r(__webpack_exports__);
40435
41415
  __webpack_require__.d(__webpack_exports__, {
40436
41416
  RawImage: () => RawImage,
@@ -40494,7 +41474,7 @@ ${u}`, c = n.createShaderModule({
40494
41474
  /**
40495
41475
  * Mapping from file extensions to MIME types.
40496
41476
  */
40497
- const CONTENT_TYPE_MAP = new Map([
41477
+ const CONTENT_TYPE_MAP = /* @__PURE__ */ new Map([
40498
41478
  ["png", "image/png"],
40499
41479
  ["jpg", "image/jpeg"],
40500
41480
  ["jpeg", "image/jpeg"],
@@ -40982,6 +41962,9 @@ ${u}`, c = n.createShaderModule({
40982
41962
  const load_image = RawImage.read.bind(RawImage);
40983
41963
  }),
40984
41964
  "./src/utils/maths.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
41965
+ /*!****************************!*\
41966
+ !*** ./src/utils/maths.js ***!
41967
+ \****************************/
40985
41968
  __webpack_require__.r(__webpack_exports__);
40986
41969
  __webpack_require__.d(__webpack_exports__, {
40987
41970
  FFT: () => FFT,
@@ -41758,6 +42741,9 @@ ${u}`, c = n.createShaderModule({
41758
42741
  }
41759
42742
  }),
41760
42743
  "./src/utils/tensor.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
42744
+ /*!*****************************!*\
42745
+ !*** ./src/utils/tensor.js ***!
42746
+ \*****************************/
41761
42747
  __webpack_require__.r(__webpack_exports__);
41762
42748
  __webpack_require__.d(__webpack_exports__, {
41763
42749
  DataTypeMap: () => DataTypeMap,
@@ -42403,12 +43389,14 @@ ${u}`, c = n.createShaderModule({
42403
43389
  const is_source_bigint = ["int64", "uint64"].includes(this.type);
42404
43390
  const is_dest_bigint = ["int64", "uint64"].includes(type);
42405
43391
  if (is_source_bigint && !is_dest_bigint) map_fn = Number;
42406
- else if (!is_source_bigint && is_dest_bigint) if ([
42407
- "float16",
42408
- "float32",
42409
- "float64"
42410
- ].includes(this.type)) map_fn = (x) => BigInt(Math.floor(x));
42411
- else map_fn = BigInt;
43392
+ else if (!is_source_bigint && is_dest_bigint) {
43393
+ if ([
43394
+ "float16",
43395
+ "float32",
43396
+ "float64"
43397
+ ].includes(this.type)) map_fn = (x) => BigInt(Math.floor(x));
43398
+ else map_fn = BigInt;
43399
+ }
42412
43400
  return new Tensor(type, DataTypeMap[type].from(this.data, map_fn), this.dims);
42413
43401
  }
42414
43402
  }
@@ -42673,8 +43661,10 @@ ${u}`, c = n.createShaderModule({
42673
43661
  * @private
42674
43662
  */
42675
43663
  function safeIndex(index, size, dimension = null, boundsCheck = true) {
42676
- if (index < -size || index >= size) if (boundsCheck) throw new Error(`IndexError: index ${index} is out of bounds for dimension${dimension === null ? "" : " " + dimension} with size ${size}`);
42677
- else return index < -size ? 0 : size;
43664
+ if (index < -size || index >= size) {
43665
+ if (boundsCheck) throw new Error(`IndexError: index ${index} is out of bounds for dimension${dimension === null ? "" : " " + dimension} with size ${size}`);
43666
+ else return index < -size ? 0 : size;
43667
+ }
42678
43668
  if (index < 0) index = (index % size + size) % size;
42679
43669
  return index;
42680
43670
  }
@@ -42815,7 +43805,8 @@ ${u}`, c = n.createShaderModule({
42815
43805
  return stride;
42816
43806
  }
42817
43807
  function fullHelper(size, fill_value, dtype, cls) {
42818
- return new Tensor(dtype, new cls(size.reduce((a, b) => a * b, 1)).fill(fill_value), size);
43808
+ const numElements = size.reduce((a, b) => a * b, 1);
43809
+ return new Tensor(dtype, new cls(numElements).fill(fill_value), size);
42819
43810
  }
42820
43811
  /**
42821
43812
  * Creates a tensor of size size filled with fill_value. The tensor's dtype is inferred from fill_value.
@@ -42922,6 +43913,9 @@ ${u}`, c = n.createShaderModule({
42922
43913
  }
42923
43914
  }),
42924
43915
  "./src/utils/video.js": ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
43916
+ /*!****************************!*\
43917
+ !*** ./src/utils/video.js ***!
43918
+ \****************************/
42925
43919
  __webpack_require__.r(__webpack_exports__);
42926
43920
  __webpack_require__.d(__webpack_exports__, {
42927
43921
  RawVideo: () => RawVideo,
@@ -43015,7 +44009,8 @@ ${u}`, c = n.createShaderModule({
43015
44009
  });
43016
44010
  ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
43017
44011
  const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
43018
- const frame = new RawVideoFrame(new _image_js__WEBPACK_IMPORTED_MODULE_0__.RawImage(imageData.data, canvas.width, canvas.height, 4), t);
44012
+ const frameData = new _image_js__WEBPACK_IMPORTED_MODULE_0__.RawImage(imageData.data, canvas.width, canvas.height, 4);
44013
+ const frame = new RawVideoFrame(frameData, t);
43019
44014
  frames.push(frame);
43020
44015
  }
43021
44016
  video.remove();
@@ -43056,17 +44051,23 @@ ${u}`, c = n.createShaderModule({
43056
44051
  return ns;
43057
44052
  };
43058
44053
  })();
43059
- __webpack_require__.d = (exports, definition) => {
43060
- for (var key in definition) if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, {
43061
- enumerable: true,
43062
- get: definition[key]
43063
- });
43064
- };
43065
- __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);
43066
- __webpack_require__.r = (exports) => {
43067
- if (typeof Symbol !== "undefined" && Symbol.toStringTag) Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
43068
- Object.defineProperty(exports, "__esModule", { value: true });
43069
- };
44054
+ (() => {
44055
+ __webpack_require__.d = (exports, definition) => {
44056
+ for (var key in definition) if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, {
44057
+ enumerable: true,
44058
+ get: definition[key]
44059
+ });
44060
+ };
44061
+ })();
44062
+ (() => {
44063
+ __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);
44064
+ })();
44065
+ (() => {
44066
+ __webpack_require__.r = (exports) => {
44067
+ if (typeof Symbol !== "undefined" && Symbol.toStringTag) Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
44068
+ Object.defineProperty(exports, "__esModule", { value: true });
44069
+ };
44070
+ })();
43070
44071
  var __webpack_exports__ = {};
43071
44072
  (() => {
43072
44073
  /*!*****************************!*\
@@ -45007,4 +46008,4 @@ ${u}`, c = n.createShaderModule({
45007
46008
  //#endregion
45008
46009
  })();
45009
46010
 
45010
- //# sourceMappingURL=ml-worker-Cxga53IO.js.map
46011
+ //# sourceMappingURL=ml-worker-DZeNKhpK.js.map