Onnx model takes longer to load when deployed on IC Network

Hey I’m new to Internet Computer Dev. I recently deployed a web app which uses an onnx model the using onnxruntime module with webgl as the backend. It takes roughly 5 seconds to load locally but around 1 minute on the IC network.

I was wondering what optimizations I can do to optimize?

Also as a side note I can’t use wasm backend since I get these errors:

index.js:42338 wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.

index.js:2 failed to asynchronously prepare wasm: CompileError: WebAssembly.instantiate(): expected magic word 00 61 73 6d, found 3c 21 64 6f @+0
1 Like

I don’t have the answer, but I’m really curious about the issue. Could you share the link to the dApp you’ve deployed? Is your project open-source?

Found this similar issue on the forum, maybe related?