@qvac/inference 0.21.1 → 0.22.0
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 +30 -1
- package/README.md +44 -1
- package/dist/api/assess-model-fit.d.ts +4 -4
- package/dist/api/assess-model-fit.js +4 -4
- package/dist/api/audio-gen.d.ts +4 -1
- package/dist/api/audio-gen.js +4 -1
- package/dist/api/batch-completion.js +1 -1
- package/dist/api/completion-stream.js +1 -1
- package/dist/api/decide.d.ts +26 -0
- package/dist/api/decide.js +26 -0
- package/dist/api/get-model-info.d.ts +1 -1
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/api/text-to-speech.d.ts +1 -0
- package/dist/api/text-to-speech.js +15 -19
- package/dist/api/transcribe.js +5 -2
- package/dist/api/video-request.d.ts +5 -5
- package/dist/api/video.d.ts +5 -4
- package/dist/api/video.js +5 -4
- package/dist/errors/index.d.ts +3 -0
- package/dist/errors/index.js +5 -0
- package/dist/handlers/assess-model-fit.d.ts +5 -3
- package/dist/handlers/assess-model-fit.js +80 -28
- package/dist/handlers/get-loaded-model-info.js +1 -2
- package/dist/handlers/load-model/safe-fetch.js +5 -6
- package/dist/handlers/registry.d.ts +3 -1
- package/dist/handlers/registry.js +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/logging/logger.js +1 -1
- package/dist/logging/utils.js +1 -1
- package/dist/models/registry/models.d.ts +563 -816
- package/dist/models/registry/models.js +2873 -3110
- package/dist/models/registry/resource-profiles.d.ts +1 -2
- package/dist/models/registry/resource-profiles.js +203 -2
- package/dist/plugins/builtin/asr-ggml/config.d.ts +7 -1
- package/dist/plugins/builtin/asr-ggml/config.js +6 -0
- package/dist/plugins/builtin/asr-ggml/logging.d.ts +1 -1
- package/dist/plugins/builtin/audiogen-ggml/config.d.ts +1 -0
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-edit-stream.js +28 -10
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-input.d.ts +27 -0
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-input.js +23 -0
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-stream.js +6 -27
- package/dist/plugins/builtin/audiogen-ggml/plugin.d.ts +147 -60
- package/dist/plugins/builtin/audiogen-ggml/plugin.js +1 -0
- package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.d.ts +40 -24
- package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.js +1 -1
- package/dist/plugins/builtin/ggml-classification/plugin.d.ts +4 -4
- package/dist/plugins/builtin/ggml-ocr/params.d.ts +18 -0
- package/dist/plugins/builtin/ggml-ocr/params.js +37 -0
- package/dist/plugins/builtin/ggml-ocr/plugin.d.ts +18 -10
- package/dist/plugins/builtin/ggml-ocr/plugin.js +16 -38
- package/dist/plugins/builtin/ggml-vla/plugin.d.ts +21 -14
- package/dist/plugins/builtin/ggml-vla/plugin.js +1 -1
- package/dist/plugins/builtin/index.d.ts +2 -0
- package/dist/plugins/builtin/index.js +2 -0
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stream.d.ts +9 -7
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stream.js +109 -189
- package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-session.d.ts +32 -90
- package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-session.js +60 -211
- package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-state.d.ts +2 -49
- package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-state.js +2 -46
- package/dist/plugins/builtin/llamacpp-completion/plugin.d.ts +185 -87
- package/dist/plugins/builtin/llamacpp-completion/plugin.js +4 -5
- package/dist/plugins/builtin/llamacpp-completion/transform.js +1 -1
- package/dist/plugins/builtin/llamacpp-decision/helpers.d.ts +6 -0
- package/dist/plugins/builtin/llamacpp-decision/helpers.js +97 -0
- package/dist/plugins/builtin/llamacpp-decision/ops/decide.d.ts +91 -0
- package/dist/plugins/builtin/llamacpp-decision/ops/decide.js +129 -0
- package/dist/plugins/builtin/llamacpp-decision/plugin.d.ts +216 -0
- package/dist/plugins/builtin/llamacpp-decision/plugin.js +43 -0
- package/dist/plugins/builtin/llamacpp-embedding/plugin.d.ts +12 -5
- package/dist/plugins/builtin/llamacpp-embedding/plugin.js +1 -1
- package/dist/plugins/builtin/llamacpp-embedding/transform.js +3 -0
- package/dist/plugins/builtin/moss-transcribe/plugin.d.ts +143 -0
- package/dist/plugins/builtin/moss-transcribe/plugin.js +96 -0
- package/dist/plugins/builtin/nmtcpp-translation/load-files.d.ts +6 -0
- package/dist/plugins/builtin/nmtcpp-translation/load-files.js +70 -0
- package/dist/plugins/builtin/nmtcpp-translation/plugin.d.ts +25 -13
- package/dist/plugins/builtin/nmtcpp-translation/plugin.js +9 -73
- package/dist/plugins/builtin/parakeet-transcription/plugin.d.ts +52 -31
- package/dist/plugins/builtin/parakeet-transcription/plugin.js +18 -3
- package/dist/plugins/builtin/sdcpp-generation/ops/video.js +10 -6
- package/dist/plugins/builtin/sdcpp-generation/ops/world.d.ts +2 -2
- package/dist/plugins/builtin/sdcpp-generation/ops/world.js +1 -1
- package/dist/plugins/builtin/sdcpp-generation/plugin.d.ts +59 -33
- package/dist/plugins/builtin/sdcpp-generation/plugin.js +12 -9
- package/dist/plugins/builtin/tts-ggml/ops/moss-options.d.ts +22 -0
- package/dist/plugins/builtin/tts-ggml/ops/moss-options.js +79 -0
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech-stream.js +4 -1
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech.js +17 -5
- package/dist/plugins/builtin/tts-ggml/plugin.d.ts +164 -29
- package/dist/plugins/builtin/tts-ggml/plugin.js +38 -1
- package/dist/plugins/builtin/whispercpp-transcription/plugin.d.ts +58 -35
- package/dist/plugins/builtin/whispercpp-transcription/plugin.js +6 -2
- package/dist/plugins/ops/kv-cache-utils.d.ts +1 -1
- package/dist/plugins/ops/kv-cache-utils.js +10 -25
- package/dist/plugins/ops/load-model.js +21 -16
- package/dist/plugins/ops/transcribe.js +17 -1
- package/dist/registry.js +1 -0
- package/dist/resources/model-fit/assess.d.ts +15 -23
- package/dist/resources/model-fit/assess.js +207 -271
- package/dist/resources/model-fit/fit-stub/fetch-fit-stub.d.ts +3 -1
- package/dist/resources/model-fit/fit-stub/fetch-fit-stub.js +6 -1
- package/dist/resources/model-fit/fit-stub/project-fit-from-load.js +2 -0
- package/dist/resources/model-fit/fit-stub/resolve-load-from-stubs.d.ts +5 -3
- package/dist/resources/model-fit/fit-stub/resolve-load-from-stubs.js +9 -1
- package/dist/resources/model-fit/floor.d.ts +10 -10
- package/dist/resources/model-fit/floor.js +13 -13
- package/dist/resources/model-fit/kv-cache.d.ts +23 -0
- package/dist/resources/model-fit/kv-cache.js +85 -0
- package/dist/resources/model-fit/native-probe/advisory-fit.d.ts +11 -6
- package/dist/resources/model-fit/native-probe/advisory-fit.js +12 -27
- package/dist/resources/model-fit/native-probe/child-engine-fit.js +8 -0
- package/dist/resources/model-fit/native-probe/classify-fit.js +32 -1
- package/dist/resources/model-fit/native-probe/create-fit-request.d.ts +4 -1
- package/dist/resources/model-fit/native-probe/create-fit-request.js +24 -14
- package/dist/resources/model-fit/native-probe/engine-fit.d.ts +14 -0
- package/dist/resources/model-fit/native-probe/engine-fit.js +1 -1
- package/dist/resources/model-fit/native-probe/engines/asr.d.ts +4 -0
- package/dist/resources/model-fit/native-probe/engines/asr.js +23 -0
- package/dist/resources/model-fit/native-probe/engines/audiogen.js +29 -1
- package/dist/resources/model-fit/native-probe/engines/diffusion.js +16 -6
- package/dist/resources/model-fit/native-probe/engines/llama.d.ts +0 -1
- package/dist/resources/model-fit/native-probe/engines/llama.js +19 -123
- package/dist/resources/model-fit/native-probe/engines/nmt.d.ts +8 -0
- package/dist/resources/model-fit/native-probe/engines/nmt.js +11 -0
- package/dist/resources/model-fit/native-probe/engines/ocr.d.ts +9 -0
- package/dist/resources/model-fit/native-probe/engines/ocr.js +13 -0
- package/dist/resources/model-fit/native-probe/engines/tts.d.ts +2 -0
- package/dist/resources/model-fit/native-probe/engines/tts.js +49 -3
- package/dist/resources/model-fit/native-probe/run-in-process-fit.d.ts +5 -3
- package/dist/resources/model-fit/native-probe/run-in-process-fit.js +38 -23
- package/dist/resources/model-fit/platform.d.ts +4 -4
- package/dist/resources/model-fit/platform.js +6 -8
- package/dist/resources/model-fit/types.d.ts +3 -117
- package/dist/rpc/inventory.js +5 -7
- package/dist/runtime/env.d.ts +0 -2
- package/dist/runtime/env.js +2 -9
- package/dist/runtime/model-config-utils.js +6 -1
- package/dist/runtime/request-context.d.ts +1 -1
- package/dist/runtime/request-context.js +8 -0
- package/dist/runtime/state.js +5 -0
- package/dist/schemas/assess-model-fit.d.ts +100 -43
- package/dist/schemas/assess-model-fit.js +66 -29
- package/dist/schemas/audio-gen.d.ts +186 -18
- package/dist/schemas/audio-gen.js +180 -48
- package/dist/schemas/batch-completion-stream.d.ts +202 -34
- package/dist/schemas/bci-config.d.ts +2 -0
- package/dist/schemas/bci.d.ts +23 -2
- package/dist/schemas/cancel.d.ts +5 -0
- package/dist/schemas/cancel.js +1 -0
- package/dist/schemas/common.d.ts +1083 -158
- package/dist/schemas/common.js +5 -2
- package/dist/schemas/completion-stream.d.ts +232 -37
- package/dist/schemas/completion-stream.js +64 -20
- package/dist/schemas/config.d.ts +477 -12
- package/dist/schemas/config.js +21 -1
- package/dist/schemas/decision.d.ts +602 -0
- package/dist/schemas/decision.js +205 -0
- package/dist/schemas/download-asset.d.ts +7 -3
- package/dist/schemas/engine-addon-map.d.ts +7 -0
- package/dist/schemas/engine-addon-map.js +23 -3
- package/dist/schemas/errors.d.ts +1 -0
- package/dist/schemas/errors.js +5 -0
- package/dist/schemas/index.d.ts +2 -0
- package/dist/schemas/index.js +2 -0
- package/dist/schemas/llamacpp-config.d.ts +42 -2
- package/dist/schemas/llamacpp-config.js +27 -0
- package/dist/schemas/load-model.d.ts +5247 -1309
- package/dist/schemas/load-model.js +88 -9
- package/dist/schemas/model-config-schemas.d.ts +233 -8
- package/dist/schemas/model-config-schemas.js +4 -1
- package/dist/schemas/model-fit-policy.d.ts +17 -0
- package/dist/schemas/model-fit-policy.js +17 -0
- package/dist/schemas/model-info.d.ts +20 -2
- package/dist/schemas/model-info.js +2 -1
- package/dist/schemas/model-resource-profile.d.ts +3 -4
- package/dist/schemas/model-resource-profile.js +1 -4
- package/dist/schemas/model-src-utils.d.ts +10 -2
- package/dist/schemas/model-types.d.ts +10 -1
- package/dist/schemas/model-types.js +3 -0
- package/dist/schemas/ocr.d.ts +74 -0
- package/dist/schemas/ocr.js +42 -0
- package/dist/schemas/plugin.d.ts +8 -2
- package/dist/schemas/plugin.js +6 -0
- package/dist/schemas/profiling.d.ts +4 -4
- package/dist/schemas/registry.d.ts +26 -0
- package/dist/schemas/registry.js +3 -0
- package/dist/schemas/reload-config.d.ts +10 -2
- package/dist/schemas/rpc-server.js +3 -3
- package/dist/schemas/sdcpp-config.d.ts +26 -0
- package/dist/schemas/sdcpp-config.js +8 -7
- package/dist/schemas/system-resources.d.ts +4 -4
- package/dist/schemas/text-to-speech.d.ts +402 -3
- package/dist/schemas/text-to-speech.js +129 -11
- package/dist/schemas/tools.d.ts +13 -4
- package/dist/schemas/tools.js +18 -6
- package/dist/schemas/transcription-config.d.ts +15 -0
- package/dist/schemas/transcription-config.js +38 -3
- package/dist/schemas/transcription.d.ts +46 -4
- package/dist/schemas/transcription.js +51 -4
- package/dist/schemas/translation-config.d.ts +30 -10
- package/dist/schemas/vla.d.ts +9 -2
- package/dist/schemas/vla.js +9 -5
- package/dist/surface.d.ts +1 -1
- package/dist/surface.js +1 -1
- package/dist/utils/addon-responses.d.ts +1 -0
- package/dist/utils/asr-events.d.ts +1 -0
- package/dist/utils/asr-events.js +2 -1
- package/dist/utils/cache/types.d.ts +7 -0
- package/dist/utils/mcp-adapter.js +12 -8
- package/dist/utils/tool-helpers.d.ts +1 -1
- package/dist/utils/tool-helpers.js +20 -52
- package/dist/utils/tools/parsers/dsml.js +8 -5
- package/dist/utils/tools/parsers/qwen35.js +7 -4
- package/dist/utils/tools/shared.d.ts +3 -0
- package/dist/utils/tools/shared.js +62 -0
- package/dist/utils/transcribe-metadata.d.ts +8 -1
- package/dist/utils/transcribe-metadata.js +13 -3
- package/dist/utils/tts-stats.d.ts +1 -0
- package/package.json +41 -32
- package/dist/resources/model-fit/calibration/darwin-arm64.d.ts +0 -8
- package/dist/resources/model-fit/calibration/darwin-arm64.js +0 -36
- package/dist/resources/model-fit/calibration/darwin-x64.d.ts +0 -8
- package/dist/resources/model-fit/calibration/darwin-x64.js +0 -38
- package/dist/resources/model-fit/calibration/fit.d.ts +0 -73
- package/dist/resources/model-fit/calibration/fit.js +0 -152
- package/dist/resources/model-fit/calibration/index.d.ts +0 -37
- package/dist/resources/model-fit/calibration/index.js +0 -75
- package/dist/resources/model-fit/calibration/linux-arm64.d.ts +0 -8
- package/dist/resources/model-fit/calibration/linux-arm64.js +0 -38
- package/dist/resources/model-fit/calibration/linux-x64-vulkan.d.ts +0 -8
- package/dist/resources/model-fit/calibration/linux-x64-vulkan.js +0 -39
- package/dist/resources/model-fit/calibration/linux-x64.d.ts +0 -8
- package/dist/resources/model-fit/calibration/linux-x64.js +0 -38
- package/dist/resources/model-fit/calibration/win32-x64-vulkan-shared.d.ts +0 -8
- package/dist/resources/model-fit/calibration/win32-x64-vulkan-shared.js +0 -39
- package/dist/resources/model-fit/calibration/win32-x64-vulkan.d.ts +0 -8
- package/dist/resources/model-fit/calibration/win32-x64-vulkan.js +0 -36
- package/dist/resources/model-fit/calibration/win32-x64.d.ts +0 -8
- package/dist/resources/model-fit/calibration/win32-x64.js +0 -38
- package/dist/resources/model-fit/estimators/llm.d.ts +0 -46
- package/dist/resources/model-fit/estimators/llm.js +0 -222
- package/dist/resources/model-fit/estimators/whisper.d.ts +0 -10
- package/dist/resources/model-fit/estimators/whisper.js +0 -76
package/NOTICE
CHANGED
|
@@ -135,6 +135,18 @@ Third-Party Model Licenses
|
|
|
135
135
|
https://huggingface.co/jmb95/laser-dolphin-mixtral-2x7b-dpo-GGUF
|
|
136
136
|
latin_g2
|
|
137
137
|
https://www.jaided.ai/easyocr/modelhub/
|
|
138
|
+
laya-f16
|
|
139
|
+
https://huggingface.co/convaiinnovations/laya
|
|
140
|
+
laya-multilingual-f16
|
|
141
|
+
https://huggingface.co/convaiinnovations/laya-multilingual
|
|
142
|
+
laya-multilingual-Q8_0
|
|
143
|
+
https://huggingface.co/convaiinnovations/laya-multilingual
|
|
144
|
+
laya-Q8_0
|
|
145
|
+
https://huggingface.co/convaiinnovations/laya
|
|
146
|
+
laya-typed-decisions-f16
|
|
147
|
+
https://huggingface.co/convaiinnovations/laya-typed-decisions
|
|
148
|
+
laya-typed-decisions-Q8_0
|
|
149
|
+
https://huggingface.co/convaiinnovations/laya-typed-decisions
|
|
138
150
|
LightOnOCR-2-1B-ocr-soup-GGUF
|
|
139
151
|
https://huggingface.co/noctrex/LightOnOCR-2-1B-ocr-soup-GGUF
|
|
140
152
|
Llama_3.2_1B_Intruct_Tool_Calling_V2-GGUF
|
|
@@ -153,8 +165,20 @@ Third-Party Model Licenses
|
|
|
153
165
|
https://huggingface.co/OpenMOSS-Team/MOSS-TTS
|
|
154
166
|
moss-codec-encoder-f16
|
|
155
167
|
https://huggingface.co/OpenMOSS-Team/MOSS-TTS
|
|
168
|
+
moss-sfx-v2-f16
|
|
169
|
+
https://huggingface.co/OpenMOSS-Team/MOSS-SoundEffect-v2.0
|
|
170
|
+
moss-speech-bf16
|
|
171
|
+
https://huggingface.co/OpenMOSS-Team/MOSS-Speech
|
|
172
|
+
moss-speech-codec-f16
|
|
173
|
+
https://huggingface.co/OpenMOSS-Team/MOSS-Speech-Codec
|
|
174
|
+
moss-speech-q8_0
|
|
175
|
+
https://huggingface.co/OpenMOSS-Team/MOSS-Speech
|
|
176
|
+
moss-transcribe-diarize-f16
|
|
177
|
+
https://huggingface.co/OpenMOSS-Team/MOSS-Transcribe-Diarize
|
|
156
178
|
moss-tts-delay-f16
|
|
157
179
|
https://huggingface.co/OpenMOSS-Team/MOSS-TTS
|
|
180
|
+
moss-ttsd-f16
|
|
181
|
+
https://huggingface.co/OpenMOSS-Team/MOSS-TTSD-v1.0
|
|
158
182
|
nb-tiny-ggml-model
|
|
159
183
|
https://huggingface.co/NbAiLab/nb-whisper-tiny
|
|
160
184
|
parler-indic-f16
|
|
@@ -707,6 +731,11 @@ Third-Party Model Licenses
|
|
|
707
731
|
weight
|
|
708
732
|
https://huggingface.co/nvidia/parakeet-unified-en-0.6b
|
|
709
733
|
|
|
734
|
+
--- openmdw-1.1 ---
|
|
735
|
+
|
|
736
|
+
Nemotron-3-Diarization.q8_0
|
|
737
|
+
https://huggingface.co/nvidia/Nemotron-3-Diarization
|
|
738
|
+
|
|
710
739
|
--- openrail ---
|
|
711
740
|
|
|
712
741
|
supertonic
|
|
@@ -1058,6 +1087,6 @@ JavaScript Dependencies
|
|
|
1058
1087
|
https://github.com/mafintosh/xache
|
|
1059
1088
|
z32@1.1.0
|
|
1060
1089
|
https://github.com/mafintosh/z32
|
|
1061
|
-
zod@4.6.
|
|
1090
|
+
zod@4.6.5
|
|
1062
1091
|
https://github.com/colinhacks/zod
|
|
1063
1092
|
|
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ const run = completion({ modelId, history: [{ role: 'user', content: 'Hi' }] })
|
|
|
60
60
|
Model operations require a registered model plugin. RPC discovery needs no model plugin or server provider; serving requires an explicitly registered server provider.
|
|
61
61
|
|
|
62
62
|
The [Bare serving example](examples/rpc-server.ts)
|
|
63
|
-
shows explicit registration and cleanup with `@qvac/ggml-rpc-server@0.1
|
|
63
|
+
shows explicit registration and cleanup with `@qvac/ggml-rpc-server@0.5.1`.
|
|
64
64
|
|
|
65
65
|
## Capability to addon package
|
|
66
66
|
|
|
@@ -78,10 +78,53 @@ shows explicit registration and cleanup with `@qvac/ggml-rpc-server@0.1.0`.
|
|
|
78
78
|
| `@qvac/inference/ggml-vla/plugin` | `@qvac/vla-ggml` |
|
|
79
79
|
| `@qvac/inference/ggml-classification/plugin` | `@qvac/classification-ggml` |
|
|
80
80
|
|
|
81
|
+
## MOSS engines and memory fit
|
|
82
|
+
|
|
83
|
+
`@qvac/tts-ggml` carries two desktop batch engines for `textToSpeech`.
|
|
84
|
+
Load MOSS-SoundEffect with `modelType: 'tts-ggml'` and
|
|
85
|
+
`modelConfig: { ttsEngine: 'moss-sfx' }`; the primary source is its single
|
|
86
|
+
GGUF. With an `AUDIOGEN_MOSS_SFX_V2_*` constant, pass its `.src` URL as
|
|
87
|
+
`modelSrc`, because the full descriptor selects the audiogen plugin. To assess
|
|
88
|
+
its fit, pass a downloaded local file with explicit `modelType` and
|
|
89
|
+
`ttsEngine`. Use a text description, with optional `seconds`
|
|
90
|
+
(up to 30), `negativePrompt`, `steps`, `guidance` and `shift`. These controls
|
|
91
|
+
can also be load defaults. The output is 48 kHz.
|
|
92
|
+
|
|
93
|
+
Load MOSS-Speech with `modelConfig: { ttsEngine: 'moss-speech',
|
|
94
|
+
mossSpeechCodecModelSrc: <codec source> }` and the language-model GGUF as
|
|
95
|
+
`modelSrc`. Use either `text`, or `audio` plus
|
|
96
|
+
`sampleRate`. Audio is a JSON array of normalized mono samples in [-1, 1].
|
|
97
|
+
Earlier turns go in `messages`; each turn has a `role` and either `text` or
|
|
98
|
+
`audio` plus `sampleRate`. Per-call controls include `systemPrompt`,
|
|
99
|
+
`replyVoice` plus `replyVoiceSampleRate`, `maxReplySeconds`, `maxNewTokens`,
|
|
100
|
+
`textReply`, `greedy`, `temperature`, `topP` and `topK`. Consume `bufferStream` in the default streaming mode, or await `buffer` with
|
|
101
|
+
`stream: false`, then await `result.text` for any reply text.
|
|
102
|
+
Spoken mode can return an audio-only reply; use `textReply: true` when text is required.
|
|
103
|
+
Spoken replies are 24 kHz; `textReply: true` returns text with an empty audio
|
|
104
|
+
buffer. Omitting `maxNewTokens` preserves the addon's remaining-context budget.
|
|
105
|
+
Both engines run one native batch job. The default `stream: true` emits the completed audio as one chunk; `stream: false` collects it in `buffer`. Neither supports sentence streaming or duplex text input.
|
|
106
|
+
|
|
107
|
+
`assessModelFit` supports metadata-only MOSS-TTS/TTSD and MOSS-SoundEffect
|
|
108
|
+
projections. Add `ttsWorkload` beside `modelConfig` on the assessment candidate:
|
|
109
|
+
`{ promptRows, referenceSamples, streaming }` for MOSS, or
|
|
110
|
+
`{ prompt, seconds }` for sound effects. MOSS needs its backbone and codec
|
|
111
|
+
decoder; reference encoding also needs the codec encoder. Prompt rows must
|
|
112
|
+
cover the complete native prompt, including dialogue and reference rows.
|
|
113
|
+
Missing workloads return an unknown assessment rather than guessing.
|
|
114
|
+
MOSS-Speech has no native fitter and assesses as unknown. Workloads are
|
|
115
|
+
fit-only: loading a MOSS model does not accept them, so the fit check before a
|
|
116
|
+
MOSS load is unknown.
|
|
117
|
+
|
|
118
|
+
The CLI configuration picker includes both engines. Their conversation and
|
|
119
|
+
sound-effect request controls are library-only because the OpenAI speech
|
|
120
|
+
endpoint cannot represent those requests.
|
|
121
|
+
|
|
81
122
|
## Configuration
|
|
82
123
|
|
|
83
124
|
The engine resolves a `qvac.config.js` or `qvac.config.json` from the current working directory, or from the path in `QVAC_CONFIG_PATH`. The resolved config applies on the first API call.
|
|
84
125
|
|
|
126
|
+
The `includeAudioDecoder` setting is read by the SDK bundler. Set it to `false` when packaging a worker that only receives raw PCM or streaming audio; `audiogen-ggml` can also use PCM or WAV output without FFmpeg. Compressed audio file decoding and compressed audiogen output formats require `bare-ffmpeg` to be bundled.
|
|
127
|
+
|
|
85
128
|
## System resource diagnostics
|
|
86
129
|
|
|
87
130
|
Use `getSystemResources` to inspect locally observed CPU, system-memory, GPU, and driver capabilities. Pass `sample: true` only when you also need a fresh usage sample. Register a model plugin or RPC server provider before requesting diagnostics:
|
|
@@ -8,10 +8,10 @@ import { type AssessModelFitInput, type AssessModelFitResult } from '../schemas/
|
|
|
8
8
|
* the available evidence does not support a verdict either way, and callers
|
|
9
9
|
* should treat it as "cannot say", not "no".
|
|
10
10
|
*
|
|
11
|
-
* For
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
11
|
+
* For each candidate it fetches the registry's weightless description of the
|
|
12
|
+
* artifact — tens of KB, never the weights — and runs the engine's own fitter
|
|
13
|
+
* against it, reported as `native-fit` evidence. Where that is unavailable the
|
|
14
|
+
* computed floor stands, which can refuse a model but never confirm one.
|
|
15
15
|
*
|
|
16
16
|
* @param input - Candidates with their intended workloads, the declared
|
|
17
17
|
* execution mode, and the headroom policy.
|
|
@@ -10,10 +10,10 @@ import { InvalidResponseError } from '../errors/index.js';
|
|
|
10
10
|
* the available evidence does not support a verdict either way, and callers
|
|
11
11
|
* should treat it as "cannot say", not "no".
|
|
12
12
|
*
|
|
13
|
-
* For
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
13
|
+
* For each candidate it fetches the registry's weightless description of the
|
|
14
|
+
* artifact — tens of KB, never the weights — and runs the engine's own fitter
|
|
15
|
+
* against it, reported as `native-fit` evidence. Where that is unavailable the
|
|
16
|
+
* computed floor stands, which can refuse a model but never confirm one.
|
|
17
17
|
*
|
|
18
18
|
* @param input - Candidates with their intended workloads, the declared
|
|
19
19
|
* execution mode, and the headroom policy.
|
package/dist/api/audio-gen.d.ts
CHANGED
|
@@ -23,7 +23,10 @@ export declare function audioGen(params: AudioGenClientParams): AudioGenResult;
|
|
|
23
23
|
* array order. The source is interleaved stereo 48 kHz PCM — a file path
|
|
24
24
|
* decoded server-side, or raw Float32 LE bytes in `[-1, 1]`.
|
|
25
25
|
*
|
|
26
|
-
* @param params - Loaded model ID, the source audio, the ordered `operations`, and
|
|
26
|
+
* @param params - Loaded model ID, the source audio, the ordered `operations`, and optional run
|
|
27
|
+
* controls that apply to every operation: `seed`, a timbre `referenceAudio`, the prompt
|
|
28
|
+
* metadata (`vocalLanguage`, `bpm`, `keyscale`, `timesignature`, `augmentCaptionWithMetadata`),
|
|
29
|
+
* the Repaint DCW controls, and per-run `inferenceSteps` and `shift`.
|
|
27
30
|
* @returns The same run shape as `audioGen()`: `requestId`, `progressStream`, `audio`, `stats`, and `diagnostics`.
|
|
28
31
|
*
|
|
29
32
|
* @example
|
package/dist/api/audio-gen.js
CHANGED
|
@@ -47,7 +47,10 @@ export function audioGen(params) {
|
|
|
47
47
|
* array order. The source is interleaved stereo 48 kHz PCM — a file path
|
|
48
48
|
* decoded server-side, or raw Float32 LE bytes in `[-1, 1]`.
|
|
49
49
|
*
|
|
50
|
-
* @param params - Loaded model ID, the source audio, the ordered `operations`, and
|
|
50
|
+
* @param params - Loaded model ID, the source audio, the ordered `operations`, and optional run
|
|
51
|
+
* controls that apply to every operation: `seed`, a timbre `referenceAudio`, the prompt
|
|
52
|
+
* metadata (`vocalLanguage`, `bpm`, `keyscale`, `timesignature`, `augmentCaptionWithMetadata`),
|
|
53
|
+
* the Repaint DCW controls, and per-run `inferenceSteps` and `shift`.
|
|
51
54
|
* @returns The same run shape as `audioGen()`: `requestId`, `progressStream`, `audio`, `stats`, and `diagnostics`.
|
|
52
55
|
*
|
|
53
56
|
* @example
|
|
@@ -51,7 +51,7 @@ async function resolveBatchPrompts(prompts) {
|
|
|
51
51
|
resolvedHandlers.push(handlers);
|
|
52
52
|
resolvedPrompts.push({
|
|
53
53
|
...(prompt.id !== undefined && { id: prompt.id }),
|
|
54
|
-
history: prompt.history,
|
|
54
|
+
history: prompt.history.map((message) => ({ ...message, content: message.content ?? '' })),
|
|
55
55
|
...(prompt.generationParams && {
|
|
56
56
|
generationParams: prompt.generationParams
|
|
57
57
|
}),
|
|
@@ -181,7 +181,7 @@ export function completion(params) {
|
|
|
181
181
|
const request = {
|
|
182
182
|
type: 'completionStream',
|
|
183
183
|
modelId: params.modelId,
|
|
184
|
-
history: params.history,
|
|
184
|
+
history: params.history.map((message) => ({ ...message, content: message.content ?? '' })),
|
|
185
185
|
kvCache: params.kvCache,
|
|
186
186
|
tools: allTools.length > 0 ? allTools : undefined,
|
|
187
187
|
stream: params.stream ?? true,
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type DecideParams, type DecisionResult, type DecisionResponse, type RPCOptions } from '../schemas/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Answers typed decision questions about one state or a batch of states.
|
|
4
|
+
*
|
|
5
|
+
* @param params - Model ID, states, questions, and optional token budgets.
|
|
6
|
+
* @param options - Dispatch options.
|
|
7
|
+
* @returns A promise with a synchronous requestId for cancel(). One state
|
|
8
|
+
* resolves to one result; a batch resolves to results in input order.
|
|
9
|
+
* @throws {RequestValidationFailedError} If the request is invalid.
|
|
10
|
+
* @throws {InferenceCancelledError} If the request is cancelled.
|
|
11
|
+
* @throws {RequestRejectedByPolicyError} If this model's decision queue is full.
|
|
12
|
+
* @throws {InvalidResponseError} If the handler returns a malformed result.
|
|
13
|
+
*/
|
|
14
|
+
export declare function decide(params: Extract<DecideParams, {
|
|
15
|
+
state: unknown;
|
|
16
|
+
}>, options?: RPCOptions): Promise<DecisionResult> & {
|
|
17
|
+
requestId: string;
|
|
18
|
+
};
|
|
19
|
+
export declare function decide(params: Extract<DecideParams, {
|
|
20
|
+
states: unknown;
|
|
21
|
+
}>, options?: RPCOptions): Promise<DecisionResult[]> & {
|
|
22
|
+
requestId: string;
|
|
23
|
+
};
|
|
24
|
+
export declare function decide(params: DecideParams, options?: RPCOptions): Promise<DecisionResponse> & {
|
|
25
|
+
requestId: string;
|
|
26
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { send } from '../dispatch.js';
|
|
2
|
+
import { decideParamsSchema, decideResponseSchema } from '../schemas/index.js';
|
|
3
|
+
import { InvalidResponseError } from '../errors/index.js';
|
|
4
|
+
import { decoratePromise } from '../utils/decorate-promise.js';
|
|
5
|
+
import { generateRequestId } from '../runtime/request-id.js';
|
|
6
|
+
import { parseClientInput } from './parse-input.js';
|
|
7
|
+
export function decide(params, options) {
|
|
8
|
+
const requestId = generateRequestId();
|
|
9
|
+
return decoratePromise(runDecide(params, requestId, options), { requestId });
|
|
10
|
+
}
|
|
11
|
+
async function runDecide(params, requestId, options) {
|
|
12
|
+
const input = parseClientInput(decideParamsSchema, params);
|
|
13
|
+
const response = await send({ ...input, type: 'decide', requestId }, options);
|
|
14
|
+
if (response.type !== 'decide')
|
|
15
|
+
throw new InvalidResponseError('decide');
|
|
16
|
+
const parsed = decideResponseSchema.safeParse(response);
|
|
17
|
+
if (!parsed.success)
|
|
18
|
+
throw new InvalidResponseError('decide', parsed.error);
|
|
19
|
+
const { result } = parsed.data;
|
|
20
|
+
if ('states' in input
|
|
21
|
+
? !Array.isArray(result) || result.length !== input.states.length
|
|
22
|
+
: Array.isArray(result)) {
|
|
23
|
+
throw new InvalidResponseError('decide');
|
|
24
|
+
}
|
|
25
|
+
return result;
|
|
26
|
+
}
|
|
@@ -12,7 +12,7 @@ export declare function getModelInfo(params: GetModelInfoParams): Promise<{
|
|
|
12
12
|
modelId: string;
|
|
13
13
|
expectedSize: number;
|
|
14
14
|
sha256Checksum: string;
|
|
15
|
-
addon: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | "other";
|
|
15
|
+
addon: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "moss-transcribe" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | "other";
|
|
16
16
|
isCached: boolean;
|
|
17
17
|
isLoaded: boolean;
|
|
18
18
|
cacheFiles: {
|
package/dist/api/index.d.ts
CHANGED
|
@@ -36,3 +36,4 @@ export { state } from './state.js';
|
|
|
36
36
|
export { vla, vlaHparams, vlaSetEmbodiment } from './vla.js';
|
|
37
37
|
export { vlaPreprocessImage, vlaPadState, VLA_DEFAULT_IMAGE_SIZE } from './vla-helpers.js';
|
|
38
38
|
export { startRpcServer, stopRpcServer, discoverRpcServers } from './rpc-server.js';
|
|
39
|
+
export { decide } from './decide.js';
|
package/dist/api/index.js
CHANGED
|
@@ -35,3 +35,4 @@ export { state } from './state.js';
|
|
|
35
35
|
export { vla, vlaHparams, vlaSetEmbodiment } from './vla.js';
|
|
36
36
|
export { vlaPreprocessImage, vlaPadState, VLA_DEFAULT_IMAGE_SIZE } from './vla-helpers.js';
|
|
37
37
|
export { startRpcServer, stopRpcServer, discoverRpcServers } from './rpc-server.js';
|
|
38
|
+
export { decide } from './decide.js';
|
|
@@ -83,6 +83,7 @@ export declare function textToSpeech(params: TtsClientParamsInput, options?: RPC
|
|
|
83
83
|
* so `await result.sampleRate` can never hang or reject on its own.
|
|
84
84
|
*/
|
|
85
85
|
export type TtsSideChannel = {
|
|
86
|
+
text: Promise<string | undefined>;
|
|
86
87
|
sampleRate: Promise<number | undefined>;
|
|
87
88
|
stats: Promise<TtsStats | undefined>;
|
|
88
89
|
stopReason: Promise<'completed' | 'cancelled' | undefined>;
|
|
@@ -132,29 +132,12 @@ export class TtsMulticast {
|
|
|
132
132
|
}
|
|
133
133
|
function buildTtsRequest(params, requestId) {
|
|
134
134
|
return {
|
|
135
|
+
...params,
|
|
135
136
|
type: 'textToSpeech',
|
|
136
|
-
modelId: params.modelId,
|
|
137
137
|
requestId,
|
|
138
138
|
inputType: params.inputType ?? 'text',
|
|
139
|
-
text: params.text,
|
|
140
139
|
stream: params.stream ?? true,
|
|
141
|
-
sentenceStream: params.sentenceStream ?? false
|
|
142
|
-
...(params.sentenceStreamLocale !== undefined && {
|
|
143
|
-
sentenceStreamLocale: params.sentenceStreamLocale
|
|
144
|
-
}),
|
|
145
|
-
...(params.sentenceStreamMaxChunkScalars !== undefined && {
|
|
146
|
-
sentenceStreamMaxChunkScalars: params.sentenceStreamMaxChunkScalars
|
|
147
|
-
}),
|
|
148
|
-
...(params.description !== undefined && { description: params.description }),
|
|
149
|
-
...(params.voiceDescription !== undefined && { voiceDescription: params.voiceDescription }),
|
|
150
|
-
...(params.voice !== undefined && { voice: params.voice }),
|
|
151
|
-
...(params.emotion !== undefined && { emotion: params.emotion }),
|
|
152
|
-
...(params.pitch !== undefined && { pitch: params.pitch }),
|
|
153
|
-
...(params.pace !== undefined && { pace: params.pace }),
|
|
154
|
-
...(params.expressivity !== undefined && { expressivity: params.expressivity }),
|
|
155
|
-
...(params.noise !== undefined && { noise: params.noise }),
|
|
156
|
-
...(params.reverb !== undefined && { reverb: params.reverb }),
|
|
157
|
-
...(params.quality !== undefined && { quality: params.quality })
|
|
140
|
+
sentenceStream: params.sentenceStream ?? false
|
|
158
141
|
};
|
|
159
142
|
}
|
|
160
143
|
function buildTextToSpeechStreamRequest(params, requestId) {
|
|
@@ -253,6 +236,11 @@ export function textToSpeech(params, options) {
|
|
|
253
236
|
}
|
|
254
237
|
/** Exported for test use; not part of the public API surface. */
|
|
255
238
|
export function createTtsSideChannel() {
|
|
239
|
+
let resolveText;
|
|
240
|
+
const text = new Promise((resolve) => {
|
|
241
|
+
resolveText = resolve;
|
|
242
|
+
});
|
|
243
|
+
let seenText;
|
|
256
244
|
let resolveSampleRate;
|
|
257
245
|
let resolveStats;
|
|
258
246
|
let resolveStopReason;
|
|
@@ -270,10 +258,13 @@ export function createTtsSideChannel() {
|
|
|
270
258
|
let seenStopReason;
|
|
271
259
|
let settled = false;
|
|
272
260
|
return {
|
|
261
|
+
text,
|
|
273
262
|
sampleRate,
|
|
274
263
|
stats,
|
|
275
264
|
stopReason,
|
|
276
265
|
observe(response) {
|
|
266
|
+
if (response.text !== undefined)
|
|
267
|
+
seenText = response.text;
|
|
277
268
|
// Resolve on the FIRST frame that carries a rate, not at end of stream:
|
|
278
269
|
// a caller opening an audio device wants it before draining the audio.
|
|
279
270
|
// Promise resolution is idempotent, so settle() can still resolve the
|
|
@@ -291,6 +282,7 @@ export function createTtsSideChannel() {
|
|
|
291
282
|
if (settled)
|
|
292
283
|
return;
|
|
293
284
|
settled = true;
|
|
285
|
+
resolveText(seenText);
|
|
294
286
|
resolveSampleRate(seenSampleRate);
|
|
295
287
|
resolveStats(latestStats);
|
|
296
288
|
resolveStopReason(seenStopReason);
|
|
@@ -331,6 +323,7 @@ function sentenceStreamTts(request, options) {
|
|
|
331
323
|
buffer: Promise.resolve([]),
|
|
332
324
|
done: multicast.done,
|
|
333
325
|
requestId: request.requestId,
|
|
326
|
+
text: side.text,
|
|
334
327
|
sampleRate: side.sampleRate,
|
|
335
328
|
stats: side.stats,
|
|
336
329
|
stopReason: side.stopReason
|
|
@@ -379,6 +372,7 @@ function plainStreamTts(request, options) {
|
|
|
379
372
|
buffer: Promise.resolve([]),
|
|
380
373
|
done,
|
|
381
374
|
requestId: request.requestId,
|
|
375
|
+
text: side.text,
|
|
382
376
|
sampleRate: side.sampleRate,
|
|
383
377
|
stats: side.stats,
|
|
384
378
|
stopReason: side.stopReason
|
|
@@ -431,6 +425,7 @@ function collectTts(request, options) {
|
|
|
431
425
|
buffer: collectTtsBuffer(request, options, resolveDone, rejectDone, side),
|
|
432
426
|
done,
|
|
433
427
|
requestId: request.requestId,
|
|
428
|
+
text: side.text,
|
|
434
429
|
sampleRate: side.sampleRate,
|
|
435
430
|
stats: side.stats,
|
|
436
431
|
stopReason: side.stopReason
|
|
@@ -449,6 +444,7 @@ async function collectTtsBuffer(request, options, resolveDone, rejectDone, side)
|
|
|
449
444
|
buffer = buffer.concat(response.buffer);
|
|
450
445
|
if (response.done) {
|
|
451
446
|
resolveDone(true);
|
|
447
|
+
break;
|
|
452
448
|
}
|
|
453
449
|
}
|
|
454
450
|
return buffer;
|
package/dist/api/transcribe.js
CHANGED
|
@@ -12,7 +12,9 @@ function buildTranscribeRequest(params, requestId) {
|
|
|
12
12
|
audioChunk: typeof params.audioChunk === 'string'
|
|
13
13
|
? { type: 'filePath', value: params.audioChunk }
|
|
14
14
|
: { type: 'base64', value: params.audioChunk.toString('base64') },
|
|
15
|
-
...(params.prompt && { prompt: params.prompt }),
|
|
15
|
+
...(params.prompt !== undefined && params.prompt !== null && { prompt: params.prompt }),
|
|
16
|
+
...(params.hotwords !== undefined && { hotwords: params.hotwords }),
|
|
17
|
+
...(params.maxNewTokens !== undefined && { maxNewTokens: params.maxNewTokens }),
|
|
16
18
|
...(params.metadata === true && { metadata: true }),
|
|
17
19
|
requestId
|
|
18
20
|
};
|
|
@@ -297,7 +299,8 @@ export function processLineConversation(line, wantsMetadata, onTerminal) {
|
|
|
297
299
|
type: 'vad',
|
|
298
300
|
speaking: response.vad.speaking,
|
|
299
301
|
probability: response.vad.probability,
|
|
300
|
-
...(response.vad.source && { source: response.vad.source })
|
|
302
|
+
...(response.vad.source && { source: response.vad.source }),
|
|
303
|
+
...(response.vad.speakerId !== undefined && { speakerId: response.vad.speakerId })
|
|
301
304
|
};
|
|
302
305
|
}
|
|
303
306
|
if (response.endOfTurn) {
|
|
@@ -9,10 +9,10 @@ export declare function createVideoStreamRequest(params: VideoClientParams, requ
|
|
|
9
9
|
prompt: string;
|
|
10
10
|
seed?: number | undefined;
|
|
11
11
|
vae_tiling?: boolean | undefined;
|
|
12
|
+
steps?: number | undefined;
|
|
12
13
|
negative_prompt?: string | undefined;
|
|
13
14
|
width?: number | undefined;
|
|
14
15
|
height?: number | undefined;
|
|
15
|
-
steps?: number | undefined;
|
|
16
16
|
cfg_scale?: number | undefined;
|
|
17
17
|
sampling_method?: "euler" | "euler_a" | "heun" | "dpm2" | "dpm++2m" | "dpm++2mv2" | "dpm++2s_a" | "lcm" | "ipndm" | "ipndm_v" | "ddim_trailing" | "tcd" | "res_multistep" | "res_2s" | undefined;
|
|
18
18
|
scheduler?: "lcm" | "discrete" | "karras" | "exponential" | "ays" | "gits" | "sgm_uniform" | "simple" | "smoothstep" | "kl_optimal" | "bong_tangent" | "ltx2" | undefined;
|
|
@@ -50,10 +50,10 @@ export declare function createVideoStreamRequest(params: VideoClientParams, requ
|
|
|
50
50
|
prompt: string;
|
|
51
51
|
seed?: number | undefined;
|
|
52
52
|
vae_tiling?: boolean | undefined;
|
|
53
|
+
steps?: number | undefined;
|
|
53
54
|
negative_prompt?: string | undefined;
|
|
54
55
|
width?: number | undefined;
|
|
55
56
|
height?: number | undefined;
|
|
56
|
-
steps?: number | undefined;
|
|
57
57
|
cfg_scale?: number | undefined;
|
|
58
58
|
sampling_method?: "euler" | "euler_a" | "heun" | "dpm2" | "dpm++2m" | "dpm++2mv2" | "dpm++2s_a" | "lcm" | "ipndm" | "ipndm_v" | "ddim_trailing" | "tcd" | "res_multistep" | "res_2s" | undefined;
|
|
59
59
|
scheduler?: "lcm" | "discrete" | "karras" | "exponential" | "ays" | "gits" | "sgm_uniform" | "simple" | "smoothstep" | "kl_optimal" | "bong_tangent" | "ltx2" | undefined;
|
|
@@ -91,10 +91,10 @@ export declare function createVideoStreamRequest(params: VideoClientParams, requ
|
|
|
91
91
|
prompt: string;
|
|
92
92
|
seed?: number | undefined;
|
|
93
93
|
vae_tiling?: boolean | undefined;
|
|
94
|
+
steps?: number | undefined;
|
|
94
95
|
negative_prompt?: string | undefined;
|
|
95
96
|
width?: number | undefined;
|
|
96
97
|
height?: number | undefined;
|
|
97
|
-
steps?: number | undefined;
|
|
98
98
|
cfg_scale?: number | undefined;
|
|
99
99
|
sampling_method?: "euler" | "euler_a" | "heun" | "dpm2" | "dpm++2m" | "dpm++2mv2" | "dpm++2s_a" | "lcm" | "ipndm" | "ipndm_v" | "ddim_trailing" | "tcd" | "res_multistep" | "res_2s" | undefined;
|
|
100
100
|
scheduler?: "lcm" | "discrete" | "karras" | "exponential" | "ays" | "gits" | "sgm_uniform" | "simple" | "smoothstep" | "kl_optimal" | "bong_tangent" | "ltx2" | undefined;
|
|
@@ -132,10 +132,10 @@ export declare function createVideoStreamRequest(params: VideoClientParams, requ
|
|
|
132
132
|
prompt: string;
|
|
133
133
|
seed?: number | undefined;
|
|
134
134
|
vae_tiling?: boolean | undefined;
|
|
135
|
+
steps?: number | undefined;
|
|
135
136
|
negative_prompt?: string | undefined;
|
|
136
137
|
width?: number | undefined;
|
|
137
138
|
height?: number | undefined;
|
|
138
|
-
steps?: number | undefined;
|
|
139
139
|
cfg_scale?: number | undefined;
|
|
140
140
|
sampling_method?: "euler" | "euler_a" | "heun" | "dpm2" | "dpm++2m" | "dpm++2mv2" | "dpm++2s_a" | "lcm" | "ipndm" | "ipndm_v" | "ddim_trailing" | "tcd" | "res_multistep" | "res_2s" | undefined;
|
|
141
141
|
scheduler?: "lcm" | "discrete" | "karras" | "exponential" | "ays" | "gits" | "sgm_uniform" | "simple" | "smoothstep" | "kl_optimal" | "bong_tangent" | "ltx2" | undefined;
|
|
@@ -173,10 +173,10 @@ export declare function createVideoStreamRequest(params: VideoClientParams, requ
|
|
|
173
173
|
prompt: string;
|
|
174
174
|
seed?: number | undefined;
|
|
175
175
|
vae_tiling?: boolean | undefined;
|
|
176
|
+
steps?: number | undefined;
|
|
176
177
|
negative_prompt?: string | undefined;
|
|
177
178
|
width?: number | undefined;
|
|
178
179
|
height?: number | undefined;
|
|
179
|
-
steps?: number | undefined;
|
|
180
180
|
cfg_scale?: number | undefined;
|
|
181
181
|
sampling_method?: "euler" | "euler_a" | "heun" | "dpm2" | "dpm++2m" | "dpm++2mv2" | "dpm++2s_a" | "lcm" | "ipndm" | "ipndm_v" | "ddim_trailing" | "tcd" | "res_multistep" | "res_2s" | undefined;
|
|
182
182
|
scheduler?: "lcm" | "discrete" | "karras" | "exponential" | "ays" | "gits" | "sgm_uniform" | "simple" | "smoothstep" | "kl_optimal" | "bong_tangent" | "ltx2" | undefined;
|
package/dist/api/video.d.ts
CHANGED
|
@@ -16,13 +16,14 @@ export interface VideoResult {
|
|
|
16
16
|
* @param params - Video request parameters (model, prompt, dimensions, frame count, fps, sampler, seed, etc.).
|
|
17
17
|
* @returns A result object exposing `requestId` (stable identifier for this in-flight generation), `progressStream` (async iterator of `{ step, totalSteps, elapsedMs }`), `outputs` (promise of the generated video buffers, typically a single AVI file), and `stats` (promise of generation statistics).
|
|
18
18
|
*
|
|
19
|
-
* Supports `txt2vid` (text-to-video) and `img2vid` (image-to-video) for
|
|
20
|
-
*
|
|
19
|
+
* Supports `txt2vid` (text-to-video) and `img2vid` (image-to-video) for the Wan,
|
|
20
|
+
* LTX-2, and MiniMax-H3 layouts. For Wan `img2vid`, load the pipeline with
|
|
21
21
|
* `modelConfig.clipVisionModelSrc` set to `clip_vision_h.safetensors`; LTX-2
|
|
22
22
|
* `img2vid` conditions on the first frame through its video VAE and needs no
|
|
23
23
|
* CLIP vision weights (the same LTX-2 model loaded for txt2vid also does
|
|
24
|
-
* img2vid).
|
|
25
|
-
* for
|
|
24
|
+
* img2vid). MiniMax-H3 also conditions through its video VAE and can optionally
|
|
25
|
+
* load `modelConfig.audioVaeModelSrc` for synchronized audio. On React Native,
|
|
26
|
+
* the bundled video diffusion models are too large for typical mobile devices.
|
|
26
27
|
*
|
|
27
28
|
* @example Basic txt2vid generation
|
|
28
29
|
* ```typescript
|
package/dist/api/video.js
CHANGED
|
@@ -9,13 +9,14 @@ import { decodeBase64 } from '../utils/encoding.js';
|
|
|
9
9
|
* @param params - Video request parameters (model, prompt, dimensions, frame count, fps, sampler, seed, etc.).
|
|
10
10
|
* @returns A result object exposing `requestId` (stable identifier for this in-flight generation), `progressStream` (async iterator of `{ step, totalSteps, elapsedMs }`), `outputs` (promise of the generated video buffers, typically a single AVI file), and `stats` (promise of generation statistics).
|
|
11
11
|
*
|
|
12
|
-
* Supports `txt2vid` (text-to-video) and `img2vid` (image-to-video) for
|
|
13
|
-
*
|
|
12
|
+
* Supports `txt2vid` (text-to-video) and `img2vid` (image-to-video) for the Wan,
|
|
13
|
+
* LTX-2, and MiniMax-H3 layouts. For Wan `img2vid`, load the pipeline with
|
|
14
14
|
* `modelConfig.clipVisionModelSrc` set to `clip_vision_h.safetensors`; LTX-2
|
|
15
15
|
* `img2vid` conditions on the first frame through its video VAE and needs no
|
|
16
16
|
* CLIP vision weights (the same LTX-2 model loaded for txt2vid also does
|
|
17
|
-
* img2vid).
|
|
18
|
-
* for
|
|
17
|
+
* img2vid). MiniMax-H3 also conditions through its video VAE and can optionally
|
|
18
|
+
* load `modelConfig.audioVaeModelSrc` for synchronized audio. On React Native,
|
|
19
|
+
* the bundled video diffusion models are too large for typical mobile devices.
|
|
19
20
|
*
|
|
20
21
|
* @example Basic txt2vid generation
|
|
21
22
|
* ```typescript
|
package/dist/errors/index.d.ts
CHANGED
|
@@ -66,6 +66,9 @@ export declare class ModelFileNotFoundError extends QvacErrorBase {
|
|
|
66
66
|
export declare class ModelFileNotFoundInDirError extends QvacErrorBase {
|
|
67
67
|
constructor(modelFile: string, modelDir: string, modelType: string, cause?: unknown);
|
|
68
68
|
}
|
|
69
|
+
export declare class ModelFitRefusedError extends QvacErrorBase {
|
|
70
|
+
constructor(modelType: string, reason: string, detail?: string, cause?: unknown);
|
|
71
|
+
}
|
|
69
72
|
export declare class ModelFileLocateFailedError extends QvacErrorBase {
|
|
70
73
|
constructor(modelType: string, modelPath: string, cause?: unknown);
|
|
71
74
|
}
|
package/dist/errors/index.js
CHANGED
|
@@ -117,6 +117,11 @@ export class ModelFileNotFoundInDirError extends QvacErrorBase {
|
|
|
117
117
|
super(createErrorOptions(ERROR_CODES.MODEL_FILE_NOT_FOUND_IN_DIR, [modelFile, modelDir, modelType], cause));
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
+
export class ModelFitRefusedError extends QvacErrorBase {
|
|
121
|
+
constructor(modelType, reason, detail, cause) {
|
|
122
|
+
super(createErrorOptions(ERROR_CODES.MODEL_FIT_REFUSED, detail === undefined ? [modelType, reason] : [modelType, reason, detail], cause));
|
|
123
|
+
}
|
|
124
|
+
}
|
|
120
125
|
export class ModelFileLocateFailedError extends QvacErrorBase {
|
|
121
126
|
constructor(modelType, modelPath, cause) {
|
|
122
127
|
super(createErrorOptions(ERROR_CODES.MODEL_FILE_LOCATE_FAILED, [modelType, modelPath], cause));
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { AssessModelFitRequest, AssessModelFitResponse, ModelFitCandidate, ModelFitEstimateTarget } from '../schemas/assess-model-fit.js';
|
|
2
|
+
import type { FitStubUnavailableReason } from '../resources/model-fit/fit-stub/fetch-fit-stub.js';
|
|
2
3
|
/**
|
|
3
4
|
* Runs a pre-download fit assessment worker-side.
|
|
4
5
|
*
|
|
5
6
|
* This lives on the worker because that is where the three things it needs
|
|
6
7
|
* already are: the resource collector for a fresh memory sample, the runtime's
|
|
7
8
|
* own platform/arch pair, and the registry client. No weights are read and
|
|
8
|
-
* nothing is loaded —
|
|
9
|
-
*
|
|
10
|
-
* answer instead of the coefficients modelling it.
|
|
9
|
+
* nothing is loaded — each candidate additionally has the registry's weightless
|
|
10
|
+
* description fetched, tens of KB, so the engine's own fitter can answer.
|
|
11
11
|
*/
|
|
12
12
|
export declare function handleAssessModelFit(request: AssessModelFitRequest): Promise<AssessModelFitResponse>;
|
|
13
13
|
/**
|
|
@@ -20,3 +20,5 @@ export declare function handleAssessModelFit(request: AssessModelFitRequest): Pr
|
|
|
20
20
|
* type stands in as the label.
|
|
21
21
|
*/
|
|
22
22
|
export declare function estimateTargetFor(candidate: ModelFitCandidate): ModelFitEstimateTarget;
|
|
23
|
+
/** Why a load with no description staged for it has no engine verdict. */
|
|
24
|
+
export declare function noStubDetail(reason: FitStubUnavailableReason, message?: string): string;
|