Move config migration from post-install to src

This commit is contained in:
Cohee
2025-04-25 22:22:44 +03:00
parent 01c6544e22
commit 005a495e96
6 changed files with 204 additions and 186 deletions

View File

@ -12,7 +12,6 @@ configureTransformers();
function configureTransformers() {
// Limit the number of threads to 1 to avoid issues on Android
env.backends.onnx.wasm.numThreads = 1;
console.log(env.backends.onnx.wasm.wasmPaths);
// Use WASM from a local folder to avoid CDN connections
env.backends.onnx.wasm.wasmPaths = path.join(serverDirectory, 'node_modules', 'sillytavern-transformers', 'dist') + path.sep;
}