@qvac/inference 0.21.0 → 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 +50 -25
- 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
|
@@ -1,75 +1,17 @@
|
|
|
1
1
|
import TranslationNmtcpp from '@qvac/translation-nmtcpp';
|
|
2
|
-
import { definePlugin, defineHandler, translateRequestSchema, translateResponseSchema, ModelType, nmtConfigBaseSchema, ADDON_NMT
|
|
2
|
+
import { definePlugin, defineHandler, translateRequestSchema, translateResponseSchema, ModelType, nmtConfigBaseSchema, ADDON_NMT } from '../../../schemas/index.js';
|
|
3
3
|
import { createStreamLogger, registerAddonLogger } from '../../../logging/index.js';
|
|
4
|
-
import path from 'bare-path';
|
|
5
4
|
import { translate } from '../../ops/translate.js';
|
|
6
5
|
import { attachModelExecutionMs } from '../../../profiling/model-execution.js';
|
|
6
|
+
import { nmtConfigFor, nmtFilesFor } from './load-files.js';
|
|
7
7
|
import { resolveBergamotVocab } from './resolve-vocab.js';
|
|
8
|
-
|
|
9
|
-
* Derive absolute vocab paths from a resolved Bergamot model path.
|
|
10
|
-
* Works for both companion-set layout (colocated files) and any layout where
|
|
11
|
-
* vocab follows the standard naming convention beside the model binary.
|
|
12
|
-
* Returns null if modelPath is not a recognisable Bergamot model.
|
|
13
|
-
*/
|
|
14
|
-
function deriveColocatedBergamotVocabPaths(modelPath) {
|
|
15
|
-
const dirPath = path.dirname(modelPath);
|
|
16
|
-
const basePath = path.basename(modelPath);
|
|
17
|
-
const match = basePath.match(/^model\.([a-z]+)\.intgemm\.alphas\.bin$/);
|
|
18
|
-
if (!match?.[1])
|
|
19
|
-
return null;
|
|
20
|
-
const langPair = match[1];
|
|
21
|
-
if (BERGAMOT_CJK_LANG_PAIRS.includes(langPair)) {
|
|
22
|
-
return {
|
|
23
|
-
srcVocabPath: path.join(dirPath, `srcvocab.${langPair}.spm`),
|
|
24
|
-
dstVocabPath: path.join(dirPath, `trgvocab.${langPair}.spm`)
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
const sharedPath = path.join(dirPath, `vocab.${langPair}.spm`);
|
|
28
|
-
return { srcVocabPath: sharedPath, dstVocabPath: sharedPath };
|
|
29
|
-
}
|
|
30
|
-
function createNmtModel(modelId, modelPath, nmtConfig, srcVocabPath, dstVocabPath, pivotModelPath, pivotSrcVocabPath, pivotDstVocabPath) {
|
|
8
|
+
function createNmtModel(modelId, files, nmtConfig) {
|
|
31
9
|
const logger = createStreamLogger(modelId, ModelType.nmtcppTranslation);
|
|
32
10
|
registerAddonLogger(modelId, ModelType.nmtcppTranslation, logger);
|
|
33
|
-
const { from, to, engine, beamsize, lengthpenalty, maxlength, repetitionpenalty, norepeatngramsize, temperature, topk, topp } = nmtConfig;
|
|
34
|
-
const files = {
|
|
35
|
-
model: modelPath,
|
|
36
|
-
...(srcVocabPath && { srcVocab: srcVocabPath }),
|
|
37
|
-
...(dstVocabPath && { dstVocab: dstVocabPath }),
|
|
38
|
-
...(pivotModelPath && { pivotModel: pivotModelPath }),
|
|
39
|
-
...(pivotSrcVocabPath && { pivotSrcVocab: pivotSrcVocabPath }),
|
|
40
|
-
...(pivotDstVocabPath && { pivotDstVocab: pivotDstVocabPath })
|
|
41
|
-
};
|
|
42
|
-
const generationParams = {
|
|
43
|
-
beamsize,
|
|
44
|
-
lengthpenalty,
|
|
45
|
-
maxlength,
|
|
46
|
-
repetitionpenalty,
|
|
47
|
-
norepeatngramsize,
|
|
48
|
-
temperature,
|
|
49
|
-
topk,
|
|
50
|
-
topp
|
|
51
|
-
};
|
|
52
|
-
const config = {
|
|
53
|
-
modelType: TranslationNmtcpp.ModelTypes[engine],
|
|
54
|
-
...generationParams,
|
|
55
|
-
...(nmtConfig.engine === 'Bergamot' && {
|
|
56
|
-
...(nmtConfig.normalize !== undefined && {
|
|
57
|
-
normalize: nmtConfig.normalize
|
|
58
|
-
}),
|
|
59
|
-
...(nmtConfig.pivotModel &&
|
|
60
|
-
pivotModelPath && {
|
|
61
|
-
pivotConfig: (() => {
|
|
62
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
63
|
-
const { modelSrc, dstVocabSrc, srcVocabSrc, ...pivotGenConfig } = nmtConfig.pivotModel;
|
|
64
|
-
return pivotGenConfig;
|
|
65
|
-
})()
|
|
66
|
-
})
|
|
67
|
-
})
|
|
68
|
-
};
|
|
69
11
|
const model = new TranslationNmtcpp({
|
|
70
12
|
files,
|
|
71
|
-
params: { srcLang: from, dstLang: to },
|
|
72
|
-
config,
|
|
13
|
+
params: { srcLang: nmtConfig.from, dstLang: nmtConfig.to },
|
|
14
|
+
config: nmtConfigFor(nmtConfig, files.pivotModel),
|
|
73
15
|
logger,
|
|
74
16
|
opts: { stats: true }
|
|
75
17
|
});
|
|
@@ -80,6 +22,7 @@ export const nmtPlugin = definePlugin({
|
|
|
80
22
|
displayName: 'NMT (nmtcpp)',
|
|
81
23
|
addonPackage: ADDON_NMT,
|
|
82
24
|
loadConfigSchema: nmtConfigBaseSchema,
|
|
25
|
+
assessFit: TranslationNmtcpp.assessFit,
|
|
83
26
|
async resolveConfig(cfg, ctx) {
|
|
84
27
|
const { srcVocabSrc, dstVocabSrc, pivotModel, ...nmtConfig } = cfg;
|
|
85
28
|
if (nmtConfig.engine !== 'Bergamot') {
|
|
@@ -90,15 +33,8 @@ export const nmtPlugin = definePlugin({
|
|
|
90
33
|
},
|
|
91
34
|
createModel(params) {
|
|
92
35
|
const nmtConfig = (params.modelConfig ?? {});
|
|
93
|
-
const
|
|
94
|
-
const
|
|
95
|
-
const srcVocabPath = artifacts['srcVocabPath'] ?? derived?.srcVocabPath;
|
|
96
|
-
const dstVocabPath = artifacts['dstVocabPath'] ?? derived?.dstVocabPath;
|
|
97
|
-
const pivotModelPath = artifacts['pivotModelPath'];
|
|
98
|
-
const pivotDerived = pivotModelPath ? deriveColocatedBergamotVocabPaths(pivotModelPath) : null;
|
|
99
|
-
const pivotSrcVocabPath = artifacts['pivotSrcVocabPath'] ?? pivotDerived?.srcVocabPath;
|
|
100
|
-
const pivotDstVocabPath = artifacts['pivotDstVocabPath'] ?? pivotDerived?.dstVocabPath;
|
|
101
|
-
const { model } = createNmtModel(params.modelId, params.modelPath, nmtConfig, srcVocabPath, dstVocabPath, pivotModelPath, pivotSrcVocabPath, pivotDstVocabPath);
|
|
36
|
+
const files = nmtFilesFor(params.modelPath, params.artifacts ?? {});
|
|
37
|
+
const { model } = createNmtModel(params.modelId, files, nmtConfig);
|
|
102
38
|
return { model };
|
|
103
39
|
},
|
|
104
40
|
handlers: {
|
|
@@ -137,7 +73,7 @@ export const nmtPlugin = definePlugin({
|
|
|
137
73
|
})
|
|
138
74
|
},
|
|
139
75
|
logging: {
|
|
140
|
-
module: () => import('@qvac/translation-nmtcpp/addonLogging'),
|
|
76
|
+
module: () => import('@qvac/translation-nmtcpp/addonLogging.js'),
|
|
141
77
|
namespace: ModelType.nmtcppTranslation
|
|
142
78
|
}
|
|
143
79
|
});
|
|
@@ -5,7 +5,7 @@ export declare const parakeetPlugin: {
|
|
|
5
5
|
addonPackage: "@qvac/asr-ggml";
|
|
6
6
|
loadConfigSchema: import("zod").ZodObject<{
|
|
7
7
|
[x: string]: import("zod").ZodOptional<import("zod").ZodUnknown>;
|
|
8
|
-
}, import("zod/v4/core").$strict>;
|
|
8
|
+
}, import("zod/v4/core/index.js").$strict>;
|
|
9
9
|
assessFit: typeof import("node_modules/@qvac/asr-ggml/lib/fit").assessFit;
|
|
10
10
|
resolveConfig(cfg: ParakeetConfig): Promise<ResolveResult<ParakeetConfig>>;
|
|
11
11
|
createModel(params: CreateModelParams): PluginModelResult;
|
|
@@ -17,13 +17,15 @@ export declare const parakeetPlugin: {
|
|
|
17
17
|
audioChunk: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
18
18
|
type: import("zod").ZodLiteral<"base64">;
|
|
19
19
|
value: import("zod").ZodString;
|
|
20
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
20
|
+
}, import("zod/v4/core/index.js").$strip>, import("zod").ZodObject<{
|
|
21
21
|
type: import("zod").ZodLiteral<"filePath">;
|
|
22
22
|
value: import("zod").ZodString;
|
|
23
|
-
}, import("zod/v4/core").$strip>], "type">;
|
|
23
|
+
}, import("zod/v4/core/index.js").$strip>], "type">;
|
|
24
|
+
hotwords: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
25
|
+
maxNewTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
24
26
|
type: import("zod").ZodLiteral<"transcribe">;
|
|
25
27
|
requestId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
26
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
28
|
+
}, import("zod/v4/core/index.js").$strip>, import("zod").ZodObject<{
|
|
27
29
|
text: import("zod").ZodOptional<import("zod").ZodString>;
|
|
28
30
|
done: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
29
31
|
stats: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
@@ -54,7 +56,7 @@ export declare const parakeetPlugin: {
|
|
|
54
56
|
totalEncodedFrames: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
55
57
|
encoderOnCoreml: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
56
58
|
encoderUsedCoreml: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
57
|
-
}, import("zod/v4/core").$strip>>;
|
|
59
|
+
}, import("zod/v4/core/index.js").$strip>>;
|
|
58
60
|
error: import("zod").ZodOptional<import("zod").ZodString>;
|
|
59
61
|
segment: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
60
62
|
text: import("zod").ZodString;
|
|
@@ -62,10 +64,18 @@ export declare const parakeetPlugin: {
|
|
|
62
64
|
endMs: import("zod").ZodNumber;
|
|
63
65
|
append: import("zod").ZodBoolean;
|
|
64
66
|
id: import("zod").ZodNumber;
|
|
67
|
+
speakerId: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
68
|
+
speaker: import("zod").ZodOptional<import("zod").ZodString>;
|
|
69
|
+
speakerSegments: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
70
|
+
speakerId: import("zod").ZodNumber;
|
|
71
|
+
startMs: import("zod").ZodNumber;
|
|
72
|
+
endMs: import("zod").ZodNumber;
|
|
73
|
+
}, import("zod/v4/core/index.js").$strip>>>;
|
|
65
74
|
isEndOfTurn: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
66
75
|
startsWord: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
67
|
-
}, import("zod/v4/core").$strip>>;
|
|
76
|
+
}, import("zod/v4/core/index.js").$strip>>;
|
|
68
77
|
vad: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
78
|
+
speakerId: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
69
79
|
speaking: import("zod").ZodBoolean;
|
|
70
80
|
probability: import("zod").ZodNumber;
|
|
71
81
|
source: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
@@ -73,13 +83,13 @@ export declare const parakeetPlugin: {
|
|
|
73
83
|
energy: "energy";
|
|
74
84
|
sortformer: "sortformer";
|
|
75
85
|
}>>;
|
|
76
|
-
}, import("zod/v4/core").$strip>>;
|
|
86
|
+
}, import("zod/v4/core/index.js").$strip>>;
|
|
77
87
|
endOfTurn: import("zod").ZodOptional<import("zod").ZodPreprocess<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
78
88
|
source: import("zod").ZodLiteral<"whisper">;
|
|
79
89
|
silenceDurationMs: import("zod").ZodNumber;
|
|
80
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
90
|
+
}, import("zod/v4/core/index.js").$strip>, import("zod").ZodObject<{
|
|
81
91
|
source: import("zod").ZodLiteral<"parakeet">;
|
|
82
|
-
}, import("zod/v4/core").$strip>], "source">, unknown>>;
|
|
92
|
+
}, import("zod/v4/core/index.js").$strip>], "source">, unknown>>;
|
|
83
93
|
diagnostics: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
84
94
|
selectedBackend: import("zod").ZodString;
|
|
85
95
|
selectedDevice: import("zod").ZodEnum<{
|
|
@@ -87,21 +97,21 @@ export declare const parakeetPlugin: {
|
|
|
87
97
|
gpu: "gpu";
|
|
88
98
|
}>;
|
|
89
99
|
graphicsApi: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
100
|
+
cuda: "cuda";
|
|
90
101
|
vulkan: "vulkan";
|
|
91
102
|
metal: "metal";
|
|
92
103
|
opencl: "opencl";
|
|
93
|
-
|
|
104
|
+
rocm: "rocm";
|
|
94
105
|
opengl: "opengl";
|
|
95
106
|
webgpu: "webgpu";
|
|
96
107
|
direct3d11: "direct3d11";
|
|
97
108
|
direct3d12: "direct3d12";
|
|
98
109
|
levelZero: "levelZero";
|
|
99
|
-
rocm: "rocm";
|
|
100
110
|
}>>;
|
|
101
111
|
driver: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
102
112
|
name: import("zod").ZodString;
|
|
103
113
|
version: import("zod").ZodOptional<import("zod").ZodString>;
|
|
104
|
-
}, import("zod/v4/core").$strip>>;
|
|
114
|
+
}, import("zod/v4/core/index.js").$strip>>;
|
|
105
115
|
gpuId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
106
116
|
fallback: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
107
117
|
requestedBackend: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -110,7 +120,7 @@ export declare const parakeetPlugin: {
|
|
|
110
120
|
gpu: "gpu";
|
|
111
121
|
}>>;
|
|
112
122
|
reason: import("zod").ZodString;
|
|
113
|
-
}, import("zod/v4/core").$strip>>;
|
|
123
|
+
}, import("zod/v4/core/index.js").$strip>>;
|
|
114
124
|
probe: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
115
125
|
status: import("zod").ZodEnum<{
|
|
116
126
|
unknown: "unknown";
|
|
@@ -119,10 +129,10 @@ export declare const parakeetPlugin: {
|
|
|
119
129
|
}>;
|
|
120
130
|
backend: import("zod").ZodString;
|
|
121
131
|
reason: import("zod").ZodOptional<import("zod").ZodString>;
|
|
122
|
-
}, import("zod/v4/core").$strip>>;
|
|
123
|
-
}, import("zod/v4/core").$strip>>;
|
|
132
|
+
}, import("zod/v4/core/index.js").$strip>>;
|
|
133
|
+
}, import("zod/v4/core/index.js").$strip>>;
|
|
124
134
|
type: import("zod").ZodLiteral<"transcribe">;
|
|
125
|
-
}, import("zod/v4/core").$strip>>;
|
|
135
|
+
}, import("zod/v4/core/index.js").$strip>>;
|
|
126
136
|
transcribeStream: import("../../../schemas/index.js").PluginHandlerDefinition<import("zod").ZodObject<{
|
|
127
137
|
modelId: import("zod").ZodString;
|
|
128
138
|
prompt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -138,15 +148,18 @@ export declare const parakeetPlugin: {
|
|
|
138
148
|
rightLookaheadMs: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
139
149
|
emitPartials: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
140
150
|
emitEnergyVad: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
151
|
+
emitSpeakerVad: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
152
|
+
diarizationThreshold: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
153
|
+
diarizationMinSegmentMs: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
141
154
|
spkCacheEnable: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
142
155
|
spkCacheLen: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
143
156
|
fifoLen: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
144
157
|
chunkLeftContextMs: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
145
158
|
chunkRightContextMs: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
146
159
|
spkCacheUpdatePeriod: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
147
|
-
}, import("zod/v4/core").$strip>>;
|
|
160
|
+
}, import("zod/v4/core/index.js").$strip>>;
|
|
148
161
|
requestId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
149
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
162
|
+
}, import("zod/v4/core/index.js").$strip>, import("zod").ZodObject<{
|
|
150
163
|
text: import("zod").ZodOptional<import("zod").ZodString>;
|
|
151
164
|
done: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
152
165
|
stats: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
@@ -177,7 +190,7 @@ export declare const parakeetPlugin: {
|
|
|
177
190
|
totalEncodedFrames: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
178
191
|
encoderOnCoreml: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
179
192
|
encoderUsedCoreml: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
180
|
-
}, import("zod/v4/core").$strip>>;
|
|
193
|
+
}, import("zod/v4/core/index.js").$strip>>;
|
|
181
194
|
error: import("zod").ZodOptional<import("zod").ZodString>;
|
|
182
195
|
segment: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
183
196
|
text: import("zod").ZodString;
|
|
@@ -185,10 +198,18 @@ export declare const parakeetPlugin: {
|
|
|
185
198
|
endMs: import("zod").ZodNumber;
|
|
186
199
|
append: import("zod").ZodBoolean;
|
|
187
200
|
id: import("zod").ZodNumber;
|
|
201
|
+
speakerId: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
202
|
+
speaker: import("zod").ZodOptional<import("zod").ZodString>;
|
|
203
|
+
speakerSegments: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
204
|
+
speakerId: import("zod").ZodNumber;
|
|
205
|
+
startMs: import("zod").ZodNumber;
|
|
206
|
+
endMs: import("zod").ZodNumber;
|
|
207
|
+
}, import("zod/v4/core/index.js").$strip>>>;
|
|
188
208
|
isEndOfTurn: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
189
209
|
startsWord: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
190
|
-
}, import("zod/v4/core").$strip>>;
|
|
210
|
+
}, import("zod/v4/core/index.js").$strip>>;
|
|
191
211
|
vad: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
212
|
+
speakerId: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
192
213
|
speaking: import("zod").ZodBoolean;
|
|
193
214
|
probability: import("zod").ZodNumber;
|
|
194
215
|
source: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
@@ -196,13 +217,13 @@ export declare const parakeetPlugin: {
|
|
|
196
217
|
energy: "energy";
|
|
197
218
|
sortformer: "sortformer";
|
|
198
219
|
}>>;
|
|
199
|
-
}, import("zod/v4/core").$strip>>;
|
|
220
|
+
}, import("zod/v4/core/index.js").$strip>>;
|
|
200
221
|
endOfTurn: import("zod").ZodOptional<import("zod").ZodPreprocess<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
201
222
|
source: import("zod").ZodLiteral<"whisper">;
|
|
202
223
|
silenceDurationMs: import("zod").ZodNumber;
|
|
203
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
224
|
+
}, import("zod/v4/core/index.js").$strip>, import("zod").ZodObject<{
|
|
204
225
|
source: import("zod").ZodLiteral<"parakeet">;
|
|
205
|
-
}, import("zod/v4/core").$strip>], "source">, unknown>>;
|
|
226
|
+
}, import("zod/v4/core/index.js").$strip>], "source">, unknown>>;
|
|
206
227
|
diagnostics: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
207
228
|
selectedBackend: import("zod").ZodString;
|
|
208
229
|
selectedDevice: import("zod").ZodEnum<{
|
|
@@ -210,21 +231,21 @@ export declare const parakeetPlugin: {
|
|
|
210
231
|
gpu: "gpu";
|
|
211
232
|
}>;
|
|
212
233
|
graphicsApi: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
234
|
+
cuda: "cuda";
|
|
213
235
|
vulkan: "vulkan";
|
|
214
236
|
metal: "metal";
|
|
215
237
|
opencl: "opencl";
|
|
216
|
-
|
|
238
|
+
rocm: "rocm";
|
|
217
239
|
opengl: "opengl";
|
|
218
240
|
webgpu: "webgpu";
|
|
219
241
|
direct3d11: "direct3d11";
|
|
220
242
|
direct3d12: "direct3d12";
|
|
221
243
|
levelZero: "levelZero";
|
|
222
|
-
rocm: "rocm";
|
|
223
244
|
}>>;
|
|
224
245
|
driver: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
225
246
|
name: import("zod").ZodString;
|
|
226
247
|
version: import("zod").ZodOptional<import("zod").ZodString>;
|
|
227
|
-
}, import("zod/v4/core").$strip>>;
|
|
248
|
+
}, import("zod/v4/core/index.js").$strip>>;
|
|
228
249
|
gpuId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
229
250
|
fallback: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
230
251
|
requestedBackend: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -233,7 +254,7 @@ export declare const parakeetPlugin: {
|
|
|
233
254
|
gpu: "gpu";
|
|
234
255
|
}>>;
|
|
235
256
|
reason: import("zod").ZodString;
|
|
236
|
-
}, import("zod/v4/core").$strip>>;
|
|
257
|
+
}, import("zod/v4/core/index.js").$strip>>;
|
|
237
258
|
probe: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
238
259
|
status: import("zod").ZodEnum<{
|
|
239
260
|
unknown: "unknown";
|
|
@@ -242,13 +263,13 @@ export declare const parakeetPlugin: {
|
|
|
242
263
|
}>;
|
|
243
264
|
backend: import("zod").ZodString;
|
|
244
265
|
reason: import("zod").ZodOptional<import("zod").ZodString>;
|
|
245
|
-
}, import("zod/v4/core").$strip>>;
|
|
246
|
-
}, import("zod/v4/core").$strip>>;
|
|
266
|
+
}, import("zod/v4/core/index.js").$strip>>;
|
|
267
|
+
}, import("zod/v4/core/index.js").$strip>>;
|
|
247
268
|
type: import("zod").ZodLiteral<"transcribeStream">;
|
|
248
|
-
}, import("zod/v4/core").$strip>>;
|
|
269
|
+
}, import("zod/v4/core/index.js").$strip>>;
|
|
249
270
|
};
|
|
250
271
|
logging: {
|
|
251
|
-
module: () => Promise<typeof import("@qvac/asr-ggml/addonLogging")>;
|
|
272
|
+
module: () => Promise<typeof import("@qvac/asr-ggml/addonLogging.js")>;
|
|
252
273
|
namespace: "@qvac/asr-ggml";
|
|
253
274
|
};
|
|
254
275
|
};
|
|
@@ -58,12 +58,16 @@ export const parakeetPlugin = definePlugin({
|
|
|
58
58
|
modelId: request.modelId,
|
|
59
59
|
audioChunk: request.audioChunk,
|
|
60
60
|
prompt: request.prompt,
|
|
61
|
+
hotwords: request.hotwords,
|
|
62
|
+
maxNewTokens: request.maxNewTokens,
|
|
61
63
|
metadata: true
|
|
62
64
|
}, request.requestId)
|
|
63
65
|
: transcribe({
|
|
64
66
|
modelId: request.modelId,
|
|
65
67
|
audioChunk: request.audioChunk,
|
|
66
|
-
prompt: request.prompt
|
|
68
|
+
prompt: request.prompt,
|
|
69
|
+
hotwords: request.hotwords,
|
|
70
|
+
maxNewTokens: request.maxNewTokens
|
|
67
71
|
}, request.requestId);
|
|
68
72
|
try {
|
|
69
73
|
let result = await stream.next();
|
|
@@ -124,7 +128,18 @@ export const parakeetPlugin = definePlugin({
|
|
|
124
128
|
while (!result.done) {
|
|
125
129
|
const value = result.value;
|
|
126
130
|
if (typeof value === 'object' && value !== null && 'type' in value) {
|
|
127
|
-
if (value.type === '
|
|
131
|
+
if (value.type === 'vad') {
|
|
132
|
+
yield {
|
|
133
|
+
type: 'transcribeStream',
|
|
134
|
+
vad: {
|
|
135
|
+
speaking: value.speaking,
|
|
136
|
+
probability: value.probability,
|
|
137
|
+
...(value.source && { source: value.source }),
|
|
138
|
+
...(value.speakerId !== undefined && { speakerId: value.speakerId })
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
else if (value.type === 'endOfTurn') {
|
|
128
143
|
yield {
|
|
129
144
|
type: 'transcribeStream',
|
|
130
145
|
endOfTurn: { source: 'parakeet' }
|
|
@@ -163,7 +178,7 @@ export const parakeetPlugin = definePlugin({
|
|
|
163
178
|
})
|
|
164
179
|
},
|
|
165
180
|
logging: {
|
|
166
|
-
module: () => import('@qvac/asr-ggml/addonLogging'),
|
|
181
|
+
module: () => import('@qvac/asr-ggml/addonLogging.js'),
|
|
167
182
|
namespace: ADDON_ASR
|
|
168
183
|
}
|
|
169
184
|
});
|
|
@@ -145,8 +145,7 @@ export async function* video(request) {
|
|
|
145
145
|
ctx.scope.defer(() => {
|
|
146
146
|
ctx.signal.removeEventListener('abort', onAbort);
|
|
147
147
|
});
|
|
148
|
-
const
|
|
149
|
-
mode: request.mode,
|
|
148
|
+
const runParams = {
|
|
150
149
|
prompt: request.prompt,
|
|
151
150
|
...(request.negative_prompt !== undefined && {
|
|
152
151
|
negative_prompt: request.negative_prompt
|
|
@@ -192,9 +191,6 @@ export async function* video(request) {
|
|
|
192
191
|
...(request.vace_strength !== undefined && {
|
|
193
192
|
vace_strength: request.vace_strength
|
|
194
193
|
}),
|
|
195
|
-
...(request.init_image !== undefined && {
|
|
196
|
-
init_image: Buffer.from(request.init_image, 'base64')
|
|
197
|
-
}),
|
|
198
194
|
...(request.strength !== undefined && {
|
|
199
195
|
strength: request.strength
|
|
200
196
|
}),
|
|
@@ -227,7 +223,15 @@ export async function* video(request) {
|
|
|
227
223
|
...(request.cache_threshold !== undefined && {
|
|
228
224
|
cache_threshold: request.cache_threshold
|
|
229
225
|
})
|
|
230
|
-
}
|
|
226
|
+
};
|
|
227
|
+
const response = request.mode === 'img2vid'
|
|
228
|
+
? await model.run({
|
|
229
|
+
...runParams,
|
|
230
|
+
mode: 'img2vid',
|
|
231
|
+
// parseVideoRequest requires this field for image-to-video requests.
|
|
232
|
+
init_image: Buffer.from(request.init_image, 'base64')
|
|
233
|
+
})
|
|
234
|
+
: await model.run({ ...runParams, mode: 'txt2vid' });
|
|
231
235
|
let outputIndex = 0;
|
|
232
236
|
for await (const chunk of response.iterate()) {
|
|
233
237
|
if (ctx.signal.aborted)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import WorldStableDiffusion from '@qvac/diffusion-cpp/world';
|
|
2
|
-
import type { WorldConfig } from '@qvac/diffusion-cpp/world';
|
|
1
|
+
import WorldStableDiffusion from '@qvac/diffusion-cpp/world.js';
|
|
2
|
+
import type { WorldConfig } from '@qvac/diffusion-cpp/world.js';
|
|
3
3
|
import type QvacLogger from '@qvac/logging';
|
|
4
4
|
import type { WorldSceneRequest, WorldSceneStreamResponse, WorldStepRequest, WorldStepStreamResponse } from '../../../../schemas/sdcpp-config.js';
|
|
5
5
|
interface WorldSessionArgs {
|
|
@@ -52,7 +52,7 @@ var __disposeResources = (this && this.__disposeResources) || (function (Suppres
|
|
|
52
52
|
});
|
|
53
53
|
import fs, { promises as fsPromises } from 'bare-fs';
|
|
54
54
|
import path from 'bare-path';
|
|
55
|
-
import WorldStableDiffusion from '@qvac/diffusion-cpp/world';
|
|
55
|
+
import WorldStableDiffusion from '@qvac/diffusion-cpp/world.js';
|
|
56
56
|
import { getEngineLogger } from '../../../../logging/index.js';
|
|
57
57
|
import { getModel, getModelEntry } from '../../../../runtime/model-registry.js';
|
|
58
58
|
import { getRequestRegistry, withRequestContext } from '../../../../runtime/index.js';
|