@huggingface/tasks 0.22.3 → 0.22.5

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.
@@ -39,6 +39,15 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
39
39
  filter: true,
40
40
  countDownloads: `path:"adapter_config.json"`,
41
41
  },
42
+ alkove: {
43
+ prettyLabel: "Alkove",
44
+ repoName: "Alkove",
45
+ repoUrl: "https://github.com/alkove-ai/alkove",
46
+ docsUrl: "https://alkove.ai/docs/",
47
+ snippets: snippets.alkove,
48
+ filter: false,
49
+ countDownloads: `path_extension:"alk"`,
50
+ },
42
51
  allennlp: {
43
52
  prettyLabel: "AllenNLP",
44
53
  repoName: "AllenNLP",
@@ -76,7 +85,7 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
76
85
  repoName: "Asimov",
77
86
  repoUrl: "https://github.com/menloresearch/humanoid-policy-viewer",
78
87
  snippets: snippets.asimov,
79
- filter: false,
88
+ filter: true,
80
89
  countDownloads: `path:"env.yaml"`,
81
90
  },
82
91
  "aviation-ner": {
@@ -119,6 +128,15 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
119
128
  filter: false,
120
129
  countDownloads: `path:"llm_config.json"`,
121
130
  },
131
+ basedecision: {
132
+ prettyLabel: "BaseDecision",
133
+ repoName: "BaseDecision",
134
+ repoUrl: "https://github.com/hrudayaditya/BaseDecision",
135
+ docsUrl: "https://github.com/hrudayaditya/BaseDecision/blob/main/docs/API.md",
136
+ snippets: snippets.basedecision,
137
+ filter: false,
138
+ countDownloads: `path:"model.safetensors"`,
139
+ },
122
140
  bboxmaskpose: {
123
141
  prettyLabel: "BBoxMaskPose",
124
142
  repoName: "BBoxMaskPose",
@@ -258,6 +276,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
258
276
  repoUrl: "https://github.com/amazon-science/chronos-forecasting",
259
277
  snippets: snippets.chronos_forecasting,
260
278
  },
279
+ "circuit-tracer": {
280
+ prettyLabel: "circuit-tracer",
281
+ repoName: "circuit-tracer",
282
+ repoUrl: "https://github.com/decoderesearch/circuit-tracer",
283
+ filter: false,
284
+ countDownloads: `path_filename:"config" AND path_extension:"yaml"`,
285
+ },
261
286
  clara: {
262
287
  prettyLabel: "Clara",
263
288
  repoName: "Clara",
@@ -381,6 +406,15 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
381
406
  snippets: snippets.describe_anything,
382
407
  filter: false,
383
408
  },
409
+ dewml: {
410
+ prettyLabel: "Dew",
411
+ repoName: "Dew",
412
+ repoUrl: "https://github.com/AshishKumar4/dew",
413
+ docsUrl: "https://dewml.dev",
414
+ snippets: snippets.dew,
415
+ filter: false,
416
+ countDownloads: `path:"run.json"`,
417
+ },
384
418
  "dia-tts": {
385
419
  prettyLabel: "Dia",
386
420
  repoName: "Dia",
@@ -496,6 +530,14 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
496
530
  filter: false,
497
531
  countDownloads: `path_extension:"pt"`,
498
532
  },
533
+ "fahr-face": {
534
+ prettyLabel: "FAHR-Face",
535
+ repoName: "FAHR-Face",
536
+ repoUrl: "https://github.com/AIM-Harvard/FAHR-Face",
537
+ docsUrl: "https://huggingface.co/fridolin22/FAHR-Face",
538
+ filter: false,
539
+ countDownloads: `path:"fahr_face.pth" OR path:"fahr_faceage.pth"`,
540
+ },
499
541
  fairseq: {
500
542
  prettyLabel: "Fairseq",
501
543
  repoName: "fairseq",
@@ -564,6 +606,14 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
564
606
  filter: false,
565
607
  countDownloads: `path_extension:"tar"`,
566
608
  },
609
+ fse: {
610
+ prettyLabel: "fse",
611
+ repoName: "fse",
612
+ repoUrl: "https://github.com/oborchers/Fast_Sentence_Embeddings",
613
+ snippets: snippets.fse,
614
+ filter: false,
615
+ countDownloads: `path:"config.json" OR path_extension:"model"`,
616
+ },
567
617
  gaussianformer: {
568
618
  prettyLabel: "GaussianFormer",
569
619
  repoName: "GaussianFormer",
@@ -614,6 +664,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
614
664
  filter: false,
615
665
  countDownloads: `path:"flow/flow.pt"`,
616
666
  },
667
+ glyd: {
668
+ prettyLabel: "Glyd",
669
+ repoName: "Glyd",
670
+ repoUrl: "https://github.com/surya-koritala/Glyd",
671
+ docsUrl: "https://getglyd.com",
672
+ filter: false,
673
+ },
617
674
  "glyph-byt5": {
618
675
  prettyLabel: "Glyph-ByT5",
619
676
  repoName: "Glyph-ByT5",
@@ -834,6 +891,15 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
834
891
  repoUrl: "https://github.com/KittenML/KittenTTS",
835
892
  snippets: snippets.kittentts,
836
893
  },
894
+ konfai: {
895
+ prettyLabel: "KonfAI",
896
+ repoName: "KonfAI",
897
+ repoUrl: "https://github.com/fideus-labs/KonfAI",
898
+ docsUrl: "https://konfai.readthedocs.io/en/latest/usage/apps.html",
899
+ snippets: snippets.konfai,
900
+ filter: false,
901
+ countDownloads: `path_filename:"app" AND path_extension:"json"`,
902
+ },
837
903
  kronos: {
838
904
  prettyLabel: "KRONOS",
839
905
  repoName: "KRONOS",
@@ -905,6 +971,14 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
905
971
  filter: false,
906
972
  snippets: snippets.lerobot,
907
973
  },
974
+ libreyolo: {
975
+ prettyLabel: "LibreYOLO",
976
+ repoName: "LibreYOLO",
977
+ repoUrl: "https://github.com/LibreYOLO/libreyolo",
978
+ docsUrl: "https://www.libreyolo.com/docs",
979
+ filter: false,
980
+ countDownloads: `path_extension:"pt" OR path_extension:"pth" OR path_extension:"ckpt" OR path_extension:"onnx" OR path:"config.json"`,
981
+ },
908
982
  lightglue: {
909
983
  prettyLabel: "LightGlue",
910
984
  repoName: "LightGlue",
@@ -919,6 +993,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
919
993
  filter: false,
920
994
  countDownloads: `(path_filename:"params" AND path_extension:"yaml") OR (path_filename:"controllers" AND path_extension:"yaml") OR (path_filename:"norm_stats" AND path_extension:"json")`,
921
995
  },
996
+ "lingbot-map": {
997
+ prettyLabel: "LingBot-Map",
998
+ repoName: "lingbot-map",
999
+ repoUrl: "https://github.com/Robbyant/lingbot-map",
1000
+ filter: false,
1001
+ countDownloads: `path_extension:"pt"`,
1002
+ },
922
1003
  liveportrait: {
923
1004
  prettyLabel: "LivePortrait",
924
1005
  repoName: "LivePortrait",
@@ -932,6 +1013,14 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
932
1013
  repoUrl: "https://github.com/meituan-longcat/LongCat-Video",
933
1014
  filter: false,
934
1015
  },
1016
+ "linnet-tts": {
1017
+ prettyLabel: "LinnetTTS",
1018
+ repoName: "LinnetTTS",
1019
+ repoUrl: "https://github.com/VoxRT/LinnetTTS",
1020
+ snippets: snippets.linnet_tts,
1021
+ filter: false,
1022
+ countDownloads: `path:"linnet-en-35m.fp16.safetensors"`,
1023
+ },
935
1024
  "llama-cpp-python": {
936
1025
  prettyLabel: "llama-cpp-python",
937
1026
  repoName: "llama-cpp-python",
@@ -1039,12 +1128,28 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
1039
1128
  filter: true,
1040
1129
  countDownloads: `path_extension:"onnx"`,
1041
1130
  },
1131
+ "minicpm-ocr": {
1132
+ prettyLabel: "MiniCPM-OCR",
1133
+ repoName: "MiniCPM-OCR",
1134
+ repoUrl: "https://github.com/OpenBMB/MiniCPM-OCR",
1135
+ docsUrl: "https://github.com/OpenBMB/MiniCPM-OCR/blob/main/docs/minicpm_ocr_sdk_api_en.md",
1136
+ snippets: snippets.minicpmOcr,
1137
+ filter: false,
1138
+ },
1042
1139
  mitie: {
1043
1140
  prettyLabel: "MITIE",
1044
1141
  repoName: "MITIE",
1045
1142
  repoUrl: "https://github.com/mit-nlp/MITIE",
1046
1143
  countDownloads: `path_filename:"total_word_feature_extractor"`,
1047
1144
  },
1145
+ mjlab: {
1146
+ prettyLabel: "MJLab",
1147
+ repoName: "MJLab",
1148
+ repoUrl: "https://github.com/mujocolab/mjlab",
1149
+ docsUrl: "https://mujocolab.github.io/mjlab/",
1150
+ filter: false,
1151
+ countDownloads: `path:"policy.onnx" OR path:"final.onnx"`,
1152
+ },
1048
1153
  "ml-agents": {
1049
1154
  prettyLabel: "ml-agents",
1050
1155
  repoName: "ml-agents",
@@ -1196,6 +1301,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
1196
1301
  filter: false,
1197
1302
  countDownloads: `path_extension:"pt"`,
1198
1303
  },
1304
+ opendecision: {
1305
+ prettyLabel: "OpenDecision",
1306
+ repoName: "OpenDecision",
1307
+ repoUrl: "https://github.com/tokz-labs/OpenDecision",
1308
+ snippets: snippets.opendecision,
1309
+ filter: false,
1310
+ },
1199
1311
  openpeerllm: {
1200
1312
  prettyLabel: "OpenPeerLLM",
1201
1313
  repoName: "OpenPeerLLM",
@@ -1260,6 +1372,17 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
1260
1372
  filter: false,
1261
1373
  countDownloads: `path_extension:"pth"`,
1262
1374
  },
1375
+ "pika-h3-flex": {
1376
+ prettyLabel: "Pika H3 Flex",
1377
+ repoName: "Pika-H3-Flex",
1378
+ repoUrl: "https://github.com/Pika-Labs/Pika-H3-Flex",
1379
+ docsUrl: "https://huggingface.co/docs/diffusers/main/en/api/pipelines/pika_h3_flex",
1380
+ snippets: snippets.pika_h3_flex,
1381
+ filter: false,
1382
+ /// Diffusers modular pipeline loads (index files) plus the Pika adapters, which live in
1383
+ /// subfolders (fl2va/, ref2va/, comfy/loras/) that the diffusers rule does not count.
1384
+ countDownloads: `path:"modular_model_index.json" OR path:"model_index.json" OR path:"fl2va/adapter.safetensors" OR path:"ref2va/adapter.safetensors" OR (path_prefix:"comfy/loras/" AND path_extension:"safetensors")`,
1385
+ },
1263
1386
  piper: {
1264
1387
  prettyLabel: "Piper",
1265
1388
  repoName: "Piper",
@@ -1267,6 +1390,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
1267
1390
  filter: false,
1268
1391
  countDownloads: `path_extension:"onnx" OR path_extension:"ckpt"`,
1269
1392
  },
1393
+ pixeldense: {
1394
+ prettyLabel: "PixelDense",
1395
+ repoName: "PixelDense",
1396
+ repoUrl: "https://github.com/Hansxsourse/PixelDense",
1397
+ filter: false,
1398
+ countDownloads: `path:"PixelDense_XXL_T2I.ckpt"`,
1399
+ },
1270
1400
  "pocket-tts": {
1271
1401
  prettyLabel: "Pocket-TTS",
1272
1402
  repoName: "PocketTTS",
@@ -1275,6 +1405,21 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
1275
1405
  filter: false,
1276
1406
  countDownloads: `path:"tts_b6369a24.safetensors"`,
1277
1407
  },
1408
+ pqgan: {
1409
+ prettyLabel: "PQGAN",
1410
+ repoName: "PQGAN",
1411
+ repoUrl: "https://github.com/vislearn/PQGAN",
1412
+ filter: false,
1413
+ countDownloads: `path_extension:"safetensors"`,
1414
+ },
1415
+ protomotions: {
1416
+ prettyLabel: "ProtoMotions",
1417
+ repoName: "ProtoMotions",
1418
+ repoUrl: "https://github.com/NVlabs/ProtoMotions",
1419
+ docsUrl: "https://nvlabs.github.io/ProtoMotions/",
1420
+ filter: false,
1421
+ countDownloads: `path_extension:"onnx" OR ((path_filename:"inference_last" OR path_filename:"inference" OR path_filename:"last") AND path_extension:"ckpt")`,
1422
+ },
1278
1423
  "pruna-ai": {
1279
1424
  prettyLabel: "Pruna AI",
1280
1425
  repoName: "Pruna AI",
@@ -1457,6 +1602,12 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
1457
1602
  filter: true,
1458
1603
  countDownloads: `path:"cfg.json"`,
1459
1604
  },
1605
+ "sap-case": {
1606
+ prettyLabel: "CASE",
1607
+ repoName: "CASE",
1608
+ repoUrl: "https://github.com/SAP-samples/case",
1609
+ snippets: snippets.case_model,
1610
+ },
1460
1611
  "sap-rpt-1-oss": {
1461
1612
  prettyLabel: "sap-rpt-1-oss",
1462
1613
  repoName: "sap-rpt-1-oss",
@@ -1639,6 +1790,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
1639
1790
  snippets: snippets.supertonic,
1640
1791
  filter: false,
1641
1792
  },
1793
+ svdtrunc: {
1794
+ prettyLabel: "SVDtrunc",
1795
+ repoName: "SVDtrunc",
1796
+ repoUrl: "https://github.com/vislearn/SVDtrunc",
1797
+ filter: false,
1798
+ countDownloads: `path_extension:"safetensors"`,
1799
+ },
1642
1800
  swarmformer: {
1643
1801
  prettyLabel: "SwarmFormer",
1644
1802
  repoName: "SwarmFormer",
@@ -1750,6 +1908,15 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
1750
1908
  filter: false,
1751
1909
  countDownloads: `path_extension:"pt" OR path_extension:"pth"`,
1752
1910
  },
1911
+ "torch-pointcloud": {
1912
+ prettyLabel: "torch-pointcloud",
1913
+ repoName: "torch-pointcloud",
1914
+ repoUrl: "https://github.com/arthurdjn/pytorch-pointcloud",
1915
+ docsUrl: "https://pytorch-pointcloud.org/",
1916
+ snippets: snippets.torch_pointcloud,
1917
+ filter: false,
1918
+ countDownloads: `path:"model.safetensors"`,
1919
+ },
1753
1920
  transformers: {
1754
1921
  prettyLabel: "Transformers",
1755
1922
  repoName: "🤗/transformers",
@@ -1915,6 +2082,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
1915
2082
  snippets: snippets.whisperkit,
1916
2083
  countDownloads: `path_filename:"model" AND path_extension:"mil" AND _exists_:"path_prefix"`,
1917
2084
  },
2085
+ wilddet3d: {
2086
+ prettyLabel: "WildDet3D",
2087
+ repoName: "WildDet3D",
2088
+ repoUrl: "https://github.com/allenai/WildDet3D",
2089
+ filter: false,
2090
+ countDownloads: `path_extension:"pt"`,
2091
+ },
1918
2092
  yolov10: {
1919
2093
  // YOLOv10 is a fork of ultraLytics. Code snippets and download count are the same but the repo is different.
1920
2094
  prettyLabel: "YOLOv10",
@@ -1931,6 +2105,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
1931
2105
  docsUrl: "https://docs.ultralytics.com/models/yolo26/",
1932
2106
  countDownloads: `path_extension:"pt" OR path_extension:"safetensors"`,
1933
2107
  },
2108
+ zipsplat: {
2109
+ prettyLabel: "ZipSplat",
2110
+ repoName: "ZipSplat",
2111
+ repoUrl: "https://github.com/cvg/ZipSplat",
2112
+ filter: false,
2113
+ countDownloads: `path_extension:"tar"`,
2114
+ },
1934
2115
  zonos: {
1935
2116
  prettyLabel: "Zonos",
1936
2117
  repoName: "Zonos",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huggingface/tasks",
3
- "version": "0.22.3",
3
+ "version": "0.22.5",
4
4
  "description": "List of ML tasks for huggingface.co/tasks",
5
5
  "keywords": [
6
6
  "hub",
@@ -28,6 +28,52 @@ model = AadyaM1Forecaster(weights)
28
28
  pmf = model.forecast([28, 30, 27], elapsed=0)`,
29
29
  ];
30
30
 
31
+ export const minicpmOcr = (model: ModelData): string[] => {
32
+ const isGguf = !!model.gguf?.context_length;
33
+ const backend = isGguf ? "llamacpp" : "vllm";
34
+ const device = isGguf ? "cpu" : "cuda:0";
35
+ const contextLength = isGguf ? 8192 : 40960;
36
+ const guide = isGguf ? "llamacpp_deploy.md" : "vllm_deploy_en.md";
37
+ const serviceSettings = isGguf
38
+ ? "# llama.cpp: load the model and vision projector; use --port 8080,\n# --alias minicpm-ocr, --ctx-size 8192, --parallel 1, --jinja --reasoning off."
39
+ : "# vLLM: load the model above; use --port 8080,\n# --served-model-name minicpm-ocr and --max-model-len 40960.";
40
+ const pipeline = isGguf
41
+ ? '{"queue_mode": "serial", "max_workers": 1, "render_workers": 1}'
42
+ : '{"overlap_layout": True, "render_workers": 1}';
43
+
44
+ return [
45
+ `pip install "minicpm-ocr[all]" huggingface_hub
46
+
47
+ # Deploy ${model.id} as a recognition service before running the Python example:
48
+ # https://github.com/OpenBMB/MiniCPM-OCR/blob/main/docs/${guide}
49
+ ${serviceSettings}
50
+ # Layout detection uses ${device}; recognition runs on the deployed service.`,
51
+ `from importlib.resources import files
52
+ from pathlib import Path
53
+
54
+ from minicpmvocr import load_config, pipelined_run
55
+ from huggingface_hub import snapshot_download
56
+
57
+ layout_model = snapshot_download("PaddlePaddle/PP-DocLayoutV3")
58
+ cfg = load_config(
59
+ str(files("minicpmvocr").joinpath("configs/minicpmvocr.yaml")),
60
+ overrides={
61
+ "input": {"file_path": str(Path("demo.png").resolve())},
62
+ "engine": {
63
+ "type": "${backend}",
64
+ "server_url": "http://127.0.0.1:8080",
65
+ "model_name": "minicpm-ocr",
66
+ "max_model_len": ${contextLength},
67
+ },
68
+ "layout": {"model_dir": layout_model, "device": "${device}"},
69
+ # Render PDFs in-process so this example also works without a main guard.
70
+ "pipeline": ${pipeline},
71
+ },
72
+ )
73
+ pipelined_run(cfg)`,
74
+ ];
75
+ };
76
+
31
77
  export const adapters = (model: ModelData): string[] => [
32
78
  `from adapters import AutoAdapterModel
33
79
 
@@ -37,6 +83,16 @@ model = AutoAdapterModel.from_pretrained("${escapeStringForJson(
37
83
  model.load_adapter("${model.id}", set_active=True)`,
38
84
  ];
39
85
 
86
+ export const alkove = (model: ModelData): string[] => {
87
+ const name = /^alkove-([a-z]+)-/.exec(model.id.split("/").pop() ?? "")?.[1] ?? "focus";
88
+ return [
89
+ `# pip install alkove
90
+ import alkove
91
+
92
+ models = alkove.Models.load(["${name}"])`,
93
+ ];
94
+ };
95
+
40
96
  const allennlpUnknown = (model: ModelData) => [
41
97
  `import allennlp_models
42
98
  from allennlp.predictors.predictor import Predictor
@@ -117,6 +173,18 @@ function get_prompt_from_diffusers_model(model: ModelData): string | undefined {
117
173
  }
118
174
  }
119
175
 
176
+ export const basedecision = (model: ModelData): string[] => [
177
+ `from basedecision import load_from_hub
178
+
179
+ model = load_from_hub("${model.id}")
180
+ result = model.choose(
181
+ context="Please refund my purchase.",
182
+ question="What does the customer request?",
183
+ options=["Refund", "Delivery status", "Change address"],
184
+ )
185
+ print(result.answer)`,
186
+ ];
187
+
120
188
  export const ben2 = (model: ModelData): string[] => [
121
189
  `import requests
122
190
  from PIL import Image
@@ -143,6 +211,20 @@ export const bm25s = (model: ModelData): string[] => [
143
211
  retriever = BM25HF.load_from_hub("${model.id}")`,
144
212
  ];
145
213
 
214
+ export const case_model = (): string[] => [
215
+ `pip install git+https://github.com/SAP-samples/case`,
216
+ `import pandas as pd
217
+ from case.embedding import CaseTransformer
218
+ X = pd.DataFrame({
219
+ "job": ["Junior Data Scientist", "Senior Data Scientist", "Engineering Manager", "Product Executive"],
220
+ "years_experience": [1.5, 10.0, 12.0, 14.0],
221
+ })
222
+ y = pd.Series([72000, 130000, 165000, 210000], name="income")
223
+ case_embedder = CaseTransformer()
224
+ X_enhanced = case_embedder.fit_transform(X, y)
225
+ # X_enhanced can now be fed to any tabular learner (e.g. TabICL)`,
226
+ ];
227
+
146
228
  export const chatterbox = (): string[] => [
147
229
  `# pip install chatterbox-tts
148
230
  import torchaudio as ta
@@ -447,6 +529,24 @@ dam = DescribeAnythingModel(
447
529
  )`,
448
530
  ];
449
531
 
532
+ export const dew = (model: ModelData): string[] => {
533
+ if (model.pipeline_tag === "text-to-image") {
534
+ return [
535
+ `# pip install dewml --extra-index-url https://pypi.dewml.dev/simple
536
+ import dew
537
+
538
+ pipe = dew.pipeline("${model.id}")
539
+ images = pipe(["a red fox in a snowy forest"], steps=20, key=0).host().images`,
540
+ ];
541
+ }
542
+ return [
543
+ `# pip install dewml --extra-index-url https://pypi.dewml.dev/simple
544
+ import dew
545
+
546
+ task = dew.pipeline("${model.id}")`,
547
+ ];
548
+ };
549
+
450
550
  const diffusers_install = "pip install -U diffusers transformers accelerate";
451
551
 
452
552
  const diffusersDefaultPrompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k";
@@ -891,6 +991,28 @@ print(f'Accuracy {accuracy_score(y_test, predictions):.2%}')
891
991
  return [installSnippet, classificationSnippet, regressionsSnippet, matchingSnippet];
892
992
  };
893
993
 
994
+ export const fse = (model: ModelData): string[] => {
995
+ if (model.config?.model_type === "fse") {
996
+ return [
997
+ `pip install "fse>=2.0"`,
998
+ `from fse import Encoder
999
+
1000
+ encoder = Encoder.from_pretrained("${model.id}")
1001
+ vectors = encoder.encode(["A sentence.", "Another sentence."])`,
1002
+ ];
1003
+ }
1004
+ return [
1005
+ `pip install "fse<2"`,
1006
+ `from fse import SIF, IndexedList, Vectors
1007
+
1008
+ vectors = Vectors.from_pretrained("${nameWithoutNamespace(model.id)}")
1009
+ model = SIF(vectors)
1010
+ sentences = IndexedList([["hello", "world"], ["fast", "sentence", "embeddings"]])
1011
+ model.train(sentences)
1012
+ vector = model.sv[0]`,
1013
+ ];
1014
+ };
1015
+
894
1016
  export const gaussianformer = (model: ModelData): string[] => [
895
1017
  `# pip install "gaussianformer @ git+https://github.com/SVLwoof/gaussianformer"
896
1018
  from gaussianformer import GaussianFormerRenderingPipeline, load_ply
@@ -1164,6 +1286,15 @@ import soundfile as sf
1164
1286
  sf.write('output.wav', audio, 24000)`,
1165
1287
  ];
1166
1288
 
1289
+ export const konfai = (model: ModelData): string[] => [
1290
+ `pip install "konfai[imaging]" konfai-apps`,
1291
+ `# List the apps this repository holds
1292
+ konfai-apps list ${model.id}
1293
+
1294
+ # Run one of them on an image
1295
+ konfai-apps infer ${model.id}:<app> -i image.nii.gz -o Output`,
1296
+ ];
1297
+
1167
1298
  /**
1168
1299
  * Detect LTX-2.5 (split weights + Gemma 4 TE file) vs LTX-2.3
1169
1300
  * (monolith checkpoint + separate Gemma 3 root). Prefer explicit tags / ids /
@@ -1481,6 +1612,27 @@ model.score("query", ["doc1", "doc2", "doc3"])`,
1481
1612
  ];
1482
1613
  };
1483
1614
 
1615
+ export const linnet_tts = (model: ModelData): string[] => [
1616
+ `# pip install linnet-tts soundfile
1617
+ import linnet_tts, soundfile as sf
1618
+ from huggingface_hub import hf_hub_download
1619
+
1620
+ model = linnet_tts.Model(
1621
+ hf_hub_download("${model.id}", "linnet-en-35m.fp16.safetensors"),
1622
+ hf_hub_download("${model.id}", "tokenizer.model"),
1623
+ )
1624
+ voice = model.load_voice(hf_hub_download("${model.id}", "voices/linnet-en-f1.npy"))
1625
+
1626
+ audio = model.synthesize("Hello there.", voice, temp=0.3, cfg=2.0, seed=0)
1627
+ sf.write("hello.wav", audio, model.sample_rate) # float32, 24 kHz
1628
+
1629
+ # streaming: one chunk per 80 ms step
1630
+ session = model.session(voice, seed=0)
1631
+ session.prime("Streaming gives the first chunk of audio after one step.")
1632
+ for chunk in session:
1633
+ ...`,
1634
+ ];
1635
+
1484
1636
  export const llama_cpp_python = (model: ModelData): string[] => {
1485
1637
  const snippets = [
1486
1638
  `# !pip install llama-cpp-python
@@ -1717,6 +1869,22 @@ opendde doctor
1717
1869
  opendde pred -i examples/input.json -o ./output -n opendde_v1`,
1718
1870
  ];
1719
1871
 
1872
+ export const opendecision = (model: ModelData): string[] => [
1873
+ `# pip install tokz-opendecision
1874
+ from opendecision import OpenDecision, Choice, Bool, MultiLabel
1875
+
1876
+ model = OpenDecision.from_pretrained("${model.id}")
1877
+ out = model.decide(
1878
+ "I was charged twice for my May invoice and the app keeps logging me out.",
1879
+ {
1880
+ "queue": Choice(["billing", "technical", "account", "sales"]),
1881
+ "tags": MultiLabel(["double_charge", "login_issue", "refund_request", "outage"]),
1882
+ "urgent": Bool(),
1883
+ },
1884
+ )
1885
+ print(out["queue"].best, out["tags"].selected, out["urgent"].policy)`,
1886
+ ];
1887
+
1720
1888
  export const paddlenlp = (model: ModelData): string[] => {
1721
1889
  const architecture = model.config?.architectures?.[0];
1722
1890
  // interpolated as a Python class name, so a non-identifier is treated as absent
@@ -1848,6 +2016,40 @@ image_prompt = Image.open("path/to/image.jpg").convert("RGB")
1848
2016
  video = wan_i2v.generate(text_prompt, image_prompt)`,
1849
2017
  ];
1850
2018
 
2019
+ export const pika_h3_flex = (model: ModelData): string[] => [
2020
+ `# pip install -r examples/requirements-diffusers.txt (see the examples/ folder of this repo)
2021
+ import torch
2022
+ from diffusers import ComponentsManager, ModularPipeline
2023
+ from diffusers.utils.export_utils import encode_video
2024
+ from PIL import Image
2025
+
2026
+ workflow = "fl2va" # "fl2va" (first-frame to video+audio) or "ref2va" (reference images/video to video+audio)
2027
+
2028
+ manager = ComponentsManager()
2029
+ manager.enable_auto_cpu_offload(device="cuda:0")
2030
+ pipe = ModularPipeline.from_pretrained("${model.id}", workflow=workflow, components_manager=manager)
2031
+ pipe.load_components(
2032
+ pretrained_model_name_or_path="${model.id}",
2033
+ dtype={"vae": torch.float32, "audio_vae": torch.float32, "default": torch.bfloat16},
2034
+ )
2035
+ # The bundled base components are not Pika-adapted weights: load the matching adapter.
2036
+ pipe.load_lora_weights("${model.id}", weight_name=f"{workflow}/adapter.safetensors")
2037
+
2038
+ result = pipe(
2039
+ prompt="A cat walks through a sunlit cafe and jumps onto the counter",
2040
+ image=Image.open("first_frame.png").convert("RGB"),
2041
+ height=480,
2042
+ width=832,
2043
+ num_frames=121,
2044
+ generator=torch.Generator("cuda:0").manual_seed(0),
2045
+ output=["videos", "audio", "sampling_rate"],
2046
+ )
2047
+ encode_video(
2048
+ result["videos"][0], fps=24, output_path="output.mp4",
2049
+ audio=result["audio"][0].float().cpu(), audio_sample_rate=result["sampling_rate"],
2050
+ )`,
2051
+ ];
2052
+
1851
2053
  export const pocket_tts = (model: ModelData): string[] => [
1852
2054
  `from pocket_tts import TTSModel
1853
2055
  import scipy.io.wavfile
@@ -1973,6 +2175,13 @@ export const timm = (model: ModelData): string[] => [
1973
2175
  model = timm.create_model("hf-hub:${model.id}", pretrained=True)`,
1974
2176
  ];
1975
2177
 
2178
+ // create_model() takes a name from the torch-pointcloud registry; the weights live in "torch-pointcloud/<name>"
2179
+ export const torch_pointcloud = (model: ModelData): string[] => [
2180
+ `import torch_pointcloud as tp
2181
+
2182
+ model = tp.create_model("${nameWithoutNamespace(model.id)}", pretrained=True)`,
2183
+ ];
2184
+
1976
2185
  export const saelens = (/* model: ModelData */): string[] => [
1977
2186
  `# pip install sae-lens
1978
2187
  from sae_lens import SAE