Revert WASM worker threading

This commit is contained in:
Cohee 2024-07-17 15:02:27 +00:00
parent c3d04066bc
commit a2c9e70082
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ configureTransformers();
function configureTransformers() { function configureTransformers() {
// Limit the number of threads to 1 to avoid issues on Android // Limit the number of threads to 1 to avoid issues on Android
env.backends.onnx.wasm.numThreads = process.platform === 'android' ? 1 : 0; env.backends.onnx.wasm.numThreads = 1;
// Use WASM from a local folder to avoid CDN connections // Use WASM from a local folder to avoid CDN connections
env.backends.onnx.wasm.wasmPaths = path.join(process.cwd(), 'dist') + path.sep; env.backends.onnx.wasm.wasmPaths = path.join(process.cwd(), 'dist') + path.sep;
} }