@hackbuild/ai-views 0.1.0 → 0.1.1
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.
- package/README.md +228 -80
- package/dist/chat.d.ts +18 -2
- package/dist/chat.js +7 -1
- package/dist/elements.d.ts +6 -0
- package/dist/frame.d.ts +2 -0
- package/dist/jobs.d.ts +6 -1
- package/dist/jobs.js +4 -1
- package/dist/memory.d.ts +9 -0
- package/dist/memory.js +3 -0
- package/dist/mount-chat.d.ts +4 -1
- package/dist/mount-chat.js +2 -1
- package/dist/mount-frame.d.ts +13 -1
- package/dist/mount-frame.js +3 -1
- package/dist/mount-mask.d.ts +19 -1
- package/dist/mount-mask.js +5 -1
- package/dist/mount-model.d.ts +1 -0
- package/dist/mount-transcribe.d.ts +11 -2
- package/dist/mount-transcribe.js +2 -2
- package/dist/pick.d.ts +17 -0
- package/dist/pick.js +6 -0
- package/dist/rows.d.ts +6 -0
- package/dist/rows.js +2 -0
- package/dist/single/elements.iife.js +81 -50
- package/dist/single/elements.js +81 -50
- package/dist/single/index.iife.js +74 -45
- package/dist/single/index.js +74 -45
- package/dist/single/vue.iife.js +87 -45
- package/dist/single/vue.js +88 -45
- package/dist/transcribe.d.ts +14 -2
- package/dist/transcribe.js +2 -2
- package/dist/vue.d.ts +22 -0
- package/dist/vue.js +22 -0
- package/llms.md +1133 -0
- package/package.json +12 -11
|
@@ -37,7 +37,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
37
37
|
skipped
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
/** The onnxruntime-web ladder
|
|
40
|
+
/** The onnxruntime-web ladder to walk after one fetch: webgpu at basic, all, disabled, then wasm. */
|
|
41
41
|
function ortLadder() {
|
|
42
42
|
return [
|
|
43
43
|
{
|
|
@@ -71,6 +71,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
71
71
|
];
|
|
72
72
|
}
|
|
73
73
|
// packages/models/src/pins.ts
|
|
74
|
+
/** Pinned commits and file hashes per Hugging Face repo, written by tools/pin-weights.mjs. */
|
|
74
75
|
const PINS = {
|
|
75
76
|
"HuggingFaceTB/SmolLM2-135M-Instruct": {
|
|
76
77
|
"revision": "12fd25f77366fa6b3b4b768ec3050bf629380bac",
|
|
@@ -2919,6 +2920,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
2919
2920
|
* added to a registry, so every loader resolves `resolve/<commit>/` URLs,
|
|
2920
2921
|
* and pinnedSha gives the SHA-256 for such a URL.
|
|
2921
2922
|
*/
|
|
2923
|
+
/** The pin of a repo, or undefined when the repo is not pinned. */
|
|
2922
2924
|
function pinOf(repo) {
|
|
2923
2925
|
return repo && Object.hasOwn(PINS, repo) ? PINS[repo] : void 0;
|
|
2924
2926
|
}
|
|
@@ -2928,15 +2930,15 @@ var HackbuildAiViews = (function(exports) {
|
|
|
2928
2930
|
}
|
|
2929
2931
|
// packages/models/src/catalog.ts
|
|
2930
2932
|
/**
|
|
2931
|
-
* Starter records. Sizes marked "inferred" come from
|
|
2933
|
+
* Starter records. Sizes marked "inferred" come from published tables or
|
|
2932
2934
|
* from parameter count times bits and are not measured downloads. Chat rows
|
|
2933
2935
|
* marked "measured" sum the Content-Length of a HEAD request on every file
|
|
2934
2936
|
* the runtime loads, at the repo head of 2026-11-24, in MiB; no weight was
|
|
2935
2937
|
* downloaded. WebLLM rows count the Hugging Face repo and leave out the
|
|
2936
2938
|
* model library wasm, which comes from another host. Licences on the older rows are the ones on each model card as
|
|
2937
2939
|
* of 2026-11-22; on the chat rows added 2026-11-24 they are the model card
|
|
2938
|
-
* licence field the Hugging Face API returns, or
|
|
2939
|
-
*
|
|
2940
|
+
* licence field the Hugging Face API returns, or a recorded string, and
|
|
2941
|
+
* were not checked (owner decision). Recheck before shipping a
|
|
2940
2942
|
* product on them. Add your own records with registry.add().
|
|
2941
2943
|
*
|
|
2942
2944
|
* vramMB marked "computed" on the 14 WebLLM rows added 2026-11-25 is the
|
|
@@ -2945,13 +2947,13 @@ var HackbuildAiViews = (function(exports) {
|
|
|
2945
2947
|
* Rows with sizeSource "vendor" added 2026-11-25 sum the file sizes of the
|
|
2946
2948
|
* Hugging Face listing of the repo (no download), converted to MiB.
|
|
2947
2949
|
* Every row carries a speed word and a verdict of one to four words: what
|
|
2948
|
-
* a person picks by, in the owner's voice
|
|
2950
|
+
* a person picks by, in the owner's voice.
|
|
2949
2951
|
*
|
|
2950
2952
|
* Catalogue facts (params, quant, VRAM, censorship, tags, note) are copied
|
|
2951
|
-
* from the
|
|
2952
|
-
* design harvest; VRAM figures are the catalogue's own (vendor). Licence
|
|
2953
|
+
* from the owner's model labels and the WebLLM catalogue; VRAM figures are the catalogue's own (vendor). Licence
|
|
2953
2954
|
* strings are shown as recorded and were not verified for these facts.
|
|
2954
2955
|
*/
|
|
2956
|
+
/** The starter model records, each with its size source and weight licence. */
|
|
2955
2957
|
const CATALOG = [
|
|
2956
2958
|
{
|
|
2957
2959
|
id: "smollm2-135m-instruct",
|
|
@@ -3507,7 +3509,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
3507
3509
|
tier: "large",
|
|
3508
3510
|
family: "gemma",
|
|
3509
3511
|
tags: [],
|
|
3510
|
-
note: "an uncensored gemma 4 brain.
|
|
3512
|
+
note: "an uncensored gemma 4 brain. it warns with no webgpu.",
|
|
3511
3513
|
group: "uncensored",
|
|
3512
3514
|
badge: "best",
|
|
3513
3515
|
speed: "slow",
|
|
@@ -3541,7 +3543,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
3541
3543
|
tier: "medium",
|
|
3542
3544
|
family: "gemma",
|
|
3543
3545
|
tags: [],
|
|
3544
|
-
note: "lighter gemma 4.
|
|
3546
|
+
note: "lighter gemma 4. a chat default with webgpu.",
|
|
3545
3547
|
group: "uncensored",
|
|
3546
3548
|
badge: "lighter",
|
|
3547
3549
|
speed: "steady",
|
|
@@ -3717,7 +3719,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
3717
3719
|
tier: "small",
|
|
3718
3720
|
family: "qwen3.5",
|
|
3719
3721
|
tags: ["no gpu"],
|
|
3720
|
-
note: "
|
|
3722
|
+
note: "a chat default with no webgpu. thin for long chats.",
|
|
3721
3723
|
group: "uncensored",
|
|
3722
3724
|
badge: "faster",
|
|
3723
3725
|
speed: "fast",
|
|
@@ -3849,7 +3851,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
3849
3851
|
tier: "small",
|
|
3850
3852
|
family: "qwen3",
|
|
3851
3853
|
tags: ["think"],
|
|
3852
|
-
note: "a small qwen3 with a think trace.
|
|
3854
|
+
note: "a small qwen3 with a think trace. fits a deliberator role.",
|
|
3853
3855
|
group: "reasoning",
|
|
3854
3856
|
badge: "think, easier on memory",
|
|
3855
3857
|
speed: "fast",
|
|
@@ -4519,25 +4521,25 @@ var HackbuildAiViews = (function(exports) {
|
|
|
4519
4521
|
}
|
|
4520
4522
|
return spec.wasmFirst ? [...cpu, ...gpu] : [...gpu, ...cpu];
|
|
4521
4523
|
}
|
|
4522
|
-
/** onnxruntime-web rungs:
|
|
4524
|
+
/** onnxruntime-web rungs: webgpu then wasm, or wasm only when the graph is known to fail on webgpu. */
|
|
4523
4525
|
function ortRungs(opts = {}) {
|
|
4524
4526
|
const all = ortLadder();
|
|
4525
4527
|
return opts.webgpu === false ? all.filter((r) => r.device === "wasm") : all;
|
|
4526
4528
|
}
|
|
4527
|
-
/** Ladders by name,
|
|
4529
|
+
/** Ladders by name, one per model family. Each model record may copy one or write its own. */
|
|
4528
4530
|
const LADDERS = {
|
|
4529
|
-
/**
|
|
4531
|
+
/** Depth: fp16 then fp32 on webgpu, q8 then fp32 on wasm. */
|
|
4530
4532
|
depth: () => tjsLadder({
|
|
4531
4533
|
webgpu: ["fp16", "fp32"],
|
|
4532
4534
|
wasm: ["q8", "fp32"]
|
|
4533
4535
|
}),
|
|
4534
|
-
/**
|
|
4536
|
+
/** Perception models on cpu by default. */
|
|
4535
4537
|
perceptionCpu: () => tjsLadder({
|
|
4536
4538
|
webgpu: ["fp32"],
|
|
4537
4539
|
wasm: ["q8", "fp32"],
|
|
4538
4540
|
wasmFirst: true
|
|
4539
4541
|
}),
|
|
4540
|
-
/** whisper-large-v3-turbo (weights MIT)
|
|
4542
|
+
/** whisper-large-v3-turbo (weights MIT). */
|
|
4541
4543
|
whisperTurbo: () => tjsLadder({
|
|
4542
4544
|
webgpu: [{
|
|
4543
4545
|
encoder_model: "fp16",
|
|
@@ -4562,7 +4564,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
4562
4564
|
decoder_model_merged: "q8"
|
|
4563
4565
|
}]
|
|
4564
4566
|
}),
|
|
4565
|
-
/** SmolVLM (weights Apache-2.0): fp16 embed and vision, q4 decoder on webgpu; q8 vision on wasm
|
|
4567
|
+
/** SmolVLM (weights Apache-2.0): fp16 embed and vision, q4 decoder on webgpu; q8 vision on wasm. */
|
|
4566
4568
|
smolvlm: () => tjsLadder({
|
|
4567
4569
|
webgpu: [{
|
|
4568
4570
|
embed_tokens: "fp32",
|
|
@@ -4580,7 +4582,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
4580
4582
|
}],
|
|
4581
4583
|
freshHeapRetry: true
|
|
4582
4584
|
}),
|
|
4583
|
-
/**
|
|
4585
|
+
/** q4f16 on webgpu only. */
|
|
4584
4586
|
vlmGpuOnly: () => tjsLadder({ webgpu: ["q4f16", "q4"] }),
|
|
4585
4587
|
ort: ortRungs
|
|
4586
4588
|
};
|
|
@@ -4635,6 +4637,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
4635
4637
|
* Embedder records for the models hub. Sizes are inferred from the model
|
|
4636
4638
|
* repos' file lists; licences are the model cards' as of 2026-11-22.
|
|
4637
4639
|
*/
|
|
4640
|
+
/** Hub records for potion-base-8M, all-MiniLM-L6-v2 and bge-small-en-v1.5. */
|
|
4638
4641
|
const EMBED_RECORDS = [
|
|
4639
4642
|
{
|
|
4640
4643
|
id: "potion-base-8m",
|
|
@@ -4654,7 +4657,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
4654
4657
|
licence: "MIT",
|
|
4655
4658
|
commercial: true,
|
|
4656
4659
|
place: "main",
|
|
4657
|
-
notes: ["256 dims, no runtime, about 0.08 ms per sentence
|
|
4660
|
+
notes: ["256 dims, no runtime, about 0.08 ms per sentence (measured outside this repository)", "misses paraphrase"]
|
|
4658
4661
|
},
|
|
4659
4662
|
{
|
|
4660
4663
|
id: "minilm-l6",
|
|
@@ -4676,7 +4679,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
4676
4679
|
commercial: true,
|
|
4677
4680
|
place: "cpu-worker",
|
|
4678
4681
|
runtime: "@huggingface/transformers@4.3.2",
|
|
4679
|
-
notes: ["384 dims; webgpu with q8 garbled other models
|
|
4682
|
+
notes: ["384 dims; webgpu with q8 garbled other models, so q8 stays on wasm"]
|
|
4680
4683
|
},
|
|
4681
4684
|
{
|
|
4682
4685
|
id: "bge-small-en",
|
|
@@ -4722,6 +4725,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
4722
4725
|
height_latent: 64,
|
|
4723
4726
|
width_latent: 64
|
|
4724
4727
|
} };
|
|
4728
|
+
/** The image models {@link attachImagegen} registers: SD-Turbo and SD 1.5, each with its licence, size and form. */
|
|
4725
4729
|
const IMAGEGEN_RECORDS = [{
|
|
4726
4730
|
id: "sd-turbo",
|
|
4727
4731
|
label: "sd-turbo 512",
|
|
@@ -4746,9 +4750,9 @@ var HackbuildAiViews = (function(exports) {
|
|
|
4746
4750
|
place: "gpu",
|
|
4747
4751
|
runtime: "onnxruntime-web@1.27.0",
|
|
4748
4752
|
notes: [
|
|
4749
|
-
"webgpu only
|
|
4753
|
+
"webgpu only, no wasm floor",
|
|
4750
4754
|
"tokenizer: Xenova/clip-vit-base-patch16 through transformers.js (CLIP weights MIT)",
|
|
4751
|
-
"graph file paths inferred
|
|
4755
|
+
"graph file paths inferred, not checked against the repo"
|
|
4752
4756
|
],
|
|
4753
4757
|
form: {
|
|
4754
4758
|
steps: {
|
|
@@ -4788,7 +4792,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
4788
4792
|
place: "gpu",
|
|
4789
4793
|
runtime: "onnxruntime-web@1.27.0",
|
|
4790
4794
|
notes: [
|
|
4791
|
-
"about 2 GB
|
|
4795
|
+
"about 2 GB (vendor); the repo, its file paths and its input dtypes are inferred and not checked",
|
|
4792
4796
|
"runs the unet twice a step for guidance, so a step costs about twice an sd-turbo step (inferred)",
|
|
4793
4797
|
"tokenizer: Xenova/clip-vit-base-patch16 through transformers.js (CLIP weights MIT)"
|
|
4794
4798
|
],
|
|
@@ -4845,7 +4849,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
4845
4849
|
commercial: "unknown",
|
|
4846
4850
|
place: "gpu",
|
|
4847
4851
|
runtime: "onnxruntime-web@1.27.0",
|
|
4848
|
-
notes: ["two text encoders; the pipeline in this package runs one, so this record is listed and not run yet", "
|
|
4852
|
+
notes: ["two text encoders; the pipeline in this package runs one, so this record is listed and not run yet", "the highest quality of the three image models"],
|
|
4849
4853
|
form: {
|
|
4850
4854
|
steps: {
|
|
4851
4855
|
min: 1,
|
|
@@ -4889,6 +4893,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
4889
4893
|
function cueText(t) {
|
|
4890
4894
|
return t.replace(/-->/g, "->").replace(/\n\s*\n/g, "\n");
|
|
4891
4895
|
}
|
|
4896
|
+
/** SubRip text: numbered cues with comma millisecond stamps. */
|
|
4892
4897
|
function toSrt(segs) {
|
|
4893
4898
|
return segs.map((s, i) => `${i + 1}\n${timestamp(s.start, true)} --> ${timestamp(s.end, true)}\n${cueText(s.text)}\n`).join("\n");
|
|
4894
4899
|
}
|
|
@@ -4902,6 +4907,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
4902
4907
|
return t;
|
|
4903
4908
|
})();
|
|
4904
4909
|
// packages/speak/src/records.ts
|
|
4910
|
+
/** Model records for the voices this package drives, for pickers and the models registry. */
|
|
4905
4911
|
const SPEAK_RECORDS = [
|
|
4906
4912
|
{
|
|
4907
4913
|
id: "kokoro-82m",
|
|
@@ -4926,7 +4932,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
4926
4932
|
commercial: true,
|
|
4927
4933
|
place: "cpu-worker",
|
|
4928
4934
|
runtime: "kokoro-js@1.2.1",
|
|
4929
|
-
notes: ["webgpu with q8
|
|
4935
|
+
notes: ["webgpu with q8 has given garbled audio", "fp32 weights (about 330 MB, inferred) do not cache on file://, so webgpu needs http"]
|
|
4930
4936
|
},
|
|
4931
4937
|
{
|
|
4932
4938
|
id: "pocket-tts",
|
|
@@ -4994,8 +5000,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
4994
5000
|
// packages/transcribe/src/records.ts
|
|
4995
5001
|
/**
|
|
4996
5002
|
* Speech to text records for the models hub. Ladders and dtypes are
|
|
4997
|
-
*
|
|
4998
|
-
* notes, except rows marked vendor: those sum the quantized encoder and
|
|
5003
|
+
* one per model table; sizes are inferred from the model notes, except rows marked vendor: those sum the quantized encoder and
|
|
4999
5004
|
* decoder in the hub listing (no download, 2026-11-25), in MiB. Licences are the model cards' as of 2026-11-22.
|
|
5000
5005
|
*/
|
|
5001
5006
|
const asr = (r) => ({
|
|
@@ -5007,6 +5012,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
5007
5012
|
runtime: "@huggingface/transformers@4.3.2",
|
|
5008
5013
|
...r
|
|
5009
5014
|
});
|
|
5015
|
+
/** The Whisper and Moonshine model records for the models hub. */
|
|
5010
5016
|
const TRANSCRIBE_RECORDS = [
|
|
5011
5017
|
asr({
|
|
5012
5018
|
id: "whisper-large-v3-turbo",
|
|
@@ -5020,7 +5026,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
5020
5026
|
ladder: LADDERS.whisperTurbo(),
|
|
5021
5027
|
licence: "MIT",
|
|
5022
5028
|
place: "gpu",
|
|
5023
|
-
notes: ["best accuracy, multilingual, wants webgpu
|
|
5029
|
+
notes: ["best accuracy, multilingual, wants webgpu", "download per rung: 1.5 gb fp16 encoder and q4 decoder, 2.7 gb fp32 encoder, 1.0 gb q8 on wasm (vendor)"]
|
|
5024
5030
|
}),
|
|
5025
5031
|
asr({
|
|
5026
5032
|
id: "whisper-base",
|
|
@@ -5057,7 +5063,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
5057
5063
|
sizeMB: 90,
|
|
5058
5064
|
ladder: LADDERS.whisperSmall(false),
|
|
5059
5065
|
licence: "MIT (the OpenAI Whisper release; the Xenova ONNX card says apache-2.0)",
|
|
5060
|
-
notes: ["english only; the
|
|
5066
|
+
notes: ["english only; the default with no gpu"]
|
|
5061
5067
|
}),
|
|
5062
5068
|
asr({
|
|
5063
5069
|
id: "whisper-tiny.en",
|
|
@@ -5098,15 +5104,15 @@ var HackbuildAiViews = (function(exports) {
|
|
|
5098
5104
|
];
|
|
5099
5105
|
// packages/transcribe/src/export.ts
|
|
5100
5106
|
/**
|
|
5101
|
-
* Transcript exports
|
|
5107
|
+
* Transcript exports as txt, srt,
|
|
5102
5108
|
* vtt and json per file, and one store only zip with four files per
|
|
5103
5109
|
* source plus `manifest.json`. The manifest records the model and language
|
|
5104
|
-
* of each file's own run
|
|
5105
|
-
* export time, which could differ from the run). A speaker label, when a
|
|
5110
|
+
* of each file's own run. A speaker label, when a
|
|
5106
5111
|
* person set one, leads the line in txt and srt and is a voice tag in vtt.
|
|
5107
5112
|
*/
|
|
5108
5113
|
const said = (s) => s.speaker ? `${s.speaker}: ${s.text}` : s.text;
|
|
5109
5114
|
const r3 = (x) => +x.toFixed(3);
|
|
5115
|
+
/** Plain text with speaker labels leading their lines; a gap over 2 s starts a paragraph. */
|
|
5110
5116
|
function asTxt(segs) {
|
|
5111
5117
|
return toTxt(segs.map((s) => ({
|
|
5112
5118
|
start: s.start,
|
|
@@ -5114,6 +5120,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
5114
5120
|
text: said(s)
|
|
5115
5121
|
})));
|
|
5116
5122
|
}
|
|
5123
|
+
/** SubRip text with speaker labels leading their lines. */
|
|
5117
5124
|
function asSrt(segs) {
|
|
5118
5125
|
return toSrt(segs.map((s) => ({
|
|
5119
5126
|
start: s.start,
|
|
@@ -5122,6 +5129,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
5122
5129
|
})));
|
|
5123
5130
|
}
|
|
5124
5131
|
const esc$1 = (t) => t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
5132
|
+
/** WebVTT text with speakers as voice tags and cue text escaped. */
|
|
5125
5133
|
function asVtt(segs) {
|
|
5126
5134
|
const cue = (s) => {
|
|
5127
5135
|
const body = esc$1(s.text.replace(/-->/g, "->").replace(/\n\s*\n/g, "\n"));
|
|
@@ -5177,6 +5185,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
5177
5185
|
* only for a URL the app supplies; YOLOv10 n, s and m, FastSAM and the face
|
|
5178
5186
|
* swap set sit in PICKER_RECORDS.
|
|
5179
5187
|
*/
|
|
5188
|
+
/** The MediaPipe model storage base URL the MediaPipe records load from. */
|
|
5180
5189
|
const MP_MODELS = "https://storage.googleapis.com/mediapipe-models/";
|
|
5181
5190
|
/** MediaPipe ladder: GPU delegate (webgl), then the CPU delegate (wasm). */
|
|
5182
5191
|
const mediapipeLadder = () => [{ device: "webgl" }, { device: "wasm" }];
|
|
@@ -5197,6 +5206,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
5197
5206
|
place: "main",
|
|
5198
5207
|
runtime: "@mediapipe/tasks-vision@1.2.3"
|
|
5199
5208
|
});
|
|
5209
|
+
/** The vision records registered by `attachVision`: Depth Anything V2 small, MediaPipe detection, segmentation and landmarks, SlimSAM, SmolVLM 256M and LFM2-VL 450M. */
|
|
5200
5210
|
const VISION_RECORDS = [
|
|
5201
5211
|
{
|
|
5202
5212
|
id: "depth-anything-v2-small",
|
|
@@ -5214,7 +5224,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
5214
5224
|
commercial: true,
|
|
5215
5225
|
place: "cpu-worker",
|
|
5216
5226
|
runtime: "@huggingface/transformers@4.3.2",
|
|
5217
|
-
notes: ["
|
|
5227
|
+
notes: ["fp16 on webgpu, fp32 on the same device after a failure"]
|
|
5218
5228
|
},
|
|
5219
5229
|
mp("efficientdet-lite0", "detect", "object_detector/efficientdet_lite0/float16/1/efficientdet_lite0.tflite", 7, "mediapipe efficientdet lite0 (coco, 80 classes)", "light, 80 things"),
|
|
5220
5230
|
mp("selfie-segmenter", "segment.person", "image_segmenter/selfie_segmenter/float16/latest/selfie_segmenter.tflite", 1, "mediapipe selfie segmenter"),
|
|
@@ -5246,7 +5256,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
5246
5256
|
commercial: true,
|
|
5247
5257
|
place: "cpu-worker",
|
|
5248
5258
|
runtime: "@huggingface/transformers@4.3.2",
|
|
5249
|
-
notes: ["
|
|
5259
|
+
notes: ["one image embedding, then any number of point prompts"]
|
|
5250
5260
|
},
|
|
5251
5261
|
{
|
|
5252
5262
|
id: "smolvlm-256m-instruct",
|
|
@@ -5289,13 +5299,12 @@ var HackbuildAiViews = (function(exports) {
|
|
|
5289
5299
|
commercial: "unknown",
|
|
5290
5300
|
place: "gpu",
|
|
5291
5301
|
runtime: "@huggingface/transformers@4.3.2",
|
|
5292
|
-
notes: ["
|
|
5302
|
+
notes: ["q4f16 on webgpu only; the licence limits commercial use by revenue, read it before shipping"]
|
|
5293
5303
|
}
|
|
5294
5304
|
];
|
|
5295
5305
|
/**
|
|
5296
5306
|
* Records listed for pickers and never registered by default, so a hub's
|
|
5297
|
-
* routing by capability keeps its small defaults: larger alternates
|
|
5298
|
-
* earlier tools offered (smolvlm 500m and 2 video, gemma 4 e2b, two more
|
|
5307
|
+
* routing by capability keeps its small defaults: larger alternates (smolvlm 500m and 2 video, gemma 4 e2b, two more
|
|
5299
5308
|
* depth models), and records under licences that limit use (YOLOv10 and
|
|
5300
5309
|
* FastSAM are AGPL-3.0 upstream, Ultralytics; the face swap set is
|
|
5301
5310
|
* InsightFace, non-commercial). A hub that runs one adds it itself. Sizes
|
|
@@ -5329,8 +5338,9 @@ var HackbuildAiViews = (function(exports) {
|
|
|
5329
5338
|
licence: "AGPL-3.0 (Ultralytics weights, the model card's licence field)",
|
|
5330
5339
|
commercial: false,
|
|
5331
5340
|
place: "gpu",
|
|
5332
|
-
notes: ["output [1, 300, 6] after the model's own selection, so no nms pass (vendor, the yolov10 paper)", "
|
|
5341
|
+
notes: ["output [1, 300, 6] after the model's own selection, so no nms pass (vendor, the yolov10 paper)", "comes in nano, small and medium"]
|
|
5333
5342
|
});
|
|
5343
|
+
/** Records listed for pickers and never registered by default: larger alternates, and records under licences that limit use (YOLOv10, FastSAM, the face swap set). */
|
|
5334
5344
|
const PICKER_RECORDS = [
|
|
5335
5345
|
{
|
|
5336
5346
|
id: "smolvlm-500m-instruct",
|
|
@@ -5373,7 +5383,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
5373
5383
|
commercial: true,
|
|
5374
5384
|
place: "cpu-worker",
|
|
5375
5385
|
runtime: "@huggingface/transformers@4.3.2",
|
|
5376
|
-
notes: ["an
|
|
5386
|
+
notes: ["an option beside smolvlm 256m and 500m"]
|
|
5377
5387
|
},
|
|
5378
5388
|
{
|
|
5379
5389
|
id: "depth-anything-v2-base",
|
|
@@ -5430,7 +5440,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
5430
5440
|
commercial: true,
|
|
5431
5441
|
place: "gpu",
|
|
5432
5442
|
runtime: "@huggingface/transformers@4.3.2",
|
|
5433
|
-
notes: ["
|
|
5443
|
+
notes: ["about 3.3 GB (vendor)"]
|
|
5434
5444
|
},
|
|
5435
5445
|
yolo10("n", 9, "instant", "nano, quick"),
|
|
5436
5446
|
yolo10("s", 28, "fast", "small, sharper"),
|
|
@@ -5459,7 +5469,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
5459
5469
|
licence: "AGPL-3.0 upstream (Ultralytics FastSAM); the export's card says apache-2.0",
|
|
5460
5470
|
commercial: false,
|
|
5461
5471
|
place: "cpu-worker",
|
|
5462
|
-
notes: ["
|
|
5472
|
+
notes: ["finds every mask in one pass on onnxruntime-web (93 MB, vendor)", "segment everything: prototype masks, nms, then a pick by click"]
|
|
5463
5473
|
},
|
|
5464
5474
|
{
|
|
5465
5475
|
id: "scrfd-10g",
|
|
@@ -5532,7 +5542,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
5532
5542
|
licence: "InsightFace: non-commercial research only; the mirror's card says gpl-3.0",
|
|
5533
5543
|
commercial: false,
|
|
5534
5544
|
place: "gpu",
|
|
5535
|
-
notes: ["128 px faces;
|
|
5545
|
+
notes: ["128 px faces; paste the result back with a feathered mask"]
|
|
5536
5546
|
}
|
|
5537
5547
|
];
|
|
5538
5548
|
/** A face landmark fallback record over face-api.js tiny nets (code MIT; weights MIT from @vladmandic/face-api). */
|
|
@@ -5561,9 +5571,10 @@ var HackbuildAiViews = (function(exports) {
|
|
|
5561
5571
|
* records come from the packages that run them; a record listed in more
|
|
5562
5572
|
* than one place counts once, the running package's copy first.
|
|
5563
5573
|
*/
|
|
5564
|
-
/** face-api weights (MIT)
|
|
5574
|
+
/** Base URL of the face-api weights (MIT) on the package CDN. */
|
|
5565
5575
|
const FACE_API_BASE = "https://cdn.jsdelivr.net/npm/@vladmandic/face-api@1.7.12/model/";
|
|
5566
5576
|
const has = (...want) => (caps) => caps.some((c) => want.includes(c));
|
|
5577
|
+
/** The words and capability test of every job. */
|
|
5567
5578
|
const JOBS = {
|
|
5568
5579
|
chat: {
|
|
5569
5580
|
label: "brain",
|
|
@@ -5632,6 +5643,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
5632
5643
|
provides: has("landmarks.face", "landmarks.hand", "landmarks.pose", "landmarks.gesture")
|
|
5633
5644
|
}
|
|
5634
5645
|
};
|
|
5646
|
+
/** Every job name, in the order of `JOBS`. */
|
|
5635
5647
|
const JOB_NAMES = Object.keys(JOBS);
|
|
5636
5648
|
/** Every record the views know, the running package's copy of a duplicate first. */
|
|
5637
5649
|
const ALL_RECORDS = (() => {
|
|
@@ -5659,6 +5671,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
5659
5671
|
const def = JOBS[job];
|
|
5660
5672
|
return records.filter((r) => def.provides(r.provides));
|
|
5661
5673
|
}
|
|
5674
|
+
/** Whether a string is a job name. */
|
|
5662
5675
|
function isJob(s) {
|
|
5663
5676
|
return !!s && s in JOBS;
|
|
5664
5677
|
}
|
|
@@ -5729,9 +5742,11 @@ var HackbuildAiViews = (function(exports) {
|
|
|
5729
5742
|
"no download": "none",
|
|
5730
5743
|
own: "own"
|
|
5731
5744
|
};
|
|
5745
|
+
/** Whether a record has nothing to download: a built in, system or zero size model. */
|
|
5732
5746
|
function isNoDownload(r) {
|
|
5733
5747
|
return !!r.noDownload || r.sizeMB === 0 || r.provider === "prompt-api" || r.provider === "system";
|
|
5734
5748
|
}
|
|
5749
|
+
/** Whether a record's censorship is "uncensored" or "abliterated". */
|
|
5735
5750
|
function isUncensored(r) {
|
|
5736
5751
|
return r.censorship === "uncensored" || r.censorship === "abliterated";
|
|
5737
5752
|
}
|
|
@@ -5907,6 +5922,10 @@ var HackbuildAiViews = (function(exports) {
|
|
|
5907
5922
|
const files = s.files?.length ? s.files.map((f) => f.path) : s.file ? [s.file] : [];
|
|
5908
5923
|
return base ? files.map((f) => base + f) : [];
|
|
5909
5924
|
}
|
|
5925
|
+
/**
|
|
5926
|
+
* A loader that fetches a record's weight files through a weight store; records that load through
|
|
5927
|
+
* their runtime throw.
|
|
5928
|
+
*/
|
|
5910
5929
|
function weightsLoader(store) {
|
|
5911
5930
|
return async (rec, { signal, onProgress }) => {
|
|
5912
5931
|
if (rec.noDownload || rec.sizeMB === 0) {
|
|
@@ -6014,6 +6033,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
6014
6033
|
}).unfit === void 0);
|
|
6015
6034
|
return (fits.find((r) => r.group === "start here") ?? fits.find((r) => r.speed === "fast" || r.speed === "steady") ?? fits[0] ?? records[0])?.id ?? "";
|
|
6016
6035
|
}
|
|
6036
|
+
/** Creates a model picker for a job, with rows that say whether each model fits this machine. */
|
|
6017
6037
|
function useModelPick(job, o = {}) {
|
|
6018
6038
|
const def = JOBS[job];
|
|
6019
6039
|
let records = jobRecords(job, o.records ?? ALL_RECORDS);
|
|
@@ -6153,6 +6173,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
6153
6173
|
error: (id) => errors.get(id)
|
|
6154
6174
|
};
|
|
6155
6175
|
}
|
|
6176
|
+
/** Creates one picker per job and joins them as a rack with presets and load all. */
|
|
6156
6177
|
function useJobsPick(jobs, initialPresets = [], shared = {}) {
|
|
6157
6178
|
let presets = initialPresets;
|
|
6158
6179
|
const extra = /* @__PURE__ */ new Set();
|
|
@@ -6206,7 +6227,9 @@ var HackbuildAiViews = (function(exports) {
|
|
|
6206
6227
|
};
|
|
6207
6228
|
}
|
|
6208
6229
|
// packages/ai-views/src/chat.ts
|
|
6230
|
+
/** What a reply says when no chat engine is set. */
|
|
6209
6231
|
const NO_ENGINE = "this needs a model. pick one in the bar and load it.";
|
|
6232
|
+
/** Creates a chat thread that streams replies from an engine, with optional memory recall per message. */
|
|
6210
6233
|
function chatThread(o = {}) {
|
|
6211
6234
|
let engine = o.engine ?? null;
|
|
6212
6235
|
const now = o.now ?? (() => Date.now());
|
|
@@ -6359,6 +6382,10 @@ var HackbuildAiViews = (function(exports) {
|
|
|
6359
6382
|
}
|
|
6360
6383
|
};
|
|
6361
6384
|
}
|
|
6385
|
+
/**
|
|
6386
|
+
* Creates a list of chat threads, newest first, with one open; its `thread` always speaks for the
|
|
6387
|
+
* open chat.
|
|
6388
|
+
*/
|
|
6362
6389
|
function chatList(o = {}) {
|
|
6363
6390
|
const now = o.now ?? (() => Date.now());
|
|
6364
6391
|
let engine = o.engine ?? null;
|
|
@@ -6483,8 +6510,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
6483
6510
|
}
|
|
6484
6511
|
// packages/ai-views/src/transcribe.ts
|
|
6485
6512
|
/**
|
|
6486
|
-
* The state behind TranscribeDrop and TranscriptView,
|
|
6487
|
-
* transcription tool: drop files, they queue as channels, run one at a
|
|
6513
|
+
* The state behind TranscribeDrop and TranscriptView: drop files, they queue as channels, run one at a
|
|
6488
6514
|
* time, and each becomes a transcript with timestamps that a person can
|
|
6489
6515
|
* edit (with undo) and export as txt, srt, vtt or json. The engine is a
|
|
6490
6516
|
* function the page passes, so a stub runs the view with no weights.
|
|
@@ -6495,6 +6521,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
6495
6521
|
vtt: "text/vtt",
|
|
6496
6522
|
json: "application/json"
|
|
6497
6523
|
};
|
|
6524
|
+
/** Creates a transcribe queue that runs each file through `run`, one at a time. */
|
|
6498
6525
|
function transcribeQueue(o) {
|
|
6499
6526
|
let run = o.run;
|
|
6500
6527
|
let channels = [];
|
|
@@ -6758,6 +6785,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
6758
6785
|
// packages/ai-views/src/memory.ts
|
|
6759
6786
|
const n3 = (x) => Number.isFinite(x) ? x.toFixed(3) : "none";
|
|
6760
6787
|
const rank = (r) => r >= 0 ? `#${r + 1}` : "none";
|
|
6788
|
+
/** The rows of a recall trace as text, marking the hits handed to the model. */
|
|
6761
6789
|
function traceRows(r, maxText = 80) {
|
|
6762
6790
|
const used = new Set(r.hits.map((h) => h.item.id));
|
|
6763
6791
|
return r.trace.map((t, i) => ({
|
|
@@ -6772,6 +6800,7 @@ var HackbuildAiViews = (function(exports) {
|
|
|
6772
6800
|
used: used.has(t.id)
|
|
6773
6801
|
}));
|
|
6774
6802
|
}
|
|
6803
|
+
/** The HTML of a recall trace table, or an empty note before any recall. */
|
|
6775
6804
|
function inspectorHtml(rec) {
|
|
6776
6805
|
if (!rec) return `<p class="hb-lay-empty-note">no recall yet. ask something to see what memory finds.</p>`;
|
|
6777
6806
|
const rows = traceRows(rec);
|