File tree Expand file tree Collapse file tree 3 files changed +13
-13
lines changed Expand file tree Collapse file tree 3 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ env.allowLocalModels = false;
77
88// Due to a bug in onnxruntime-web, we must disable multithreading for now.
99// 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;
1111
1212
1313class PipelineSingleton {
Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ if (ONNX_ENV?.wasm) {
179179 // https://onnxruntime.ai/docs/api/js/interfaces/Env.WebAssemblyFlags.html#wasmPaths
180180 // We use remote wasm files by default to make it easier for newer users.
181181 // 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/`;
183183
184184 // TODO: Add support for loading WASM files from cached buffer when we upgrade to [email protected] 185185 // https://github.com/microsoft/onnxruntime/pull/21534
@@ -189,9 +189,9 @@ if (ONNX_ENV?.wasm) {
189189 ONNX_ENV . wasm . proxy = false ;
190190
191191 // 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+ // }
195195}
196196
197197if ( ONNX_ENV ?. webgpu ) {
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ function buildConfig({
4242 type,
4343 } ,
4444 assetModuleFilename : "[name][ext]" ,
45- chunkFormat : "module" ,
45+ chunkFormat : false ,
4646 } ,
4747 optimization : {
4848 minimize : true ,
@@ -78,13 +78,13 @@ function buildConfig({
7878 } ;
7979
8080 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+ // };
8888 } else {
8989 config . externalsType = "commonjs" ;
9090 }
You can’t perform that action at this time.
0 commit comments