Closed jamesbeith closed 1 week ago
I tried this out with a newly generated map and the code you provided and am not seeing any error like the one you mention.
Here's the sandbox link:
Do let me know what I can do to replicate the issue further?
Ah I was able to replicate this locally. I think an override to ensure the file is explicitly available will work, will share shortly.
I added an override in https://github.com/jspm/overrides/commit/bde5bd26e3116a91791f9f9afcf589db75ed96e6 to extend these files into the public exports of the package, and this seems to have made some progress. Note this is specific to this exact version since the package files are still not stable on this major, and will need to be updated for the next version until the file structure stabilizes.
I'm now getting this error:
index.mjs:43 Uncaught (in promise) Error: Failed to create session: "Error: no available backend found. ERR: [wasm] TypeError: Failed to resolve module specifier './ort-wasm-simd-threaded.mjs'". Please check if the publicPath is set correctly.
at index.mjs:43:84178
at async createOnnxSession (index.mjs:43:84124)
at async initBase (index.mjs:43:88458)
at async initInference (index.mjs:43:88556)
at async removeBackground (index.mjs:43:89102)
This seems like it should be fixable via providing some expected publicPath
configuration? Let me know if I can assist further.
Thanks for your help. I'll take another look.
I'm trying to get @imgly/background-removal to work in the browser using an importmap and jspm.io. However, it appears some modules for
onnxruntime-web
are missing from jspm.io.Here's the experimental document.
Loading in a browser results in the following error.
The URL mentioned returns 404 on jspm.io.
All four configurations of the
device
andproxyToWorker
config result in 404s for their respected files.