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