genai-electron 0.4.3 → 0.6.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.
Files changed (70) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +87 -84
  3. package/dist/config/defaults.d.ts +37 -54
  4. package/dist/config/defaults.d.ts.map +1 -1
  5. package/dist/config/defaults.js +53 -60
  6. package/dist/config/defaults.js.map +1 -1
  7. package/dist/config/paths.d.ts +1 -0
  8. package/dist/config/paths.d.ts.map +1 -1
  9. package/dist/config/paths.js +3 -0
  10. package/dist/config/paths.js.map +1 -1
  11. package/dist/config/reasoning-models.d.ts.map +1 -1
  12. package/dist/config/reasoning-models.js.map +1 -1
  13. package/dist/index.d.ts +6 -5
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +4 -3
  16. package/dist/index.js.map +1 -1
  17. package/dist/managers/BinaryManager.d.ts +1 -0
  18. package/dist/managers/BinaryManager.d.ts.map +1 -1
  19. package/dist/managers/BinaryManager.js +21 -30
  20. package/dist/managers/BinaryManager.js.map +1 -1
  21. package/dist/managers/DiffusionServerManager.d.ts +6 -0
  22. package/dist/managers/DiffusionServerManager.d.ts.map +1 -1
  23. package/dist/managers/DiffusionServerManager.js +186 -50
  24. package/dist/managers/DiffusionServerManager.js.map +1 -1
  25. package/dist/managers/GenerationRegistry.d.ts.map +1 -1
  26. package/dist/managers/GenerationRegistry.js +1 -1
  27. package/dist/managers/GenerationRegistry.js.map +1 -1
  28. package/dist/managers/LlamaServerManager.d.ts +17 -0
  29. package/dist/managers/LlamaServerManager.d.ts.map +1 -1
  30. package/dist/managers/LlamaServerManager.js +284 -28
  31. package/dist/managers/LlamaServerManager.js.map +1 -1
  32. package/dist/managers/ModelManager.d.ts +6 -0
  33. package/dist/managers/ModelManager.d.ts.map +1 -1
  34. package/dist/managers/ModelManager.js +424 -2
  35. package/dist/managers/ModelManager.js.map +1 -1
  36. package/dist/managers/ResourceOrchestrator.d.ts.map +1 -1
  37. package/dist/managers/ResourceOrchestrator.js +52 -51
  38. package/dist/managers/ResourceOrchestrator.js.map +1 -1
  39. package/dist/managers/ServerManager.d.ts +2 -2
  40. package/dist/managers/ServerManager.d.ts.map +1 -1
  41. package/dist/managers/ServerManager.js +8 -3
  42. package/dist/managers/ServerManager.js.map +1 -1
  43. package/dist/managers/StorageManager.d.ts.map +1 -1
  44. package/dist/managers/StorageManager.js +143 -12
  45. package/dist/managers/StorageManager.js.map +1 -1
  46. package/dist/process/health-check.d.ts +4 -3
  47. package/dist/process/health-check.d.ts.map +1 -1
  48. package/dist/process/health-check.js +12 -6
  49. package/dist/process/health-check.js.map +1 -1
  50. package/dist/process/log-manager.d.ts +11 -1
  51. package/dist/process/log-manager.d.ts.map +1 -1
  52. package/dist/process/log-manager.js +49 -2
  53. package/dist/process/log-manager.js.map +1 -1
  54. package/dist/process/port-utils.d.ts +3 -0
  55. package/dist/process/port-utils.d.ts.map +1 -0
  56. package/dist/process/port-utils.js +28 -0
  57. package/dist/process/port-utils.js.map +1 -0
  58. package/dist/types/images.d.ts +4 -2
  59. package/dist/types/images.d.ts.map +1 -1
  60. package/dist/types/index.d.ts +2 -2
  61. package/dist/types/index.d.ts.map +1 -1
  62. package/dist/types/models.d.ts +31 -0
  63. package/dist/types/models.d.ts.map +1 -1
  64. package/dist/types/servers.d.ts +20 -2
  65. package/dist/types/servers.d.ts.map +1 -1
  66. package/dist/utils/debug-log.d.ts +3 -0
  67. package/dist/utils/debug-log.d.ts.map +1 -0
  68. package/dist/utils/debug-log.js +10 -0
  69. package/dist/utils/debug-log.js.map +1 -0
  70. package/package.json +73 -73
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Luigi Acerbi
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Luigi Acerbi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,84 +1,87 @@
1
- # genai-electron
2
-
3
- > **Version**: 0.3.0 | **Status**: Production Ready - LLM & Image Generation
4
-
5
- Electron-specific library for managing local AI model servers (llama.cpp, stable-diffusion.cpp). Handles platform-specific operations to run AI models locally. Complements [genai-lite](https://github.com/lacerbi/genai-lite) for API abstraction.
6
-
7
- ## Features
8
-
9
- - ✅ **System detection** - Auto-detect RAM, CPU, GPU, VRAM capabilities
10
- - ✅ **Model management** - Download GGUF models with progress tracking and metadata extraction
11
- - ✅ **LLM server** - Manage llama-server lifecycle with auto-configuration
12
- - ✅ **Image generation** - Local image generation via stable-diffusion.cpp
13
- - ✅ **Resource orchestration** - Automatic LLM offload/reload when memory constrained
14
- - ✅ **Binary management** - Automatic binary download with GPU variant testing (CUDA→Vulkan→CPU)
15
- - ✅ **TypeScript-first** - Full type safety, zero runtime dependencies
16
-
17
- ## Installation
18
-
19
- ```bash
20
- npm install genai-electron
21
- npm install electron@>=25.0.0 # Peer dependency
22
- ```
23
-
24
- ## Quick Start
25
-
26
- ```typescript
27
- import { app } from 'electron';
28
- import { systemInfo, modelManager, llamaServer } from 'genai-electron';
29
-
30
- app.whenReady().then(async () => {
31
- // Detect capabilities
32
- const caps = await systemInfo.detect();
33
- console.log('RAM:', (caps.memory.total / 1024 ** 3).toFixed(1), 'GB');
34
-
35
- // Download model (if needed)
36
- await modelManager.downloadModel({
37
- source: 'url',
38
- url: 'https://huggingface.co/TheBloke/Llama-2-7B-GGUF/resolve/main/llama-2-7b.Q4_K_M.gguf',
39
- name: 'Llama 2 7B',
40
- type: 'llm'
41
- });
42
-
43
- // Start server with auto-config
44
- await llamaServer.start({
45
- modelId: 'llama-2-7b',
46
- port: 8080
47
- });
48
-
49
- console.log('Server ready on port 8080');
50
- });
51
- ```
52
-
53
- Use with [genai-lite](https://github.com/lacerbi/genai-lite) for AI interactions (chat, image generation).
54
-
55
- ## Documentation
56
-
57
- 📚 **[Complete Documentation](genai-electron-docs/index.md)** - Full API reference, guides, and examples
58
-
59
- **Quick Links**:
60
- - [Installation & Setup](genai-electron-docs/installation-and-setup.md)
61
- - [System Detection](genai-electron-docs/system-detection.md)
62
- - [Model Management](genai-electron-docs/model-management.md)
63
- - [LLM Server](genai-electron-docs/llm-server.md)
64
- - [Image Generation](genai-electron-docs/image-generation.md)
65
- - [TypeScript Reference](genai-electron-docs/typescript-reference.md)
66
- - [Troubleshooting](genai-electron-docs/troubleshooting.md)
67
-
68
- ## Example App
69
-
70
- See **[electron-control-panel](examples/electron-control-panel/)** for a full-featured reference implementation.
71
-
72
- ## Platform Support
73
-
74
- - **macOS**: 11+ (Intel, Apple Silicon with Metal)
75
- - **Windows**: 10+ (64-bit, CPU and CUDA)
76
- - **Linux**: Ubuntu 20.04+, Debian 11+, Fedora 35+ (CPU, CUDA, ROCm)
77
-
78
- ## License
79
-
80
- MIT License - see [LICENSE](LICENSE) file for details.
81
-
82
- ## Related Projects
83
-
84
- - **[genai-lite](https://github.com/lacerbi/genai-lite)** - Lightweight API abstraction for AI providers (cloud and local)
1
+ # genai-electron
2
+
3
+ > **Version**: 0.6.1 | **Status**: Production Ready - LLM & Image Generation, hardened server lifecycle
4
+
5
+ Electron-specific library for managing local AI model servers (llama.cpp, stable-diffusion.cpp). Handles platform-specific operations to run AI models locally. Complements [genai-lite](https://github.com/lacerbi/genai-lite) for API abstraction.
6
+
7
+ ## Features
8
+
9
+ - ✅ **System detection** - Auto-detect RAM, CPU, GPU, VRAM capabilities
10
+ - ✅ **Model management** - Download GGUF models with progress tracking and metadata extraction
11
+ - ✅ **LLM server** - Manage llama-server lifecycle with auto-configuration
12
+ - ✅ **Image generation** - Local image generation via stable-diffusion.cpp
13
+ - ✅ **Multi-component diffusion models** - Flux 2, SDXL split components with aggregate checksum validation
14
+ - ✅ **Resource orchestration** - Automatic LLM offload/reload when memory constrained
15
+ - ✅ **Reliable server lifecycle** - Crash auto-restart, hang watchdog, automatic port selection, occupancy safety, log rotation
16
+ - ✅ **Advanced launch control** - KV-cache quantization, flash-attention control, MoE CPU offload, multi-shard GGUF downloads, image-generation cancellation
17
+ - ✅ **Binary management** - Automatic binary download with GPU variant testing (CUDA→Vulkan→CPU)
18
+ - ✅ **TypeScript-first** - Full type safety, minimal runtime dependencies
19
+
20
+ ## Installation
21
+
22
+ ```bash
23
+ npm install genai-electron
24
+ npm install electron@>=25.0.0 # Peer dependency
25
+ ```
26
+
27
+ ## Quick Start
28
+
29
+ ```typescript
30
+ import { app } from 'electron';
31
+ import { systemInfo, modelManager, llamaServer } from 'genai-electron';
32
+
33
+ app.whenReady().then(async () => {
34
+ // Detect capabilities
35
+ const caps = await systemInfo.detect();
36
+ console.log('RAM:', (caps.memory.total / 1024 ** 3).toFixed(1), 'GB');
37
+
38
+ // Download model (if needed)
39
+ await modelManager.downloadModel({
40
+ source: 'url',
41
+ url: 'https://huggingface.co/TheBloke/Llama-2-7B-GGUF/resolve/main/llama-2-7b.Q4_K_M.gguf',
42
+ name: 'Llama 2 7B',
43
+ type: 'llm'
44
+ });
45
+
46
+ // Start server with auto-config (port is optional — defaults to 8080;
47
+ // pass port: 'auto' to have the OS pick a free port)
48
+ const info = await llamaServer.start({
49
+ modelId: 'llama-2-7b'
50
+ });
51
+
52
+ console.log(`Server ready on port ${info.port}`);
53
+ });
54
+ ```
55
+
56
+ Use with [genai-lite](https://github.com/lacerbi/genai-lite) for AI interactions (chat, image generation).
57
+
58
+ ## Documentation
59
+
60
+ 📚 **[Complete Documentation](genai-electron-docs/index.md)** - Full API reference, guides, and examples
61
+
62
+ **Quick Links**:
63
+ - [Installation & Setup](genai-electron-docs/installation-and-setup.md)
64
+ - [System Detection](genai-electron-docs/system-detection.md)
65
+ - [Model Management](genai-electron-docs/model-management.md)
66
+ - [LLM Server](genai-electron-docs/llm-server.md)
67
+ - [Image Generation](genai-electron-docs/image-generation.md)
68
+ - [TypeScript Reference](genai-electron-docs/typescript-reference.md)
69
+ - [Troubleshooting](genai-electron-docs/troubleshooting.md)
70
+
71
+ ## Example App
72
+
73
+ See **[electron-control-panel](examples/electron-control-panel/)** for a full-featured reference implementation.
74
+
75
+ ## Platform Support
76
+
77
+ - **macOS**: 11+ (Intel, Apple Silicon with Metal)
78
+ - **Windows**: 10+ (64-bit; CUDA, Vulkan, CPU)
79
+ - **Linux**: Ubuntu 20.04+, Debian 11+, Fedora 35+ (Vulkan, CPU — no CUDA prebuilt upstream; build from source for CUDA)
80
+
81
+ ## License
82
+
83
+ MIT License - see [LICENSE](LICENSE) file for details.
84
+
85
+ ## Related Projects
86
+
87
+ - **[genai-lite](https://github.com/lacerbi/genai-lite)** - Lightweight API abstraction for AI providers (cloud and local)
@@ -1,15 +1,18 @@
1
- import type { ServerConfig } from '../types/index.js';
1
+ import type { DiffusionComponentRole } from '../types/index.js';
2
2
  export declare const DEFAULT_PORTS: {
3
3
  readonly llama: 8080;
4
4
  readonly diffusion: 8081;
5
5
  };
6
6
  export declare const DEFAULT_TIMEOUTS: {
7
7
  readonly download: 300000;
8
- readonly serverStart: 60000;
8
+ readonly serverStart: 120000;
9
9
  readonly serverStop: 10000;
10
10
  readonly healthCheck: 5000;
11
11
  };
12
- export declare const DEFAULT_SERVER_CONFIG: Partial<ServerConfig>;
12
+ export declare const DEFAULT_LOG_ROTATION: {
13
+ readonly maxFileSize: number;
14
+ readonly maxArchives: 2;
15
+ };
13
16
  export type BinaryVariant = 'cuda' | 'vulkan' | 'metal' | 'cpu';
14
17
  export interface BinaryDependency {
15
18
  url: string;
@@ -24,109 +27,89 @@ export interface BinaryVariantConfig {
24
27
  }
25
28
  export declare const BINARY_VERSIONS: {
26
29
  readonly llamaServer: {
27
- readonly version: "b7956";
30
+ readonly version: "b9860";
28
31
  readonly variants: {
29
32
  readonly 'darwin-arm64': readonly [{
30
33
  readonly type: BinaryVariant;
31
- readonly url: "https://github.com/ggml-org/llama.cpp/releases/download/b7956/llama-b7956-bin-macos-arm64.tar.gz";
32
- readonly checksum: "3abe5f4ca01258759fe593331f4dc45e439b3bfaf1127b2061ed18bfa0f82960";
34
+ readonly url: "https://github.com/ggml-org/llama.cpp/releases/download/b9860/llama-b9860-bin-macos-arm64.tar.gz";
35
+ readonly checksum: "35a2e8c3528adc71db5044e7ad7de8d8b96a4221e737958915e31538a005f1d9";
33
36
  }];
34
37
  readonly 'darwin-x64': readonly [{
35
38
  readonly type: BinaryVariant;
36
- readonly url: "https://github.com/ggml-org/llama.cpp/releases/download/b7956/llama-b7956-bin-macos-x64.tar.gz";
37
- readonly checksum: "6becaf739a2e1f58ac78da9c909eee932a25799a778ef1da3bfb6a42aeb2e7a8";
39
+ readonly url: "https://github.com/ggml-org/llama.cpp/releases/download/b9860/llama-b9860-bin-macos-x64.tar.gz";
40
+ readonly checksum: "d442123d5441c82b23b412a58d91e149f60723adfc20a7cc9df04a3908cb5113";
38
41
  }];
39
42
  readonly 'win32-x64': readonly [{
40
43
  readonly type: BinaryVariant;
41
- readonly url: "https://github.com/ggml-org/llama.cpp/releases/download/b7956/llama-b7956-bin-win-cuda-12.4-x64.zip";
42
- readonly checksum: "3f8d62dcb542cdeb2213ead9a51dd1c33ddd497aa85039170b2a7e1b99931f01";
44
+ readonly url: "https://github.com/ggml-org/llama.cpp/releases/download/b9860/llama-b9860-bin-win-cuda-12.4-x64.zip";
45
+ readonly checksum: "70c433fcb55bcb0e0ff0d4a4fc5f02c11a14303445e0525b526071bccdc6c848";
43
46
  readonly dependencies: readonly [{
44
- readonly url: "https://github.com/ggml-org/llama.cpp/releases/download/b7956/cudart-llama-bin-win-cuda-12.4-x64.zip";
47
+ readonly url: "https://github.com/ggml-org/llama.cpp/releases/download/b9860/cudart-llama-bin-win-cuda-12.4-x64.zip";
45
48
  readonly checksum: "8c79a9b226de4b3cacfd1f83d24f962d0773be79f1e7b75c6af4ded7e32ae1d6";
46
49
  readonly description: "CUDA 12.4 runtime libraries required for NVIDIA GPU acceleration";
47
50
  }];
48
51
  }, {
49
52
  readonly type: BinaryVariant;
50
- readonly url: "https://github.com/ggml-org/llama.cpp/releases/download/b7956/llama-b7956-bin-win-vulkan-x64.zip";
51
- readonly checksum: "7a4caccf406540a647e636f1b750c09a3bd1aeee5ff7b257b3e91551b7b7c57b";
53
+ readonly url: "https://github.com/ggml-org/llama.cpp/releases/download/b9860/llama-b9860-bin-win-vulkan-x64.zip";
54
+ readonly checksum: "c3f0703c8fca8fa4cbc01a347d7180fca092e889fe693268bf1192fd07350c13";
52
55
  }, {
53
56
  readonly type: BinaryVariant;
54
- readonly url: "https://github.com/ggml-org/llama.cpp/releases/download/b7956/llama-b7956-bin-win-cpu-x64.zip";
55
- readonly checksum: "a092148f651e21d60b129bd6533e16e32b96a69da3573c79d5fcbeb4c149ea36";
57
+ readonly url: "https://github.com/ggml-org/llama.cpp/releases/download/b9860/llama-b9860-bin-win-cpu-x64.zip";
58
+ readonly checksum: "d33871623713345cd90b54e516ebada79039cab636e51b22c8c9feae72567837";
56
59
  }];
57
60
  readonly 'linux-x64': readonly [{
58
61
  readonly type: BinaryVariant;
59
- readonly url: "https://github.com/ggml-org/llama.cpp/releases/download/b7956/llama-b7956-bin-ubuntu-x64.tar.gz";
60
- readonly checksum: "a71ccffc351726f189cc3d532a414ba6130fe6814ca1f6563c9af3e7ae4de294";
62
+ readonly url: "https://github.com/ggml-org/llama.cpp/releases/download/b9860/llama-b9860-bin-ubuntu-vulkan-x64.tar.gz";
63
+ readonly checksum: "4aaa4ca2ed9f608cf26cb6ba0cdad9c5b8e8f2d1e95c4f04bb3fa9a1a8c86806";
61
64
  }, {
62
65
  readonly type: BinaryVariant;
63
- readonly url: "https://github.com/ggml-org/llama.cpp/releases/download/b7956/llama-b7956-bin-ubuntu-vulkan-x64.tar.gz";
64
- readonly checksum: "174ce7d23249b3911e7754433284ab3b7027ce8cdce7f5c040b60cc823b9b12e";
66
+ readonly url: "https://github.com/ggml-org/llama.cpp/releases/download/b9860/llama-b9860-bin-ubuntu-x64.tar.gz";
67
+ readonly checksum: "b68e8072eb88d1cc8b8e9d6ea8237aae87b34c6d8bbffda958c870e4dc949714";
65
68
  }];
66
69
  };
67
70
  };
68
71
  readonly diffusionCpp: {
69
- readonly version: "master-330-db6f479";
72
+ readonly version: "master-504-636d3cb";
70
73
  readonly variants: {
71
74
  readonly 'darwin-arm64': readonly [{
72
75
  readonly type: BinaryVariant;
73
- readonly url: "https://github.com/leejet/stable-diffusion.cpp/releases/download/master-330-db6f479/sd-master--bin-Darwin-macOS-15.6.1-arm64.zip";
74
- readonly checksum: "63be1220757cb895432847967c3e17dd1fbcac8abdd77c100bee46c7d1a7c2a2";
76
+ readonly url: "https://github.com/leejet/stable-diffusion.cpp/releases/download/master-504-636d3cb/sd-master-636d3cb-bin-Darwin-macOS-15.7.3-arm64.zip";
77
+ readonly checksum: "5053adb55137150b24a036c804329ec4063da32922b070fc800dbf785b819e63";
75
78
  }];
76
79
  readonly 'darwin-x64': readonly [];
77
80
  readonly 'win32-x64': readonly [{
78
81
  readonly type: BinaryVariant;
79
- readonly url: "https://github.com/leejet/stable-diffusion.cpp/releases/download/master-330-db6f479/sd-master-db6f479-bin-win-cuda12-x64.zip";
80
- readonly checksum: "5f15a0f08e2b34eaf8aa8b1bb50dd0b6a194bf21176ab9512ecacf0ccc8f1532";
82
+ readonly url: "https://github.com/leejet/stable-diffusion.cpp/releases/download/master-504-636d3cb/sd-master-636d3cb-bin-win-cuda12-x64.zip";
83
+ readonly checksum: "701dac9b0d7959daf20d56798c4791f750746aef568dd009eb3a1bc33d3ceec8";
81
84
  readonly dependencies: readonly [{
82
- readonly url: "https://github.com/leejet/stable-diffusion.cpp/releases/download/master-330-db6f479/cudart-sd-bin-win-cu12-x64.zip";
83
- readonly checksum: "cacc1f7e1e7b53ba310a6769893b8184de2afd5690aa2233d1416e84d3efccd6";
85
+ readonly url: "https://github.com/leejet/stable-diffusion.cpp/releases/download/master-504-636d3cb/cudart-sd-bin-win-cu12-x64.zip";
86
+ readonly checksum: "fe20366827d357c00797eebb58244dddab7fd9a348d70090c3871004c320f38d";
84
87
  readonly description: "CUDA 12 runtime libraries required for NVIDIA GPU acceleration";
85
88
  }];
86
89
  }, {
87
90
  readonly type: BinaryVariant;
88
- readonly url: "https://github.com/leejet/stable-diffusion.cpp/releases/download/master-330-db6f479/sd-master-db6f479-bin-win-vulkan-x64.zip";
89
- readonly checksum: "fbd737e427741d36abd5807b4b06920d0c4fa66423a0fc257e16586ed255621d";
91
+ readonly url: "https://github.com/leejet/stable-diffusion.cpp/releases/download/master-504-636d3cb/sd-master-636d3cb-bin-win-vulkan-x64.zip";
92
+ readonly checksum: "5d6481fab70e3836ac04beac209ad93590cf4d2433d68a449f0b03586c94b0ee";
90
93
  }, {
91
94
  readonly type: BinaryVariant;
92
- readonly url: "https://github.com/leejet/stable-diffusion.cpp/releases/download/master-330-db6f479/sd-master-db6f479-bin-win-avx2-x64.zip";
93
- readonly checksum: "908428c5f4e3743ceba5958157fc397c2a588acbf85d339ef0108a0a05611786";
95
+ readonly url: "https://github.com/leejet/stable-diffusion.cpp/releases/download/master-504-636d3cb/sd-master-636d3cb-bin-win-avx2-x64.zip";
96
+ readonly checksum: "d3c5f9ce9e78354ebf45590508e320416a430197957f74a60a8731151ea6a3bc";
94
97
  }];
95
98
  readonly 'linux-x64': readonly [{
96
99
  readonly type: BinaryVariant;
97
- readonly url: "https://github.com/leejet/stable-diffusion.cpp/releases/download/master-330-db6f479/sd-master--bin-Linux-Ubuntu-24.04-x86_64.zip";
98
- readonly checksum: "eb886cbd37cf927095255bc406858a5a131fcc141e04e68007be80a9156566c3";
100
+ readonly url: "https://github.com/leejet/stable-diffusion.cpp/releases/download/master-504-636d3cb/sd-master-636d3cb-bin-Linux-Ubuntu-24.04-x86_64.zip";
101
+ readonly checksum: "7485c413f4ac55c08d137a5a3ba31987067de830092f2cf0aed859235b1c6782";
99
102
  }];
100
103
  };
101
104
  };
102
105
  };
106
+ export declare const DIFFUSION_COMPONENT_FLAGS: Record<DiffusionComponentRole, string>;
107
+ export declare const DIFFUSION_COMPONENT_ORDER: readonly DiffusionComponentRole[];
103
108
  export declare const DIFFUSION_VRAM_THRESHOLDS: {
104
109
  readonly clipOnCpuHeadroomBytes: number;
105
110
  readonly vaeOnCpuHeadroomBytes: number;
106
111
  readonly modelOverheadMultiplier: 1.2;
107
112
  };
108
- export declare const HEALTH_CHECK_CONFIG: {
109
- readonly initialDelay: 500;
110
- readonly maxDelay: 5000;
111
- readonly backoffMultiplier: 1.5;
112
- readonly maxRetries: 10;
113
- };
114
- export declare const MODEL_SIZE_ESTIMATES: {
115
- readonly '7B': {
116
- readonly Q4_K_M: 4.4;
117
- readonly Q5_K_M: 5.2;
118
- readonly Q8_0: 7.2;
119
- };
120
- readonly '13B': {
121
- readonly Q4_K_M: 8.1;
122
- readonly Q5_K_M: 9.5;
123
- readonly Q8_0: 13.5;
124
- };
125
- readonly '70B': {
126
- readonly Q4_K_M: 41;
127
- readonly Q5_K_M: 48;
128
- };
129
- };
130
113
  export declare const RECOMMENDED_QUANTIZATIONS: {
131
114
  readonly quality: readonly ["Q8_0", "Q6_K", "Q5_K_M"];
132
115
  readonly balanced: readonly ["Q5_K_M", "Q4_K_M"];
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAKtD,eAAO,MAAM,aAAa;;;CAKhB,CAAC;AAKX,eAAO,MAAM,gBAAgB;;;;;CASnB,CAAC;AAMX,eAAO,MAAM,qBAAqB,EAAE,OAAO,CAAC,YAAY,CAM9C,CAAC;AAKX,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC;AAMhE,MAAM,WAAW,gBAAgB;IAE/B,GAAG,EAAE,MAAM,CAAC;IAEZ,QAAQ,EAAE,MAAM,CAAC;IAEjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAKD,MAAM,WAAW,mBAAmB;IAElC,IAAI,EAAE,aAA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AE,CAAC;CAC5C;AAWD,eAAO,MAAM,eAAe;;;;;+BAeD,aAAa;;;;;+BAOf,aAAa;;;;;+BAOZ,aAAa;;;;;;;;;+BAYX,aAAa;;;;+BAKhB,aAAa;;;;;+BAOV,aAAa;;;;+BAKhB,aAAa;;;;;;;;;;+BAeX,aAAa;;;;;;+BAWd,aAAa;;;;;;;;;+BAYX,aAAa;;;;+BAKhB,aAAa;;;;;+BAYb,aAAa;;;;;;CAO5B,CAAC;AAKX,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,sBAAsB,EAAE,MAAM,CAQ5E,CAAC;AAMF,eAAO,MAAM,yBAAyB,EAAE,SAAS,sBAAsB,EAQ7D,CAAC;AAUX,eAAO,MAAM,yBAAyB;;;;CAO5B,CAAC;AAKX,eAAO,MAAM,yBAAyB;;;;CAO5B,CAAC"}
@@ -4,43 +4,40 @@ export const DEFAULT_PORTS = {
4
4
  };
5
5
  export const DEFAULT_TIMEOUTS = {
6
6
  download: 300000,
7
- serverStart: 60000,
7
+ serverStart: 120000,
8
8
  serverStop: 10000,
9
9
  healthCheck: 5000,
10
10
  };
11
- export const DEFAULT_SERVER_CONFIG = {
12
- threads: -1,
13
- contextSize: 4096,
14
- gpuLayers: -1,
15
- parallelRequests: 4,
16
- flashAttention: false,
11
+ export const DEFAULT_LOG_ROTATION = {
12
+ maxFileSize: 5 * 1024 * 1024,
13
+ maxArchives: 2,
17
14
  };
18
15
  export const BINARY_VERSIONS = {
19
16
  llamaServer: {
20
- version: 'b7956',
17
+ version: 'b9860',
21
18
  variants: {
22
19
  'darwin-arm64': [
23
20
  {
24
21
  type: 'metal',
25
- url: 'https://github.com/ggml-org/llama.cpp/releases/download/b7956/llama-b7956-bin-macos-arm64.tar.gz',
26
- checksum: '3abe5f4ca01258759fe593331f4dc45e439b3bfaf1127b2061ed18bfa0f82960',
22
+ url: 'https://github.com/ggml-org/llama.cpp/releases/download/b9860/llama-b9860-bin-macos-arm64.tar.gz',
23
+ checksum: '35a2e8c3528adc71db5044e7ad7de8d8b96a4221e737958915e31538a005f1d9',
27
24
  },
28
25
  ],
29
26
  'darwin-x64': [
30
27
  {
31
28
  type: 'cpu',
32
- url: 'https://github.com/ggml-org/llama.cpp/releases/download/b7956/llama-b7956-bin-macos-x64.tar.gz',
33
- checksum: '6becaf739a2e1f58ac78da9c909eee932a25799a778ef1da3bfb6a42aeb2e7a8',
29
+ url: 'https://github.com/ggml-org/llama.cpp/releases/download/b9860/llama-b9860-bin-macos-x64.tar.gz',
30
+ checksum: 'd442123d5441c82b23b412a58d91e149f60723adfc20a7cc9df04a3908cb5113',
34
31
  },
35
32
  ],
36
33
  'win32-x64': [
37
34
  {
38
35
  type: 'cuda',
39
- url: 'https://github.com/ggml-org/llama.cpp/releases/download/b7956/llama-b7956-bin-win-cuda-12.4-x64.zip',
40
- checksum: '3f8d62dcb542cdeb2213ead9a51dd1c33ddd497aa85039170b2a7e1b99931f01',
36
+ url: 'https://github.com/ggml-org/llama.cpp/releases/download/b9860/llama-b9860-bin-win-cuda-12.4-x64.zip',
37
+ checksum: '70c433fcb55bcb0e0ff0d4a4fc5f02c11a14303445e0525b526071bccdc6c848',
41
38
  dependencies: [
42
39
  {
43
- url: 'https://github.com/ggml-org/llama.cpp/releases/download/b7956/cudart-llama-bin-win-cuda-12.4-x64.zip',
40
+ url: 'https://github.com/ggml-org/llama.cpp/releases/download/b9860/cudart-llama-bin-win-cuda-12.4-x64.zip',
44
41
  checksum: '8c79a9b226de4b3cacfd1f83d24f962d0773be79f1e7b75c6af4ded7e32ae1d6',
45
42
  description: 'CUDA 12.4 runtime libraries required for NVIDIA GPU acceleration',
46
43
  },
@@ -48,101 +45,97 @@ export const BINARY_VERSIONS = {
48
45
  },
49
46
  {
50
47
  type: 'vulkan',
51
- url: 'https://github.com/ggml-org/llama.cpp/releases/download/b7956/llama-b7956-bin-win-vulkan-x64.zip',
52
- checksum: '7a4caccf406540a647e636f1b750c09a3bd1aeee5ff7b257b3e91551b7b7c57b',
48
+ url: 'https://github.com/ggml-org/llama.cpp/releases/download/b9860/llama-b9860-bin-win-vulkan-x64.zip',
49
+ checksum: 'c3f0703c8fca8fa4cbc01a347d7180fca092e889fe693268bf1192fd07350c13',
53
50
  },
54
51
  {
55
52
  type: 'cpu',
56
- url: 'https://github.com/ggml-org/llama.cpp/releases/download/b7956/llama-b7956-bin-win-cpu-x64.zip',
57
- checksum: 'a092148f651e21d60b129bd6533e16e32b96a69da3573c79d5fcbeb4c149ea36',
53
+ url: 'https://github.com/ggml-org/llama.cpp/releases/download/b9860/llama-b9860-bin-win-cpu-x64.zip',
54
+ checksum: 'd33871623713345cd90b54e516ebada79039cab636e51b22c8c9feae72567837',
58
55
  },
59
56
  ],
60
57
  'linux-x64': [
61
58
  {
62
- type: 'cuda',
63
- url: 'https://github.com/ggml-org/llama.cpp/releases/download/b7956/llama-b7956-bin-ubuntu-x64.tar.gz',
64
- checksum: 'a71ccffc351726f189cc3d532a414ba6130fe6814ca1f6563c9af3e7ae4de294',
59
+ type: 'vulkan',
60
+ url: 'https://github.com/ggml-org/llama.cpp/releases/download/b9860/llama-b9860-bin-ubuntu-vulkan-x64.tar.gz',
61
+ checksum: '4aaa4ca2ed9f608cf26cb6ba0cdad9c5b8e8f2d1e95c4f04bb3fa9a1a8c86806',
65
62
  },
66
63
  {
67
- type: 'vulkan',
68
- url: 'https://github.com/ggml-org/llama.cpp/releases/download/b7956/llama-b7956-bin-ubuntu-vulkan-x64.tar.gz',
69
- checksum: '174ce7d23249b3911e7754433284ab3b7027ce8cdce7f5c040b60cc823b9b12e',
64
+ type: 'cpu',
65
+ url: 'https://github.com/ggml-org/llama.cpp/releases/download/b9860/llama-b9860-bin-ubuntu-x64.tar.gz',
66
+ checksum: 'b68e8072eb88d1cc8b8e9d6ea8237aae87b34c6d8bbffda958c870e4dc949714',
70
67
  },
71
68
  ],
72
69
  },
73
70
  },
74
71
  diffusionCpp: {
75
- version: 'master-330-db6f479',
72
+ version: 'master-504-636d3cb',
76
73
  variants: {
77
74
  'darwin-arm64': [
78
75
  {
79
76
  type: 'metal',
80
- url: 'https://github.com/leejet/stable-diffusion.cpp/releases/download/master-330-db6f479/sd-master--bin-Darwin-macOS-15.6.1-arm64.zip',
81
- checksum: '63be1220757cb895432847967c3e17dd1fbcac8abdd77c100bee46c7d1a7c2a2',
77
+ url: 'https://github.com/leejet/stable-diffusion.cpp/releases/download/master-504-636d3cb/sd-master-636d3cb-bin-Darwin-macOS-15.7.3-arm64.zip',
78
+ checksum: '5053adb55137150b24a036c804329ec4063da32922b070fc800dbf785b819e63',
82
79
  },
83
80
  ],
84
81
  'darwin-x64': [],
85
82
  'win32-x64': [
86
83
  {
87
84
  type: 'cuda',
88
- url: 'https://github.com/leejet/stable-diffusion.cpp/releases/download/master-330-db6f479/sd-master-db6f479-bin-win-cuda12-x64.zip',
89
- checksum: '5f15a0f08e2b34eaf8aa8b1bb50dd0b6a194bf21176ab9512ecacf0ccc8f1532',
85
+ url: 'https://github.com/leejet/stable-diffusion.cpp/releases/download/master-504-636d3cb/sd-master-636d3cb-bin-win-cuda12-x64.zip',
86
+ checksum: '701dac9b0d7959daf20d56798c4791f750746aef568dd009eb3a1bc33d3ceec8',
90
87
  dependencies: [
91
88
  {
92
- url: 'https://github.com/leejet/stable-diffusion.cpp/releases/download/master-330-db6f479/cudart-sd-bin-win-cu12-x64.zip',
93
- checksum: 'cacc1f7e1e7b53ba310a6769893b8184de2afd5690aa2233d1416e84d3efccd6',
89
+ url: 'https://github.com/leejet/stable-diffusion.cpp/releases/download/master-504-636d3cb/cudart-sd-bin-win-cu12-x64.zip',
90
+ checksum: 'fe20366827d357c00797eebb58244dddab7fd9a348d70090c3871004c320f38d',
94
91
  description: 'CUDA 12 runtime libraries required for NVIDIA GPU acceleration',
95
92
  },
96
93
  ],
97
94
  },
98
95
  {
99
96
  type: 'vulkan',
100
- url: 'https://github.com/leejet/stable-diffusion.cpp/releases/download/master-330-db6f479/sd-master-db6f479-bin-win-vulkan-x64.zip',
101
- checksum: 'fbd737e427741d36abd5807b4b06920d0c4fa66423a0fc257e16586ed255621d',
97
+ url: 'https://github.com/leejet/stable-diffusion.cpp/releases/download/master-504-636d3cb/sd-master-636d3cb-bin-win-vulkan-x64.zip',
98
+ checksum: '5d6481fab70e3836ac04beac209ad93590cf4d2433d68a449f0b03586c94b0ee',
102
99
  },
103
100
  {
104
101
  type: 'cpu',
105
- url: 'https://github.com/leejet/stable-diffusion.cpp/releases/download/master-330-db6f479/sd-master-db6f479-bin-win-avx2-x64.zip',
106
- checksum: '908428c5f4e3743ceba5958157fc397c2a588acbf85d339ef0108a0a05611786',
102
+ url: 'https://github.com/leejet/stable-diffusion.cpp/releases/download/master-504-636d3cb/sd-master-636d3cb-bin-win-avx2-x64.zip',
103
+ checksum: 'd3c5f9ce9e78354ebf45590508e320416a430197957f74a60a8731151ea6a3bc',
107
104
  },
108
105
  ],
109
106
  'linux-x64': [
110
107
  {
111
108
  type: 'cpu',
112
- url: 'https://github.com/leejet/stable-diffusion.cpp/releases/download/master-330-db6f479/sd-master--bin-Linux-Ubuntu-24.04-x86_64.zip',
113
- checksum: 'eb886cbd37cf927095255bc406858a5a131fcc141e04e68007be80a9156566c3',
109
+ url: 'https://github.com/leejet/stable-diffusion.cpp/releases/download/master-504-636d3cb/sd-master-636d3cb-bin-Linux-Ubuntu-24.04-x86_64.zip',
110
+ checksum: '7485c413f4ac55c08d137a5a3ba31987067de830092f2cf0aed859235b1c6782',
114
111
  },
115
112
  ],
116
113
  },
117
114
  },
118
115
  };
116
+ export const DIFFUSION_COMPONENT_FLAGS = {
117
+ diffusion_model: '--diffusion-model',
118
+ clip_l: '--clip_l',
119
+ clip_g: '--clip_g',
120
+ t5xxl: '--t5xxl',
121
+ llm: '--llm',
122
+ llm_vision: '--llm_vision',
123
+ vae: '--vae',
124
+ };
125
+ export const DIFFUSION_COMPONENT_ORDER = [
126
+ 'diffusion_model',
127
+ 'clip_l',
128
+ 'clip_g',
129
+ 't5xxl',
130
+ 'llm',
131
+ 'llm_vision',
132
+ 'vae',
133
+ ];
119
134
  export const DIFFUSION_VRAM_THRESHOLDS = {
120
135
  clipOnCpuHeadroomBytes: 6 * 1024 ** 3,
121
136
  vaeOnCpuHeadroomBytes: 2 * 1024 ** 3,
122
137
  modelOverheadMultiplier: 1.2,
123
138
  };
124
- export const HEALTH_CHECK_CONFIG = {
125
- initialDelay: 500,
126
- maxDelay: 5000,
127
- backoffMultiplier: 1.5,
128
- maxRetries: 10,
129
- };
130
- export const MODEL_SIZE_ESTIMATES = {
131
- '7B': {
132
- Q4_K_M: 4.4,
133
- Q5_K_M: 5.2,
134
- Q8_0: 7.2,
135
- },
136
- '13B': {
137
- Q4_K_M: 8.1,
138
- Q5_K_M: 9.5,
139
- Q8_0: 13.5,
140
- },
141
- '70B': {
142
- Q4_K_M: 41.0,
143
- Q5_K_M: 48.0,
144
- },
145
- };
146
139
  export const RECOMMENDED_QUANTIZATIONS = {
147
140
  quality: ['Q8_0', 'Q6_K', 'Q5_K_M'],
148
141
  balanced: ['Q5_K_M', 'Q4_K_M'],
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,MAAM,aAAa,GAAG;IAE3B,KAAK,EAAE,IAAI;IAEX,SAAS,EAAE,IAAI;CACP,CAAC;AAKX,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAE9B,QAAQ,EAAE,MAAM;IAEhB,WAAW,EAAE,KAAK;IAElB,UAAU,EAAE,KAAK;IAEjB,WAAW,EAAE,IAAI;CACT,CAAC;AAMX,MAAM,CAAC,MAAM,qBAAqB,GAA0B;IAC1D,OAAO,EAAE,CAAC,CAAC;IACX,WAAW,EAAE,IAAI;IACjB,SAAS,EAAE,CAAC,CAAC;IACb,gBAAgB,EAAE,CAAC;IACnB,cAAc,EAAE,KAAK;CACb,CAAC;AA2CX,MAAM,CAAC,MAAM,eAAe,GAAG;IAE7B,WAAW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,EAAE,UAAU;IAClB,MAAM,EAAE,UAAU;IAClB,KAAK,EAAE,SAAS;IAChB,GAAG,EAAE,OAAO;IACZ,UAAU,EAAE,cAAc;IAC1B,GAAG,EAAE,OAAO;CACb,CAAC;AAMF,MAAM,CAAC,MAAM,yBAAyB,GAAsC;IAC1E,iBAAiB;IACjB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,YAAY;IACZ,KAAK;CACG,CAAC;AAUX,MAAM,CAAC,MAAM,yBAAyB,GAAG;IAEvC,sBAAsB,EAAE,CAAC,GAAG,IAAI,IAAI,CAAC;IAErC,qBAAqB,EAAE,CAAC,GAAG,IAAI,IAAI,CAAC;IAEpC,uBAAuB,EAAE,GAAG;CACpB,CAAC;AAKX,MAAM,CAAC,MAAM,yBAAyB,GAAG;IAEvC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC;IAEnC,QAAQ,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAE9B,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC;CAC/B,CAAC"}
@@ -13,6 +13,7 @@ export declare const PATHS: {
13
13
  readonly temp: string;
14
14
  };
15
15
  export declare function ensureDirectories(): Promise<void>;
16
+ export declare function getModelDirectory(type: 'llm' | 'diffusion', modelId: string): string;
16
17
  export declare function getModelMetadataPath(type: 'llm' | 'diffusion', modelId: string): string;
17
18
  export declare function getModelFilePath(type: 'llm' | 'diffusion', filename: string): string;
18
19
  export declare function getBinaryPath(type: 'llama' | 'diffusion', binaryName: string): string;
@@ -1 +1 @@
1
- {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/config/paths.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,QAAQ,QAA0B,CAAC;AAKhD,eAAO,MAAM,KAAK;;;;;;;;;;;;CAqBR,CAAC;AAcX,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAYvD;AAeD,wBAAgB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