@qvac/sdk 0.8.3 → 0.9.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/NOTICE +267 -63
- package/README.md +1 -1
- package/dist/client/api/diffusion.d.ts +32 -0
- package/dist/client/api/diffusion.js +103 -0
- package/dist/client/api/embed.d.ts +9 -3
- package/dist/client/api/embed.js +4 -1
- package/dist/client/api/finetune.d.ts +69 -0
- package/dist/client/api/finetune.js +139 -0
- package/dist/client/api/get-model-info.d.ts +1 -1
- package/dist/client/api/index.d.ts +4 -0
- package/dist/client/api/index.js +4 -0
- package/dist/client/api/rag.d.ts +1 -1
- package/dist/client/api/rag.js +1 -1
- package/dist/client/api/resume.d.ts +14 -0
- package/dist/client/api/resume.js +20 -0
- package/dist/client/api/suspend.d.ts +13 -0
- package/dist/client/api/suspend.js +19 -0
- package/dist/client/api/transcribe.d.ts +25 -17
- package/dist/client/api/transcribe.js +115 -35
- package/dist/client/rpc/bare-client.d.ts +5 -1
- package/dist/client/rpc/bare-client.js +70 -57
- package/dist/client/rpc/expo-rpc-client.d.ts +4 -0
- package/dist/client/rpc/expo-rpc-client.js +8 -0
- package/dist/client/rpc/node-rpc-client.d.ts +4 -0
- package/dist/client/rpc/node-rpc-client.js +8 -0
- package/dist/client/rpc/rpc-client.d.ts +13 -0
- package/dist/client/rpc/rpc-client.js +131 -1
- package/dist/examples/delegated-inference/composite.d.ts +2 -0
- package/dist/examples/delegated-inference/composite.js +99 -0
- package/dist/examples/diffusion-flux2-klein.d.ts +2 -0
- package/dist/examples/diffusion-flux2-klein.js +46 -0
- package/dist/examples/diffusion-simple.d.ts +2 -0
- package/dist/examples/diffusion-simple.js +17 -0
- package/dist/examples/diffusion-txt2img.d.ts +2 -0
- package/dist/examples/diffusion-txt2img.js +40 -0
- package/dist/examples/embed-p2p.js +2 -2
- package/dist/examples/finetune/llamacpp-finetune.d.ts +2 -0
- package/dist/examples/finetune/llamacpp-finetune.js +78 -0
- package/dist/examples/logging-streaming.js +1 -1
- package/dist/examples/mcp-websearch.js +2 -0
- package/dist/examples/ocr-fasttext.js +11 -0
- package/dist/examples/profiling/per-call.js +3 -3
- package/dist/examples/rag/rag-chromadb.js +2 -2
- package/dist/examples/rag/rag-hyperdb/pipeline.js +1 -1
- package/dist/examples/rag/rag-lancedb.js +2 -2
- package/dist/examples/rag/rag-sqlite.js +2 -2
- package/dist/examples/suspend-resume.d.ts +2 -0
- package/dist/examples/suspend-resume.js +52 -0
- package/dist/examples/transcription/parakeet-ctc-filesystem.js +3 -5
- package/dist/examples/transcription/parakeet-microphone-record.js +42 -33
- package/dist/examples/transcription/parakeet-sortformer.js +13 -3
- package/dist/examples/transcription/parakeet-tdt-filesystem.js +5 -7
- package/dist/examples/transcription/whispercpp-filesystem-streaming.d.ts +2 -0
- package/dist/examples/transcription/whispercpp-filesystem-streaming.js +99 -0
- package/dist/examples/transcription/whispercpp-microphone-record.js +78 -299
- package/dist/examples/transcription/whispercpp-prompt.js +11 -0
- package/dist/examples/translation/translation-llm.js +2 -2
- package/dist/examples/tts/supertonic-multilingual.d.ts +2 -0
- package/dist/examples/tts/supertonic-multilingual.js +56 -0
- package/dist/examples/tts/supertonic.js +12 -7
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -2
- package/dist/logging/utils.js +1 -1
- package/dist/models/registry/models.d.ts +15176 -4264
- package/dist/models/registry/models.js +18657 -7404
- package/dist/models/update-models/codegen.js +2 -2
- package/dist/models/update-models/naming.js +26 -0
- package/dist/pear/pre.js +2 -0
- package/dist/polyfills/bare-globals.d.ts +2 -0
- package/dist/polyfills/bare-globals.js +4 -0
- package/dist/polyfills/bare-globals.noop.d.ts +2 -0
- package/dist/polyfills/bare-globals.noop.js +1 -0
- package/dist/profiling/exporters.js +16 -11
- package/dist/profiling/model-execution.d.ts +16 -0
- package/dist/profiling/model-execution.js +33 -0
- package/dist/schemas/common.d.ts +967 -198
- package/dist/schemas/common.js +16 -1
- package/dist/schemas/completion-stream.d.ts +14 -6
- package/dist/schemas/completion-stream.js +4 -3
- package/dist/schemas/download-asset.d.ts +7 -3
- package/dist/schemas/embed.d.ts +19 -0
- package/dist/schemas/embed.js +7 -0
- package/dist/schemas/engine-addon-map.js +4 -1
- package/dist/schemas/finetune.d.ts +620 -0
- package/dist/schemas/finetune.js +161 -0
- package/dist/schemas/get-model-info.d.ts +2 -0
- package/dist/schemas/get-model-info.js +1 -0
- package/dist/schemas/index.d.ts +5 -1
- package/dist/schemas/index.js +5 -1
- package/dist/schemas/llamacpp-config.d.ts +26 -6
- package/dist/schemas/llamacpp-config.js +12 -0
- package/dist/schemas/load-model.d.ts +4005 -1400
- package/dist/schemas/load-model.js +34 -1
- package/dist/schemas/model-src-utils.d.ts +10 -2
- package/dist/schemas/model-types.d.ts +19 -1
- package/dist/schemas/model-types.js +11 -0
- package/dist/schemas/ocr.d.ts +2 -0
- package/dist/schemas/plugin.d.ts +24 -3
- package/dist/schemas/plugin.js +14 -0
- package/dist/schemas/profiling.d.ts +4 -0
- package/dist/schemas/profiling.js +4 -0
- package/dist/schemas/registry.d.ts +18 -0
- package/dist/schemas/registry.js +2 -0
- package/dist/schemas/reload-config.d.ts +9 -1
- package/dist/schemas/resume.d.ts +10 -0
- package/dist/schemas/resume.js +7 -0
- package/dist/schemas/sdcpp-config.d.ts +327 -0
- package/dist/schemas/sdcpp-config.js +102 -0
- package/dist/schemas/sdk-config.d.ts +1225 -235
- package/dist/schemas/sdk-config.js +4 -0
- package/dist/schemas/sdk-errors-server.d.ts +2 -0
- package/dist/schemas/sdk-errors-server.js +12 -0
- package/dist/schemas/suspend.d.ts +10 -0
- package/dist/schemas/suspend.js +7 -0
- package/dist/schemas/text-to-speech.d.ts +187 -10
- package/dist/schemas/text-to-speech.js +12 -4
- package/dist/schemas/transcription-config.d.ts +16 -56
- package/dist/schemas/transcription-config.js +0 -2
- package/dist/schemas/transcription.d.ts +66 -6
- package/dist/schemas/transcription.js +29 -7
- package/dist/schemas/translate.d.ts +14 -4
- package/dist/schemas/translate.js +10 -2
- package/dist/schemas/translation-config.d.ts +30 -10
- package/dist/server/bare/delegate-rpc-client.js +3 -3
- package/dist/server/bare/hyperswarm.js +15 -3
- package/dist/server/bare/ops/embed.d.ts +8 -4
- package/dist/server/bare/ops/embed.js +15 -4
- package/dist/server/bare/ops/transcribe.d.ts +6 -2
- package/dist/server/bare/ops/transcribe.js +53 -1
- package/dist/server/bare/ops/translate.d.ts +4 -1
- package/dist/server/bare/ops/translate.js +28 -65
- package/dist/server/bare/ops/unload-model.js +2 -0
- package/dist/server/bare/plugins/index.d.ts +1 -0
- package/dist/server/bare/plugins/index.js +1 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.d.ts +3 -1
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.js +45 -9
- package/dist/server/bare/plugins/llamacpp-completion/ops/finetune.d.ts +11 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/finetune.js +112 -0
- package/dist/server/bare/plugins/llamacpp-completion/plugin.d.ts +175 -5
- package/dist/server/bare/plugins/llamacpp-completion/plugin.js +45 -35
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.d.ts +11 -1
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.js +9 -4
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.d.ts +17 -2
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.js +16 -15
- package/dist/server/bare/plugins/onnx-ocr/ops/ocr-stream.d.ts +5 -7
- package/dist/server/bare/plugins/onnx-ocr/ops/ocr-stream.js +11 -3
- package/dist/server/bare/plugins/onnx-ocr/plugin.d.ts +2 -0
- package/dist/server/bare/plugins/onnx-ocr/plugin.js +24 -19
- package/dist/server/bare/plugins/onnx-tts/ops/text-to-speech.d.ts +7 -2
- package/dist/server/bare/plugins/onnx-tts/ops/text-to-speech.js +22 -97
- package/dist/server/bare/plugins/onnx-tts/plugin.d.ts +98 -9
- package/dist/server/bare/plugins/onnx-tts/plugin.js +85 -46
- package/dist/server/bare/plugins/parakeet-transcription/plugin.d.ts +30 -60
- package/dist/server/bare/plugins/parakeet-transcription/plugin.js +49 -37
- package/dist/server/bare/plugins/sdcpp-generation/ops/diffusion.d.ts +3 -0
- package/dist/server/bare/plugins/sdcpp-generation/ops/diffusion.js +51 -0
- package/dist/server/bare/plugins/sdcpp-generation/plugin.d.ts +278 -0
- package/dist/server/bare/plugins/sdcpp-generation/plugin.js +70 -0
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.d.ts +38 -2
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.js +43 -22
- package/dist/server/bare/rag-hyperdb/handlers/ingest.js +2 -1
- package/dist/server/bare/rag-hyperdb/handlers/search.js +2 -1
- package/dist/server/bare/rag-hyperdb/rag-workspace-manager.js +7 -0
- package/dist/server/bare/registry/model-config-utils.js +3 -0
- package/dist/server/bare/registry/model-registry.d.ts +2 -2
- package/dist/server/bare/registry/model-registry.js +1 -1
- package/dist/server/bare/registry/registry-client.js +21 -0
- package/dist/server/bare/runtime-lifecycle.d.ts +28 -0
- package/dist/server/bare/runtime-lifecycle.js +132 -0
- package/dist/server/bare/types/addon-responses.d.ts +62 -0
- package/dist/server/bare/types/addon-responses.js +1 -0
- package/dist/server/env.js +3 -1
- package/dist/server/rpc/delegate-transport.js +1 -1
- package/dist/server/rpc/handle-request.js +50 -4
- package/dist/server/rpc/handler-registry.js +20 -1
- package/dist/server/rpc/handler-utils.d.ts +5 -3
- package/dist/server/rpc/handler-utils.js +52 -50
- package/dist/server/rpc/handlers/delete-cache.js +3 -0
- package/dist/server/rpc/handlers/diffusion-stream.d.ts +3 -0
- package/dist/server/rpc/handlers/diffusion-stream.js +4 -0
- package/dist/server/rpc/handlers/finetune.d.ts +3 -0
- package/dist/server/rpc/handlers/finetune.js +16 -0
- package/dist/server/rpc/handlers/index.d.ts +10 -0
- package/dist/server/rpc/handlers/index.js +10 -0
- package/dist/server/rpc/handlers/load-model/hyperdrive.js +24 -9
- package/dist/server/rpc/handlers/load-model/registry.d.ts +11 -0
- package/dist/server/rpc/handlers/load-model/registry.js +31 -4
- package/dist/server/rpc/handlers/plugin-dispatch.d.ts +1 -13
- package/dist/server/rpc/handlers/plugin-dispatch.js +21 -21
- package/dist/server/rpc/handlers/resume.d.ts +3 -0
- package/dist/server/rpc/handlers/resume.js +11 -0
- package/dist/server/rpc/handlers/suspend.d.ts +3 -0
- package/dist/server/rpc/handlers/suspend.js +11 -0
- package/dist/server/rpc/handlers/transcribe-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/transcribe-stream.js +2 -2
- package/dist/server/rpc/handlers/transcribe.d.ts +3 -0
- package/dist/server/rpc/handlers/transcribe.js +4 -0
- package/dist/server/rpc/profiling/operation-metrics.js +107 -16
- package/dist/server/rpc/profiling/operation-wrappers.d.ts +1 -1
- package/dist/server/rpc/profiling/operation-wrappers.js +51 -19
- package/dist/server/rpc/progress-throttle.d.ts +8 -0
- package/dist/server/rpc/progress-throttle.js +47 -0
- package/dist/server/rpc/rpc-utils.d.ts +5 -0
- package/dist/server/rpc/rpc-utils.js +11 -0
- package/dist/server/utils/path-security.js +1 -1
- package/dist/server/utils/tool-integration.js +10 -0
- package/dist/server/utils/tool-parser.js +9 -5
- package/dist/server/worker-core.d.ts +2 -0
- package/dist/server/worker-core.js +26 -23
- package/dist/server/worker.js +2 -1
- package/dist/utils/encoding.d.ts +9 -0
- package/dist/utils/encoding.js +14 -0
- package/dist/utils/errors-server.d.ts +6 -0
- package/dist/utils/errors-server.js +11 -0
- package/package.json +36 -25
- package/dist/server/rpc/delegate-utils.d.ts +0 -2
- package/dist/server/rpc/delegate-utils.js +0 -5
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const resumeRequestSchema: z.ZodObject<{
|
|
3
|
+
type: z.ZodLiteral<"resume">;
|
|
4
|
+
}, z.core.$strip>;
|
|
5
|
+
export declare const resumeResponseSchema: z.ZodObject<{
|
|
6
|
+
type: z.ZodLiteral<"resume">;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export type ResumeRequest = z.infer<typeof resumeRequestSchema>;
|
|
9
|
+
export type ResumeResponse = z.infer<typeof resumeResponseSchema>;
|
|
10
|
+
//# sourceMappingURL=resume.d.ts.map
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const sdcppConfigSchema: z.ZodObject<{
|
|
3
|
+
threads: z.ZodOptional<z.ZodNumber>;
|
|
4
|
+
device: z.ZodOptional<z.ZodEnum<{
|
|
5
|
+
cpu: "cpu";
|
|
6
|
+
gpu: "gpu";
|
|
7
|
+
}>>;
|
|
8
|
+
prediction: z.ZodOptional<z.ZodEnum<{
|
|
9
|
+
auto: "auto";
|
|
10
|
+
eps: "eps";
|
|
11
|
+
v: "v";
|
|
12
|
+
edm_v: "edm_v";
|
|
13
|
+
flow: "flow";
|
|
14
|
+
flux_flow: "flux_flow";
|
|
15
|
+
flux2_flow: "flux2_flow";
|
|
16
|
+
}>>;
|
|
17
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
18
|
+
auto: "auto";
|
|
19
|
+
f32: "f32";
|
|
20
|
+
f16: "f16";
|
|
21
|
+
bf16: "bf16";
|
|
22
|
+
q2_k: "q2_k";
|
|
23
|
+
q3_k: "q3_k";
|
|
24
|
+
q4_0: "q4_0";
|
|
25
|
+
q4_1: "q4_1";
|
|
26
|
+
q4_k: "q4_k";
|
|
27
|
+
q5_0: "q5_0";
|
|
28
|
+
q5_1: "q5_1";
|
|
29
|
+
q5_k: "q5_k";
|
|
30
|
+
q6_k: "q6_k";
|
|
31
|
+
q8_0: "q8_0";
|
|
32
|
+
}>>;
|
|
33
|
+
rng: z.ZodOptional<z.ZodEnum<{
|
|
34
|
+
cpu: "cpu";
|
|
35
|
+
cuda: "cuda";
|
|
36
|
+
std_default: "std_default";
|
|
37
|
+
}>>;
|
|
38
|
+
sampler_rng: z.ZodOptional<z.ZodEnum<{
|
|
39
|
+
cpu: "cpu";
|
|
40
|
+
cuda: "cuda";
|
|
41
|
+
std_default: "std_default";
|
|
42
|
+
}>>;
|
|
43
|
+
clip_on_cpu: z.ZodOptional<z.ZodBoolean>;
|
|
44
|
+
vae_on_cpu: z.ZodOptional<z.ZodBoolean>;
|
|
45
|
+
vae_tiling: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
+
flash_attn: z.ZodOptional<z.ZodBoolean>;
|
|
47
|
+
verbosity: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
clipLModelSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
49
|
+
src: z.ZodString;
|
|
50
|
+
name: z.ZodOptional<z.ZodString>;
|
|
51
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
52
|
+
registryPath: z.ZodOptional<z.ZodString>;
|
|
53
|
+
registrySource: z.ZodOptional<z.ZodString>;
|
|
54
|
+
blobCoreKey: z.ZodOptional<z.ZodString>;
|
|
55
|
+
blobIndex: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
57
|
+
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
58
|
+
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
59
|
+
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
60
|
+
"llamacpp-completion": "llamacpp-completion";
|
|
61
|
+
"whispercpp-transcription": "whispercpp-transcription";
|
|
62
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
63
|
+
"nmtcpp-translation": "nmtcpp-translation";
|
|
64
|
+
"onnx-tts": "onnx-tts";
|
|
65
|
+
"parakeet-transcription": "parakeet-transcription";
|
|
66
|
+
"onnx-ocr": "onnx-ocr";
|
|
67
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
68
|
+
llm: "llm";
|
|
69
|
+
whisper: "whisper";
|
|
70
|
+
embeddings: "embeddings";
|
|
71
|
+
nmt: "nmt";
|
|
72
|
+
parakeet: "parakeet";
|
|
73
|
+
tts: "tts";
|
|
74
|
+
ocr: "ocr";
|
|
75
|
+
diffusion: "diffusion";
|
|
76
|
+
}>, z.ZodLiteral<"vad">]>>;
|
|
77
|
+
}, z.core.$strip>]>>;
|
|
78
|
+
clipGModelSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
79
|
+
src: z.ZodString;
|
|
80
|
+
name: z.ZodOptional<z.ZodString>;
|
|
81
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
82
|
+
registryPath: z.ZodOptional<z.ZodString>;
|
|
83
|
+
registrySource: z.ZodOptional<z.ZodString>;
|
|
84
|
+
blobCoreKey: z.ZodOptional<z.ZodString>;
|
|
85
|
+
blobIndex: z.ZodOptional<z.ZodNumber>;
|
|
86
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
87
|
+
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
88
|
+
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
89
|
+
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
90
|
+
"llamacpp-completion": "llamacpp-completion";
|
|
91
|
+
"whispercpp-transcription": "whispercpp-transcription";
|
|
92
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
93
|
+
"nmtcpp-translation": "nmtcpp-translation";
|
|
94
|
+
"onnx-tts": "onnx-tts";
|
|
95
|
+
"parakeet-transcription": "parakeet-transcription";
|
|
96
|
+
"onnx-ocr": "onnx-ocr";
|
|
97
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
98
|
+
llm: "llm";
|
|
99
|
+
whisper: "whisper";
|
|
100
|
+
embeddings: "embeddings";
|
|
101
|
+
nmt: "nmt";
|
|
102
|
+
parakeet: "parakeet";
|
|
103
|
+
tts: "tts";
|
|
104
|
+
ocr: "ocr";
|
|
105
|
+
diffusion: "diffusion";
|
|
106
|
+
}>, z.ZodLiteral<"vad">]>>;
|
|
107
|
+
}, z.core.$strip>]>>;
|
|
108
|
+
t5XxlModelSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
109
|
+
src: z.ZodString;
|
|
110
|
+
name: z.ZodOptional<z.ZodString>;
|
|
111
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
112
|
+
registryPath: z.ZodOptional<z.ZodString>;
|
|
113
|
+
registrySource: z.ZodOptional<z.ZodString>;
|
|
114
|
+
blobCoreKey: z.ZodOptional<z.ZodString>;
|
|
115
|
+
blobIndex: z.ZodOptional<z.ZodNumber>;
|
|
116
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
117
|
+
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
119
|
+
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
120
|
+
"llamacpp-completion": "llamacpp-completion";
|
|
121
|
+
"whispercpp-transcription": "whispercpp-transcription";
|
|
122
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
123
|
+
"nmtcpp-translation": "nmtcpp-translation";
|
|
124
|
+
"onnx-tts": "onnx-tts";
|
|
125
|
+
"parakeet-transcription": "parakeet-transcription";
|
|
126
|
+
"onnx-ocr": "onnx-ocr";
|
|
127
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
128
|
+
llm: "llm";
|
|
129
|
+
whisper: "whisper";
|
|
130
|
+
embeddings: "embeddings";
|
|
131
|
+
nmt: "nmt";
|
|
132
|
+
parakeet: "parakeet";
|
|
133
|
+
tts: "tts";
|
|
134
|
+
ocr: "ocr";
|
|
135
|
+
diffusion: "diffusion";
|
|
136
|
+
}>, z.ZodLiteral<"vad">]>>;
|
|
137
|
+
}, z.core.$strip>]>>;
|
|
138
|
+
llmModelSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
139
|
+
src: z.ZodString;
|
|
140
|
+
name: z.ZodOptional<z.ZodString>;
|
|
141
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
142
|
+
registryPath: z.ZodOptional<z.ZodString>;
|
|
143
|
+
registrySource: z.ZodOptional<z.ZodString>;
|
|
144
|
+
blobCoreKey: z.ZodOptional<z.ZodString>;
|
|
145
|
+
blobIndex: z.ZodOptional<z.ZodNumber>;
|
|
146
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
147
|
+
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
148
|
+
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
149
|
+
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
150
|
+
"llamacpp-completion": "llamacpp-completion";
|
|
151
|
+
"whispercpp-transcription": "whispercpp-transcription";
|
|
152
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
153
|
+
"nmtcpp-translation": "nmtcpp-translation";
|
|
154
|
+
"onnx-tts": "onnx-tts";
|
|
155
|
+
"parakeet-transcription": "parakeet-transcription";
|
|
156
|
+
"onnx-ocr": "onnx-ocr";
|
|
157
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
158
|
+
llm: "llm";
|
|
159
|
+
whisper: "whisper";
|
|
160
|
+
embeddings: "embeddings";
|
|
161
|
+
nmt: "nmt";
|
|
162
|
+
parakeet: "parakeet";
|
|
163
|
+
tts: "tts";
|
|
164
|
+
ocr: "ocr";
|
|
165
|
+
diffusion: "diffusion";
|
|
166
|
+
}>, z.ZodLiteral<"vad">]>>;
|
|
167
|
+
}, z.core.$strip>]>>;
|
|
168
|
+
vaeModelSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
169
|
+
src: z.ZodString;
|
|
170
|
+
name: z.ZodOptional<z.ZodString>;
|
|
171
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
172
|
+
registryPath: z.ZodOptional<z.ZodString>;
|
|
173
|
+
registrySource: z.ZodOptional<z.ZodString>;
|
|
174
|
+
blobCoreKey: z.ZodOptional<z.ZodString>;
|
|
175
|
+
blobIndex: z.ZodOptional<z.ZodNumber>;
|
|
176
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
177
|
+
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
178
|
+
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
179
|
+
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
180
|
+
"llamacpp-completion": "llamacpp-completion";
|
|
181
|
+
"whispercpp-transcription": "whispercpp-transcription";
|
|
182
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
183
|
+
"nmtcpp-translation": "nmtcpp-translation";
|
|
184
|
+
"onnx-tts": "onnx-tts";
|
|
185
|
+
"parakeet-transcription": "parakeet-transcription";
|
|
186
|
+
"onnx-ocr": "onnx-ocr";
|
|
187
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
188
|
+
llm: "llm";
|
|
189
|
+
whisper: "whisper";
|
|
190
|
+
embeddings: "embeddings";
|
|
191
|
+
nmt: "nmt";
|
|
192
|
+
parakeet: "parakeet";
|
|
193
|
+
tts: "tts";
|
|
194
|
+
ocr: "ocr";
|
|
195
|
+
diffusion: "diffusion";
|
|
196
|
+
}>, z.ZodLiteral<"vad">]>>;
|
|
197
|
+
}, z.core.$strip>]>>;
|
|
198
|
+
}, z.core.$strip>;
|
|
199
|
+
export type SdcppConfig = z.infer<typeof sdcppConfigSchema>;
|
|
200
|
+
export declare const diffusionStatsSchema: z.ZodObject<{
|
|
201
|
+
modelLoadMs: z.ZodOptional<z.ZodNumber>;
|
|
202
|
+
generationMs: z.ZodOptional<z.ZodNumber>;
|
|
203
|
+
totalGenerationMs: z.ZodOptional<z.ZodNumber>;
|
|
204
|
+
totalWallMs: z.ZodOptional<z.ZodNumber>;
|
|
205
|
+
totalSteps: z.ZodOptional<z.ZodNumber>;
|
|
206
|
+
totalGenerations: z.ZodOptional<z.ZodNumber>;
|
|
207
|
+
totalImages: z.ZodOptional<z.ZodNumber>;
|
|
208
|
+
totalPixels: z.ZodOptional<z.ZodNumber>;
|
|
209
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
210
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
211
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
212
|
+
}, z.core.$strip>;
|
|
213
|
+
export type DiffusionStats = z.infer<typeof diffusionStatsSchema>;
|
|
214
|
+
export declare const diffusionStreamResponseSchema: z.ZodObject<{
|
|
215
|
+
type: z.ZodLiteral<"diffusionStream">;
|
|
216
|
+
step: z.ZodOptional<z.ZodNumber>;
|
|
217
|
+
totalSteps: z.ZodOptional<z.ZodNumber>;
|
|
218
|
+
elapsedMs: z.ZodOptional<z.ZodNumber>;
|
|
219
|
+
data: z.ZodOptional<z.ZodString>;
|
|
220
|
+
outputIndex: z.ZodOptional<z.ZodNumber>;
|
|
221
|
+
done: z.ZodOptional<z.ZodBoolean>;
|
|
222
|
+
stats: z.ZodOptional<z.ZodObject<{
|
|
223
|
+
modelLoadMs: z.ZodOptional<z.ZodNumber>;
|
|
224
|
+
generationMs: z.ZodOptional<z.ZodNumber>;
|
|
225
|
+
totalGenerationMs: z.ZodOptional<z.ZodNumber>;
|
|
226
|
+
totalWallMs: z.ZodOptional<z.ZodNumber>;
|
|
227
|
+
totalSteps: z.ZodOptional<z.ZodNumber>;
|
|
228
|
+
totalGenerations: z.ZodOptional<z.ZodNumber>;
|
|
229
|
+
totalImages: z.ZodOptional<z.ZodNumber>;
|
|
230
|
+
totalPixels: z.ZodOptional<z.ZodNumber>;
|
|
231
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
232
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
233
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
234
|
+
}, z.core.$strip>>;
|
|
235
|
+
}, z.core.$strip>;
|
|
236
|
+
export type DiffusionStreamResponse = z.infer<typeof diffusionStreamResponseSchema>;
|
|
237
|
+
export declare const diffusionRequestSchema: z.ZodObject<{
|
|
238
|
+
modelId: z.ZodString;
|
|
239
|
+
prompt: z.ZodString;
|
|
240
|
+
negative_prompt: z.ZodOptional<z.ZodString>;
|
|
241
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
242
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
243
|
+
steps: z.ZodOptional<z.ZodNumber>;
|
|
244
|
+
cfg_scale: z.ZodOptional<z.ZodNumber>;
|
|
245
|
+
guidance: z.ZodOptional<z.ZodNumber>;
|
|
246
|
+
sampling_method: z.ZodOptional<z.ZodEnum<{
|
|
247
|
+
euler: "euler";
|
|
248
|
+
euler_a: "euler_a";
|
|
249
|
+
heun: "heun";
|
|
250
|
+
dpm2: "dpm2";
|
|
251
|
+
"dpm++2m": "dpm++2m";
|
|
252
|
+
"dpm++2mv2": "dpm++2mv2";
|
|
253
|
+
"dpm++2s_a": "dpm++2s_a";
|
|
254
|
+
lcm: "lcm";
|
|
255
|
+
ipndm: "ipndm";
|
|
256
|
+
ipndm_v: "ipndm_v";
|
|
257
|
+
ddim_trailing: "ddim_trailing";
|
|
258
|
+
tcd: "tcd";
|
|
259
|
+
res_multistep: "res_multistep";
|
|
260
|
+
res_2s: "res_2s";
|
|
261
|
+
}>>;
|
|
262
|
+
scheduler: z.ZodOptional<z.ZodEnum<{
|
|
263
|
+
lcm: "lcm";
|
|
264
|
+
discrete: "discrete";
|
|
265
|
+
karras: "karras";
|
|
266
|
+
exponential: "exponential";
|
|
267
|
+
ays: "ays";
|
|
268
|
+
gits: "gits";
|
|
269
|
+
sgm_uniform: "sgm_uniform";
|
|
270
|
+
simple: "simple";
|
|
271
|
+
smoothstep: "smoothstep";
|
|
272
|
+
kl_optimal: "kl_optimal";
|
|
273
|
+
bong_tangent: "bong_tangent";
|
|
274
|
+
}>>;
|
|
275
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
276
|
+
batch_count: z.ZodOptional<z.ZodNumber>;
|
|
277
|
+
vae_tiling: z.ZodOptional<z.ZodBoolean>;
|
|
278
|
+
cache_preset: z.ZodOptional<z.ZodString>;
|
|
279
|
+
}, z.core.$strip>;
|
|
280
|
+
export type DiffusionRequest = z.infer<typeof diffusionRequestSchema>;
|
|
281
|
+
export declare const diffusionStreamRequestSchema: z.ZodObject<{
|
|
282
|
+
modelId: z.ZodString;
|
|
283
|
+
prompt: z.ZodString;
|
|
284
|
+
negative_prompt: z.ZodOptional<z.ZodString>;
|
|
285
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
286
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
287
|
+
steps: z.ZodOptional<z.ZodNumber>;
|
|
288
|
+
cfg_scale: z.ZodOptional<z.ZodNumber>;
|
|
289
|
+
guidance: z.ZodOptional<z.ZodNumber>;
|
|
290
|
+
sampling_method: z.ZodOptional<z.ZodEnum<{
|
|
291
|
+
euler: "euler";
|
|
292
|
+
euler_a: "euler_a";
|
|
293
|
+
heun: "heun";
|
|
294
|
+
dpm2: "dpm2";
|
|
295
|
+
"dpm++2m": "dpm++2m";
|
|
296
|
+
"dpm++2mv2": "dpm++2mv2";
|
|
297
|
+
"dpm++2s_a": "dpm++2s_a";
|
|
298
|
+
lcm: "lcm";
|
|
299
|
+
ipndm: "ipndm";
|
|
300
|
+
ipndm_v: "ipndm_v";
|
|
301
|
+
ddim_trailing: "ddim_trailing";
|
|
302
|
+
tcd: "tcd";
|
|
303
|
+
res_multistep: "res_multistep";
|
|
304
|
+
res_2s: "res_2s";
|
|
305
|
+
}>>;
|
|
306
|
+
scheduler: z.ZodOptional<z.ZodEnum<{
|
|
307
|
+
lcm: "lcm";
|
|
308
|
+
discrete: "discrete";
|
|
309
|
+
karras: "karras";
|
|
310
|
+
exponential: "exponential";
|
|
311
|
+
ays: "ays";
|
|
312
|
+
gits: "gits";
|
|
313
|
+
sgm_uniform: "sgm_uniform";
|
|
314
|
+
simple: "simple";
|
|
315
|
+
smoothstep: "smoothstep";
|
|
316
|
+
kl_optimal: "kl_optimal";
|
|
317
|
+
bong_tangent: "bong_tangent";
|
|
318
|
+
}>>;
|
|
319
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
320
|
+
batch_count: z.ZodOptional<z.ZodNumber>;
|
|
321
|
+
vae_tiling: z.ZodOptional<z.ZodBoolean>;
|
|
322
|
+
cache_preset: z.ZodOptional<z.ZodString>;
|
|
323
|
+
type: z.ZodLiteral<"diffusionStream">;
|
|
324
|
+
}, z.core.$strip>;
|
|
325
|
+
export type DiffusionStreamRequest = z.infer<typeof diffusionStreamRequestSchema>;
|
|
326
|
+
export type DiffusionClientParams = DiffusionRequest;
|
|
327
|
+
//# sourceMappingURL=sdcpp-config.d.ts.map
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { modelSrcInputSchema } from "./model-src-utils.js";
|
|
3
|
+
export const sdcppConfigSchema = z
|
|
4
|
+
.object({
|
|
5
|
+
threads: z.number().optional(),
|
|
6
|
+
device: z.enum(["gpu", "cpu"]).optional(),
|
|
7
|
+
prediction: z
|
|
8
|
+
.enum(["auto", "eps", "v", "edm_v", "flow", "flux_flow", "flux2_flow"])
|
|
9
|
+
.optional()
|
|
10
|
+
.describe("Prediction type; auto-detected from model when omitted"),
|
|
11
|
+
type: z
|
|
12
|
+
.enum([
|
|
13
|
+
"auto", "f32", "f16", "bf16",
|
|
14
|
+
"q2_k", "q3_k", "q4_0", "q4_1", "q4_k",
|
|
15
|
+
"q5_0", "q5_1", "q5_k", "q6_k", "q8_0",
|
|
16
|
+
])
|
|
17
|
+
.optional()
|
|
18
|
+
.describe("Weight quantization type override; auto-detected when omitted"),
|
|
19
|
+
rng: z.enum(["cpu", "cuda", "std_default"]).optional(),
|
|
20
|
+
sampler_rng: z.enum(["cpu", "cuda", "std_default"]).optional(),
|
|
21
|
+
clip_on_cpu: z.boolean().optional().describe("Force CLIP text encoder to run on CPU"),
|
|
22
|
+
vae_on_cpu: z.boolean().optional().describe("Force VAE decoder to run on CPU"),
|
|
23
|
+
vae_tiling: z.boolean().optional().describe("Enable VAE tiling for large images on limited VRAM"),
|
|
24
|
+
flash_attn: z.boolean().optional().describe("Enable flash attention to reduce memory usage"),
|
|
25
|
+
verbosity: z.number().optional(),
|
|
26
|
+
clipLModelSrc: modelSrcInputSchema.optional()
|
|
27
|
+
.describe("CLIP-L text encoder model — required for SD3"),
|
|
28
|
+
clipGModelSrc: modelSrcInputSchema.optional()
|
|
29
|
+
.describe("CLIP-G text encoder model — required for SDXL and SD3"),
|
|
30
|
+
t5XxlModelSrc: modelSrcInputSchema.optional()
|
|
31
|
+
.describe("T5-XXL text encoder model — required for SD3"),
|
|
32
|
+
llmModelSrc: modelSrcInputSchema.optional()
|
|
33
|
+
.describe("LLM text encoder model (e.g. Qwen3) — required for FLUX.2 [klein]"),
|
|
34
|
+
vaeModelSrc: modelSrcInputSchema.optional()
|
|
35
|
+
.describe("VAE decoder model — required for FLUX.2 [klein], optional for SDXL"),
|
|
36
|
+
});
|
|
37
|
+
export const diffusionStatsSchema = z.object({
|
|
38
|
+
modelLoadMs: z.number().optional(),
|
|
39
|
+
generationMs: z.number().optional(),
|
|
40
|
+
totalGenerationMs: z.number().optional(),
|
|
41
|
+
totalWallMs: z.number().optional(),
|
|
42
|
+
totalSteps: z.number().optional(),
|
|
43
|
+
totalGenerations: z.number().optional(),
|
|
44
|
+
totalImages: z.number().optional(),
|
|
45
|
+
totalPixels: z.number().optional(),
|
|
46
|
+
width: z.number().optional(),
|
|
47
|
+
height: z.number().optional(),
|
|
48
|
+
seed: z.number().optional(),
|
|
49
|
+
});
|
|
50
|
+
export const diffusionStreamResponseSchema = z.object({
|
|
51
|
+
type: z.literal("diffusionStream"),
|
|
52
|
+
step: z.number().optional(),
|
|
53
|
+
totalSteps: z.number().optional(),
|
|
54
|
+
elapsedMs: z.number().optional(),
|
|
55
|
+
data: z.string().optional(),
|
|
56
|
+
outputIndex: z.number().optional(),
|
|
57
|
+
done: z.boolean().optional(),
|
|
58
|
+
stats: diffusionStatsSchema.optional(),
|
|
59
|
+
});
|
|
60
|
+
export const diffusionRequestSchema = z.object({
|
|
61
|
+
modelId: z.string(),
|
|
62
|
+
prompt: z.string(),
|
|
63
|
+
negative_prompt: z.string().optional(),
|
|
64
|
+
width: z.number().int().positive().multipleOf(8).optional(),
|
|
65
|
+
height: z.number().int().positive().multipleOf(8).optional(),
|
|
66
|
+
steps: z.number().int().positive().optional(),
|
|
67
|
+
cfg_scale: z.number().optional()
|
|
68
|
+
.describe("Classifier-free guidance scale for SD 1.x / 2.x / XL / SD3 models; typical range 1–20, default 7"),
|
|
69
|
+
guidance: z.number().optional()
|
|
70
|
+
.describe("Distilled guidance for FLUX models; typical range 1–10, default 3.5"),
|
|
71
|
+
sampling_method: z
|
|
72
|
+
.enum([
|
|
73
|
+
"euler",
|
|
74
|
+
"euler_a",
|
|
75
|
+
"heun",
|
|
76
|
+
"dpm2",
|
|
77
|
+
"dpm++2m",
|
|
78
|
+
"dpm++2mv2",
|
|
79
|
+
"dpm++2s_a",
|
|
80
|
+
"lcm",
|
|
81
|
+
"ipndm",
|
|
82
|
+
"ipndm_v",
|
|
83
|
+
"ddim_trailing",
|
|
84
|
+
"tcd",
|
|
85
|
+
"res_multistep",
|
|
86
|
+
"res_2s",
|
|
87
|
+
])
|
|
88
|
+
.optional(),
|
|
89
|
+
scheduler: z
|
|
90
|
+
.enum([
|
|
91
|
+
"discrete", "karras", "exponential", "ays", "gits",
|
|
92
|
+
"sgm_uniform", "simple", "lcm", "smoothstep", "kl_optimal", "bong_tangent",
|
|
93
|
+
])
|
|
94
|
+
.optional(),
|
|
95
|
+
seed: z.number().int().optional(),
|
|
96
|
+
batch_count: z.number().int().positive().optional(),
|
|
97
|
+
vae_tiling: z.boolean().optional(),
|
|
98
|
+
cache_preset: z.string().optional(),
|
|
99
|
+
});
|
|
100
|
+
export const diffusionStreamRequestSchema = diffusionRequestSchema.extend({
|
|
101
|
+
type: z.literal("diffusionStream"),
|
|
102
|
+
});
|