@huggingface/tasks 0.10.3 → 0.10.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.
package/dist/index.cjs CHANGED
@@ -22,6 +22,7 @@ var src_exports = {};
22
22
  __export(src_exports, {
23
23
  ALL_DISPLAY_MODEL_LIBRARY_KEYS: () => ALL_DISPLAY_MODEL_LIBRARY_KEYS,
24
24
  ALL_MODEL_LIBRARY_KEYS: () => ALL_MODEL_LIBRARY_KEYS,
25
+ DEFAULT_MEMORY_OPTIONS: () => DEFAULT_MEMORY_OPTIONS,
25
26
  InferenceDisplayability: () => InferenceDisplayability,
26
27
  LIBRARY_TASK_MAPPING: () => LIBRARY_TASK_MAPPING,
27
28
  LOCAL_APPS: () => LOCAL_APPS,
@@ -32,6 +33,7 @@ __export(src_exports, {
32
33
  PIPELINE_DATA: () => PIPELINE_DATA,
33
34
  PIPELINE_TYPES: () => PIPELINE_TYPES,
34
35
  PIPELINE_TYPES_SET: () => PIPELINE_TYPES_SET,
36
+ SKUS: () => SKUS,
35
37
  SPECIAL_TOKENS_ATTRIBUTES: () => SPECIAL_TOKENS_ATTRIBUTES,
36
38
  SUBTASK_TYPES: () => SUBTASK_TYPES,
37
39
  TASKS_DATA: () => TASKS_DATA,
@@ -5452,6 +5454,285 @@ function hasJsInferenceSnippet(model) {
5452
5454
  return !!model.pipeline_tag && model.pipeline_tag in jsSnippets;
5453
5455
  }
5454
5456
 
5457
+ // src/hardware.ts
5458
+ var TFLOPS_THRESHOLD_WHITE_HOUSE_MODEL_TRAINING_TOTAL = 10 ** 14;
5459
+ var TFLOPS_THRESHOLD_WHITE_HOUSE_MODEL_TRAINING_TOTAL_BIOLOGY = 10 ** 11;
5460
+ var TFLOPS_THRESHOLD_WHITE_HOUSE_CLUSTER = 10 ** 8;
5461
+ var TFLOPS_THRESHOLD_EU_AI_ACT_MODEL_TRAINING_TOTAL = 10 ** 13;
5462
+ var DEFAULT_MEMORY_OPTIONS = [8, 16, 24, 32, 40, 48, 64, 80, 96, 128];
5463
+ var SKUS = {
5464
+ GPU: {
5465
+ NVIDIA: {
5466
+ H100: {
5467
+ tflops: 267.6,
5468
+ memory: [80]
5469
+ },
5470
+ L40: {
5471
+ tflops: 90.52,
5472
+ memory: [48]
5473
+ },
5474
+ "RTX 6000 Ada": {
5475
+ tflops: 91.1,
5476
+ memory: [48]
5477
+ },
5478
+ A100: {
5479
+ tflops: 77.97,
5480
+ memory: [80, 40]
5481
+ },
5482
+ A40: {
5483
+ tflops: 37.42,
5484
+ memory: [48]
5485
+ },
5486
+ A10: {
5487
+ tflops: 31.24,
5488
+ memory: [24]
5489
+ },
5490
+ T4: {
5491
+ tflops: 65.13,
5492
+ memory: [16]
5493
+ },
5494
+ "RTX 4090": {
5495
+ tflops: 82.58,
5496
+ memory: [24]
5497
+ },
5498
+ "RTX 4080 SUPER": {
5499
+ tflops: 52.2,
5500
+ memory: [16]
5501
+ },
5502
+ "RTX 4080": {
5503
+ tflops: 48.7,
5504
+ memory: [16]
5505
+ },
5506
+ "RTX 4070": {
5507
+ tflops: 29.15,
5508
+ memory: [12]
5509
+ },
5510
+ "RTX 4070 Ti": {
5511
+ tflops: 40.09,
5512
+ memory: [12]
5513
+ },
5514
+ "RTX 4070 Super": {
5515
+ tflops: 35.48,
5516
+ memory: [12]
5517
+ },
5518
+ "RTX 4070 Ti Super": {
5519
+ tflops: 44.1,
5520
+ memory: [16]
5521
+ },
5522
+ "RTX 3090": {
5523
+ tflops: 35.58,
5524
+ memory: [24]
5525
+ },
5526
+ "RTX 3090 Ti": {
5527
+ tflops: 40,
5528
+ memory: [24]
5529
+ },
5530
+ "RTX 3080 Ti": {
5531
+ tflops: 34.1,
5532
+ memory: [12]
5533
+ },
5534
+ "RTX 3080": {
5535
+ tflops: 30.6,
5536
+ memory: [12, 10]
5537
+ }
5538
+ },
5539
+ AMD: {
5540
+ MI300: {
5541
+ tflops: 383,
5542
+ memory: [192]
5543
+ },
5544
+ MI250: {
5545
+ tflops: 362.1,
5546
+ memory: [128]
5547
+ },
5548
+ MI210: {
5549
+ tflops: 181,
5550
+ memory: [64]
5551
+ },
5552
+ "RX 7900 XTX": {
5553
+ tflops: 122.8,
5554
+ memory: [24]
5555
+ },
5556
+ "RX 7900 XT": {
5557
+ tflops: 103,
5558
+ memory: [20]
5559
+ },
5560
+ "RX 7900 GRE": {
5561
+ tflops: 91.96,
5562
+ memory: [16]
5563
+ },
5564
+ "RX 7800 XT": {
5565
+ tflops: 74.65,
5566
+ memory: [16]
5567
+ },
5568
+ "RX 7700 XT": {
5569
+ tflops: 70.34,
5570
+ memory: [12]
5571
+ },
5572
+ "RX 7600 XT": {
5573
+ tflops: 45.14,
5574
+ memory: [16, 8]
5575
+ }
5576
+ }
5577
+ },
5578
+ CPU: {
5579
+ Intel: {
5580
+ "Xeon 4th Generation (Sapphire Rapids)": {
5581
+ tflops: 1.3
5582
+ },
5583
+ "Xeon 3th Generation (Ice Lake)": {
5584
+ tflops: 0.8
5585
+ },
5586
+ "Xeon 2th Generation (Cascade Lake)": {
5587
+ tflops: 0.55
5588
+ },
5589
+ "Intel Core 13th Generation (i9)": {
5590
+ tflops: 0.85
5591
+ },
5592
+ "Intel Core 13th Generation (i7)": {
5593
+ tflops: 0.82
5594
+ },
5595
+ "Intel Core 13th Generation (i5)": {
5596
+ tflops: 0.68
5597
+ },
5598
+ "Intel Core 13th Generation (i3)": {
5599
+ tflops: 0.57
5600
+ },
5601
+ "Intel Core 12th Generation (i9)": {
5602
+ tflops: 0.79
5603
+ },
5604
+ "Intel Core 12th Generation (i7)": {
5605
+ tflops: 0.77
5606
+ },
5607
+ "Intel Core 12th Generation (i5)": {
5608
+ tflops: 0.65
5609
+ },
5610
+ "Intel Core 12th Generation (i3)": {
5611
+ tflops: 0.53
5612
+ },
5613
+ "Intel Core 11th Generation (i9)": {
5614
+ tflops: 0.7
5615
+ },
5616
+ "Intel Core 11th Generation (i7)": {
5617
+ tflops: 0.6
5618
+ },
5619
+ "Intel Core 11th Generation (i5)": {
5620
+ tflops: 0.5
5621
+ },
5622
+ "Intel Core 11th Generation (i3)": {
5623
+ tflops: 0.35
5624
+ },
5625
+ "Intel Core 10th Generation (i9)": {
5626
+ tflops: 0.46
5627
+ },
5628
+ "Intel Core 10th Generation (i7)": {
5629
+ tflops: 0.46
5630
+ },
5631
+ "Intel Core 10th Generation (i5)": {
5632
+ tflops: 0.46
5633
+ },
5634
+ "Intel Core 10th Generation (i3)": {
5635
+ tflops: 0.44
5636
+ }
5637
+ },
5638
+ AMD: {
5639
+ "EPYC 4th Generation (Genoa)": {
5640
+ tflops: 5
5641
+ },
5642
+ "EPYC 3th Generation (Milan)": {
5643
+ tflops: 2.4
5644
+ },
5645
+ "EPYC 2th Generation (Rome)": {
5646
+ tflops: 0.6
5647
+ },
5648
+ "EPYC 1st Generation (Naples)": {
5649
+ tflops: 0.6
5650
+ },
5651
+ "Ryzen Zen4 7000 (Ryzen 9)": {
5652
+ tflops: 0.56
5653
+ },
5654
+ "Ryzen Zen4 7000 (Ryzen 7)": {
5655
+ tflops: 0.56
5656
+ },
5657
+ "Ryzen Zen4 7000 (Ryzen 5)": {
5658
+ tflops: 0.56
5659
+ },
5660
+ "Ryzen Zen3 5000 (Ryzen 9)": {
5661
+ tflops: 1.33
5662
+ },
5663
+ "Ryzen Zen3 5000 (Ryzen 7)": {
5664
+ tflops: 1.33
5665
+ },
5666
+ "Ryzen Zen3 5000 (Ryzen 5)": {
5667
+ tflops: 0.72
5668
+ },
5669
+ "Ryzen Zen 2 3000 (Threadripper)": {
5670
+ tflops: 0.72
5671
+ },
5672
+ "Ryzen Zen 2 3000 (Ryzen 9)": {
5673
+ tflops: 0.72
5674
+ },
5675
+ "Ryzen Zen 2 3000 (Ryzen 7)": {
5676
+ tflops: 0.72
5677
+ },
5678
+ "Ryzen Zen 2 3000 (Ryzen 5)": {
5679
+ tflops: 0.72
5680
+ },
5681
+ "Ryzen Zen 2 3000 (Ryzen 3)": {
5682
+ tflops: 0.72
5683
+ }
5684
+ }
5685
+ },
5686
+ "Apple Silicon": {
5687
+ "-": {
5688
+ "Apple M1": {
5689
+ tflops: 2.6,
5690
+ memory: [8, 16]
5691
+ },
5692
+ "Apple M1 Pro": {
5693
+ tflops: 5.2,
5694
+ memory: [16, 24, 32]
5695
+ },
5696
+ "Apple M1 Max": {
5697
+ tflops: 10.4,
5698
+ memory: [16, 24, 32, 64]
5699
+ },
5700
+ "Apple M1 Ultra": {
5701
+ tflops: 21,
5702
+ memory: [16, 24, 32, 64, 96, 128]
5703
+ },
5704
+ "Apple M2": {
5705
+ tflops: 3.6,
5706
+ memory: [8, 16, 24]
5707
+ },
5708
+ "Apple M2 Pro": {
5709
+ tflops: 13.6,
5710
+ memory: [16, 24, 32]
5711
+ },
5712
+ "Apple M2 Max": {
5713
+ tflops: 13.49,
5714
+ memory: [32, 64, 96]
5715
+ },
5716
+ "Apple M2 Ultra": {
5717
+ tflops: 27.2,
5718
+ memory: [64, 96, 128, 192]
5719
+ },
5720
+ "Apple M3": {
5721
+ tflops: 2.84,
5722
+ memory: [8, 16, 24]
5723
+ },
5724
+ "Apple M3 Pro": {
5725
+ tflops: 14,
5726
+ memory: [18, 36]
5727
+ },
5728
+ "Apple M3 Max": {
5729
+ tflops: 14.2,
5730
+ memory: [36, 48, 64, 96, 128]
5731
+ }
5732
+ }
5733
+ }
5734
+ };
5735
+
5455
5736
  // src/local-apps.ts
5456
5737
  function isGgufModel(model) {
5457
5738
  return model.tags.includes("gguf");
@@ -5460,7 +5741,7 @@ var snippetLlamacpp = (model) => {
5460
5741
  return `./main \\
5461
5742
  --hf-repo "${model.id}" \\
5462
5743
  -m file.gguf \\
5463
- -p "I believe the meaning of life is " \\
5744
+ -p "I believe the meaning of life is" \\
5464
5745
  -n 128`;
5465
5746
  };
5466
5747
  var LOCAL_APPS = {
@@ -5486,10 +5767,9 @@ var LOCAL_APPS = {
5486
5767
  deeplink: (model) => new URL(`jan://models/huggingface/${model.id}`)
5487
5768
  },
5488
5769
  backyard: {
5489
- prettyLabel: "Backyard",
5770
+ prettyLabel: "Backyard AI",
5490
5771
  docsUrl: "https://backyard.ai",
5491
5772
  mainTask: "text-generation",
5492
- macOSOnly: true,
5493
5773
  displayOnModelPage: isGgufModel,
5494
5774
  deeplink: (model) => new URL(`https://backyard.ai/hf/model/${model.id}`)
5495
5775
  },
@@ -5498,12 +5778,14 @@ var LOCAL_APPS = {
5498
5778
  docsUrl: "https://drawthings.ai",
5499
5779
  mainTask: "text-to-image",
5500
5780
  macOSOnly: true,
5501
- comingSoon: true,
5502
- /**
5503
- * random function, will need to refine the actual conditions:
5504
- */
5505
- displayOnModelPage: (model) => model.library_name === "diffusers" && model.pipeline_tag === "text-to-image",
5506
- deeplink: (model) => new URL(`drawthings://open_from_hf?model=${model.id}`)
5781
+ displayOnModelPage: (model) => model.library_name === "diffusers" && (model.pipeline_tag === "text-to-image" || model.tags.includes("lora")),
5782
+ deeplink: (model) => {
5783
+ if (model.tags.includes("lora")) {
5784
+ return new URL(`https://drawthings.ai/import/diffusers/pipeline.load_lora_weights?repo_id=${model.id}`);
5785
+ } else {
5786
+ return new URL(`https://drawthings.ai/import/diffusers/pipeline.from_pretrained?repo_id=${model.id}`);
5787
+ }
5788
+ }
5507
5789
  },
5508
5790
  diffusionbee: {
5509
5791
  prettyLabel: "DiffusionBee",
@@ -5519,6 +5801,7 @@ var LOCAL_APPS = {
5519
5801
  0 && (module.exports = {
5520
5802
  ALL_DISPLAY_MODEL_LIBRARY_KEYS,
5521
5803
  ALL_MODEL_LIBRARY_KEYS,
5804
+ DEFAULT_MEMORY_OPTIONS,
5522
5805
  InferenceDisplayability,
5523
5806
  LIBRARY_TASK_MAPPING,
5524
5807
  LOCAL_APPS,
@@ -5529,6 +5812,7 @@ var LOCAL_APPS = {
5529
5812
  PIPELINE_DATA,
5530
5813
  PIPELINE_TYPES,
5531
5814
  PIPELINE_TYPES_SET,
5815
+ SKUS,
5532
5816
  SPECIAL_TOKENS_ATTRIBUTES,
5533
5817
  SUBTASK_TYPES,
5534
5818
  TASKS_DATA,
package/dist/index.js CHANGED
@@ -5416,6 +5416,285 @@ function hasJsInferenceSnippet(model) {
5416
5416
  return !!model.pipeline_tag && model.pipeline_tag in jsSnippets;
5417
5417
  }
5418
5418
 
5419
+ // src/hardware.ts
5420
+ var TFLOPS_THRESHOLD_WHITE_HOUSE_MODEL_TRAINING_TOTAL = 10 ** 14;
5421
+ var TFLOPS_THRESHOLD_WHITE_HOUSE_MODEL_TRAINING_TOTAL_BIOLOGY = 10 ** 11;
5422
+ var TFLOPS_THRESHOLD_WHITE_HOUSE_CLUSTER = 10 ** 8;
5423
+ var TFLOPS_THRESHOLD_EU_AI_ACT_MODEL_TRAINING_TOTAL = 10 ** 13;
5424
+ var DEFAULT_MEMORY_OPTIONS = [8, 16, 24, 32, 40, 48, 64, 80, 96, 128];
5425
+ var SKUS = {
5426
+ GPU: {
5427
+ NVIDIA: {
5428
+ H100: {
5429
+ tflops: 267.6,
5430
+ memory: [80]
5431
+ },
5432
+ L40: {
5433
+ tflops: 90.52,
5434
+ memory: [48]
5435
+ },
5436
+ "RTX 6000 Ada": {
5437
+ tflops: 91.1,
5438
+ memory: [48]
5439
+ },
5440
+ A100: {
5441
+ tflops: 77.97,
5442
+ memory: [80, 40]
5443
+ },
5444
+ A40: {
5445
+ tflops: 37.42,
5446
+ memory: [48]
5447
+ },
5448
+ A10: {
5449
+ tflops: 31.24,
5450
+ memory: [24]
5451
+ },
5452
+ T4: {
5453
+ tflops: 65.13,
5454
+ memory: [16]
5455
+ },
5456
+ "RTX 4090": {
5457
+ tflops: 82.58,
5458
+ memory: [24]
5459
+ },
5460
+ "RTX 4080 SUPER": {
5461
+ tflops: 52.2,
5462
+ memory: [16]
5463
+ },
5464
+ "RTX 4080": {
5465
+ tflops: 48.7,
5466
+ memory: [16]
5467
+ },
5468
+ "RTX 4070": {
5469
+ tflops: 29.15,
5470
+ memory: [12]
5471
+ },
5472
+ "RTX 4070 Ti": {
5473
+ tflops: 40.09,
5474
+ memory: [12]
5475
+ },
5476
+ "RTX 4070 Super": {
5477
+ tflops: 35.48,
5478
+ memory: [12]
5479
+ },
5480
+ "RTX 4070 Ti Super": {
5481
+ tflops: 44.1,
5482
+ memory: [16]
5483
+ },
5484
+ "RTX 3090": {
5485
+ tflops: 35.58,
5486
+ memory: [24]
5487
+ },
5488
+ "RTX 3090 Ti": {
5489
+ tflops: 40,
5490
+ memory: [24]
5491
+ },
5492
+ "RTX 3080 Ti": {
5493
+ tflops: 34.1,
5494
+ memory: [12]
5495
+ },
5496
+ "RTX 3080": {
5497
+ tflops: 30.6,
5498
+ memory: [12, 10]
5499
+ }
5500
+ },
5501
+ AMD: {
5502
+ MI300: {
5503
+ tflops: 383,
5504
+ memory: [192]
5505
+ },
5506
+ MI250: {
5507
+ tflops: 362.1,
5508
+ memory: [128]
5509
+ },
5510
+ MI210: {
5511
+ tflops: 181,
5512
+ memory: [64]
5513
+ },
5514
+ "RX 7900 XTX": {
5515
+ tflops: 122.8,
5516
+ memory: [24]
5517
+ },
5518
+ "RX 7900 XT": {
5519
+ tflops: 103,
5520
+ memory: [20]
5521
+ },
5522
+ "RX 7900 GRE": {
5523
+ tflops: 91.96,
5524
+ memory: [16]
5525
+ },
5526
+ "RX 7800 XT": {
5527
+ tflops: 74.65,
5528
+ memory: [16]
5529
+ },
5530
+ "RX 7700 XT": {
5531
+ tflops: 70.34,
5532
+ memory: [12]
5533
+ },
5534
+ "RX 7600 XT": {
5535
+ tflops: 45.14,
5536
+ memory: [16, 8]
5537
+ }
5538
+ }
5539
+ },
5540
+ CPU: {
5541
+ Intel: {
5542
+ "Xeon 4th Generation (Sapphire Rapids)": {
5543
+ tflops: 1.3
5544
+ },
5545
+ "Xeon 3th Generation (Ice Lake)": {
5546
+ tflops: 0.8
5547
+ },
5548
+ "Xeon 2th Generation (Cascade Lake)": {
5549
+ tflops: 0.55
5550
+ },
5551
+ "Intel Core 13th Generation (i9)": {
5552
+ tflops: 0.85
5553
+ },
5554
+ "Intel Core 13th Generation (i7)": {
5555
+ tflops: 0.82
5556
+ },
5557
+ "Intel Core 13th Generation (i5)": {
5558
+ tflops: 0.68
5559
+ },
5560
+ "Intel Core 13th Generation (i3)": {
5561
+ tflops: 0.57
5562
+ },
5563
+ "Intel Core 12th Generation (i9)": {
5564
+ tflops: 0.79
5565
+ },
5566
+ "Intel Core 12th Generation (i7)": {
5567
+ tflops: 0.77
5568
+ },
5569
+ "Intel Core 12th Generation (i5)": {
5570
+ tflops: 0.65
5571
+ },
5572
+ "Intel Core 12th Generation (i3)": {
5573
+ tflops: 0.53
5574
+ },
5575
+ "Intel Core 11th Generation (i9)": {
5576
+ tflops: 0.7
5577
+ },
5578
+ "Intel Core 11th Generation (i7)": {
5579
+ tflops: 0.6
5580
+ },
5581
+ "Intel Core 11th Generation (i5)": {
5582
+ tflops: 0.5
5583
+ },
5584
+ "Intel Core 11th Generation (i3)": {
5585
+ tflops: 0.35
5586
+ },
5587
+ "Intel Core 10th Generation (i9)": {
5588
+ tflops: 0.46
5589
+ },
5590
+ "Intel Core 10th Generation (i7)": {
5591
+ tflops: 0.46
5592
+ },
5593
+ "Intel Core 10th Generation (i5)": {
5594
+ tflops: 0.46
5595
+ },
5596
+ "Intel Core 10th Generation (i3)": {
5597
+ tflops: 0.44
5598
+ }
5599
+ },
5600
+ AMD: {
5601
+ "EPYC 4th Generation (Genoa)": {
5602
+ tflops: 5
5603
+ },
5604
+ "EPYC 3th Generation (Milan)": {
5605
+ tflops: 2.4
5606
+ },
5607
+ "EPYC 2th Generation (Rome)": {
5608
+ tflops: 0.6
5609
+ },
5610
+ "EPYC 1st Generation (Naples)": {
5611
+ tflops: 0.6
5612
+ },
5613
+ "Ryzen Zen4 7000 (Ryzen 9)": {
5614
+ tflops: 0.56
5615
+ },
5616
+ "Ryzen Zen4 7000 (Ryzen 7)": {
5617
+ tflops: 0.56
5618
+ },
5619
+ "Ryzen Zen4 7000 (Ryzen 5)": {
5620
+ tflops: 0.56
5621
+ },
5622
+ "Ryzen Zen3 5000 (Ryzen 9)": {
5623
+ tflops: 1.33
5624
+ },
5625
+ "Ryzen Zen3 5000 (Ryzen 7)": {
5626
+ tflops: 1.33
5627
+ },
5628
+ "Ryzen Zen3 5000 (Ryzen 5)": {
5629
+ tflops: 0.72
5630
+ },
5631
+ "Ryzen Zen 2 3000 (Threadripper)": {
5632
+ tflops: 0.72
5633
+ },
5634
+ "Ryzen Zen 2 3000 (Ryzen 9)": {
5635
+ tflops: 0.72
5636
+ },
5637
+ "Ryzen Zen 2 3000 (Ryzen 7)": {
5638
+ tflops: 0.72
5639
+ },
5640
+ "Ryzen Zen 2 3000 (Ryzen 5)": {
5641
+ tflops: 0.72
5642
+ },
5643
+ "Ryzen Zen 2 3000 (Ryzen 3)": {
5644
+ tflops: 0.72
5645
+ }
5646
+ }
5647
+ },
5648
+ "Apple Silicon": {
5649
+ "-": {
5650
+ "Apple M1": {
5651
+ tflops: 2.6,
5652
+ memory: [8, 16]
5653
+ },
5654
+ "Apple M1 Pro": {
5655
+ tflops: 5.2,
5656
+ memory: [16, 24, 32]
5657
+ },
5658
+ "Apple M1 Max": {
5659
+ tflops: 10.4,
5660
+ memory: [16, 24, 32, 64]
5661
+ },
5662
+ "Apple M1 Ultra": {
5663
+ tflops: 21,
5664
+ memory: [16, 24, 32, 64, 96, 128]
5665
+ },
5666
+ "Apple M2": {
5667
+ tflops: 3.6,
5668
+ memory: [8, 16, 24]
5669
+ },
5670
+ "Apple M2 Pro": {
5671
+ tflops: 13.6,
5672
+ memory: [16, 24, 32]
5673
+ },
5674
+ "Apple M2 Max": {
5675
+ tflops: 13.49,
5676
+ memory: [32, 64, 96]
5677
+ },
5678
+ "Apple M2 Ultra": {
5679
+ tflops: 27.2,
5680
+ memory: [64, 96, 128, 192]
5681
+ },
5682
+ "Apple M3": {
5683
+ tflops: 2.84,
5684
+ memory: [8, 16, 24]
5685
+ },
5686
+ "Apple M3 Pro": {
5687
+ tflops: 14,
5688
+ memory: [18, 36]
5689
+ },
5690
+ "Apple M3 Max": {
5691
+ tflops: 14.2,
5692
+ memory: [36, 48, 64, 96, 128]
5693
+ }
5694
+ }
5695
+ }
5696
+ };
5697
+
5419
5698
  // src/local-apps.ts
5420
5699
  function isGgufModel(model) {
5421
5700
  return model.tags.includes("gguf");
@@ -5424,7 +5703,7 @@ var snippetLlamacpp = (model) => {
5424
5703
  return `./main \\
5425
5704
  --hf-repo "${model.id}" \\
5426
5705
  -m file.gguf \\
5427
- -p "I believe the meaning of life is " \\
5706
+ -p "I believe the meaning of life is" \\
5428
5707
  -n 128`;
5429
5708
  };
5430
5709
  var LOCAL_APPS = {
@@ -5450,10 +5729,9 @@ var LOCAL_APPS = {
5450
5729
  deeplink: (model) => new URL(`jan://models/huggingface/${model.id}`)
5451
5730
  },
5452
5731
  backyard: {
5453
- prettyLabel: "Backyard",
5732
+ prettyLabel: "Backyard AI",
5454
5733
  docsUrl: "https://backyard.ai",
5455
5734
  mainTask: "text-generation",
5456
- macOSOnly: true,
5457
5735
  displayOnModelPage: isGgufModel,
5458
5736
  deeplink: (model) => new URL(`https://backyard.ai/hf/model/${model.id}`)
5459
5737
  },
@@ -5462,12 +5740,14 @@ var LOCAL_APPS = {
5462
5740
  docsUrl: "https://drawthings.ai",
5463
5741
  mainTask: "text-to-image",
5464
5742
  macOSOnly: true,
5465
- comingSoon: true,
5466
- /**
5467
- * random function, will need to refine the actual conditions:
5468
- */
5469
- displayOnModelPage: (model) => model.library_name === "diffusers" && model.pipeline_tag === "text-to-image",
5470
- deeplink: (model) => new URL(`drawthings://open_from_hf?model=${model.id}`)
5743
+ displayOnModelPage: (model) => model.library_name === "diffusers" && (model.pipeline_tag === "text-to-image" || model.tags.includes("lora")),
5744
+ deeplink: (model) => {
5745
+ if (model.tags.includes("lora")) {
5746
+ return new URL(`https://drawthings.ai/import/diffusers/pipeline.load_lora_weights?repo_id=${model.id}`);
5747
+ } else {
5748
+ return new URL(`https://drawthings.ai/import/diffusers/pipeline.from_pretrained?repo_id=${model.id}`);
5749
+ }
5750
+ }
5471
5751
  },
5472
5752
  diffusionbee: {
5473
5753
  prettyLabel: "DiffusionBee",
@@ -5482,6 +5762,7 @@ var LOCAL_APPS = {
5482
5762
  export {
5483
5763
  ALL_DISPLAY_MODEL_LIBRARY_KEYS,
5484
5764
  ALL_MODEL_LIBRARY_KEYS,
5765
+ DEFAULT_MEMORY_OPTIONS,
5485
5766
  InferenceDisplayability,
5486
5767
  LIBRARY_TASK_MAPPING,
5487
5768
  LOCAL_APPS,
@@ -5492,6 +5773,7 @@ export {
5492
5773
  PIPELINE_DATA,
5493
5774
  PIPELINE_TYPES,
5494
5775
  PIPELINE_TYPES_SET,
5776
+ SKUS,
5495
5777
  SPECIAL_TOKENS_ATTRIBUTES,
5496
5778
  SUBTASK_TYPES,
5497
5779
  TASKS_DATA,