Fix Bare voice models and extension registration
Rolling release / release (push) Successful in 7m11s
Rolling release / release (push) Successful in 7m11s
This commit is contained in:
@@ -99,16 +99,18 @@ function resolveModelConfigAssets(sdk, config) {
|
||||
|
||||
/** Load ASR/TTS models in the same SDK worker and under the same master lock.
|
||||
* These are auxiliary model IDs; they do not create another QVAC runtime. */
|
||||
export async function loadAuxiliaryModel(name, modelConfig = {}) {
|
||||
export async function loadAuxiliaryModel(name, modelConfig = {}, modelType = undefined) {
|
||||
if (!name) throw new Error('auxiliary QVAC model name is required');
|
||||
const existing = auxiliaryModels.get(String(name));
|
||||
if (existing) return existing;
|
||||
const sdk = await qvacSdk();
|
||||
if (typeof sdk.loadModel !== 'function') throw new Error('QVAC SDK does not expose loadModel()');
|
||||
const modelId = await withQvacMaster(() => sdk.loadModel({
|
||||
const loadOptions = {
|
||||
modelSrc: resolveSdkAsset(sdk, name),
|
||||
modelConfig: { ...resolveModelConfigAssets(sdk, modelConfig), device: 'gpu', gpu_layers: QVAC_MASTER.gpuLayers, 'mmproj-use-gpu': true },
|
||||
}));
|
||||
};
|
||||
if (modelType) loadOptions.modelType = modelType;
|
||||
const modelId = await withQvacMaster(() => sdk.loadModel(loadOptions));
|
||||
auxiliaryModels.set(String(name), modelId);
|
||||
return modelId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user