File tree 3 files changed +13
-13
lines changed
3 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ env.allowLocalModels = false;
7
7
8
8
// Due to a bug in onnxruntime-web, we must disable multithreading for now.
9
9
// See https://github.com/microsoft/onnxruntime/issues/14445 for more information.
10
- env . backends . onnx . wasm . numThreads = 1 ;
10
+ // env.backends.onnx.wasm.numThreads = 1;
11
11
12
12
13
13
class PipelineSingleton {
Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ if (ONNX_ENV?.wasm) {
179
179
// https://onnxruntime.ai/docs/api/js/interfaces/Env.WebAssemblyFlags.html#wasmPaths
180
180
// We use remote wasm files by default to make it easier for newer users.
181
181
// In practice, users should probably self-host the necessary .wasm files.
182
- ONNX_ENV . wasm . wasmPaths = `https://cdn.jsdelivr.net/npm/@huggingface/transformers@${ env . version } /dist/` ;
182
+ // ONNX_ENV.wasm.wasmPaths = `https://cdn.jsdelivr.net/npm/@huggingface/transformers@${env.version}/dist/`;
183
183
184
184
// TODO: Add support for loading WASM files from cached buffer when we upgrade to [email protected]
185
185
// https://github.com/microsoft/onnxruntime/pull/21534
@@ -189,9 +189,9 @@ if (ONNX_ENV?.wasm) {
189
189
ONNX_ENV . wasm . proxy = false ;
190
190
191
191
// https://developer.mozilla.org/en-US/docs/Web/API/crossOriginIsolated
192
- if ( typeof crossOriginIsolated === 'undefined' || ! crossOriginIsolated ) {
193
- ONNX_ENV . wasm . numThreads = 1 ;
194
- }
192
+ // if (typeof crossOriginIsolated === 'undefined' || !crossOriginIsolated) {
193
+ // ONNX_ENV.wasm.numThreads = 1;
194
+ // }
195
195
}
196
196
197
197
if ( ONNX_ENV ?. webgpu ) {
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ function buildConfig({
42
42
type,
43
43
} ,
44
44
assetModuleFilename : "[name][ext]" ,
45
- chunkFormat : "module" ,
45
+ chunkFormat : false ,
46
46
} ,
47
47
optimization : {
48
48
minimize : true ,
@@ -78,13 +78,13 @@ function buildConfig({
78
78
} ;
79
79
80
80
if ( outputModule ) {
81
- config . module = {
82
- parser : {
83
- javascript : {
84
- importMeta : false ,
85
- } ,
86
- } ,
87
- } ;
81
+ // config.module = {
82
+ // parser: {
83
+ // javascript: {
84
+ // importMeta: false,
85
+ // },
86
+ // },
87
+ // };
88
88
} else {
89
89
config . externalsType = "commonjs" ;
90
90
}
You can’t perform that action at this time.
0 commit comments