Open rick-liruixin opened 1 year ago
This happens when for some reason the received asset has wrong size. Maybe there is a rate limit on unpkg?
Does it still not work?
Where should I cancel? @DanielHauschildt
What do you mean by "cancel"?
Have you tried to host the assets on a custom server? For some reason I cannot reproduce the error.
It could be a cors
error. Ensure that for local development you are using localhost
and not the ip
based url
I had the same issue while playing with the create-react-app
sample. For starters LFS failed during git clone, I think this repo may just be out of allocated bandwidth, which might explain why the GitHub Actions are failing.
Then unpkg
was flaky. Sometimes I could download a file, sometimes I got a 502 Bad Gateway, sometimes it just timed out.
I solved the problem by (painstakingly) downloading the 2 ONNX files and 6 WASM from https://www.unpkg.com/browse/@imgly/background-removal@1.0.6/dist/ and placing them in examples\create-react-app\public\static\js
.
Hope this helps.
Do you know a cdn where I could host the models for free which is more stable?
My first thought was jsDelivr
but they have a 20MB per file size limit. although they make it seem like they could allow exceptions, might be worth attempting to get this "small" exception.
Packages larger than 50 MB or single files larger than 20 MB (in case of GitHub) are not supported by default. We recommend removing files that are not needed from your package when possible. If you need to set a higher limit for your package, open an issue in this repo.
https://www.jsdelivr.com/documentation
Maybe using Cloudfare
directly could work? They seem to have the most generous free offering out there.
I have the same problem;
Uncaught (in promise) Error: Failed to fetch /models/medium with size 4194304 but got 0;
I set up a local file server that can be accessed and the model can be downloaded, but it just prompts this error. There is no problem with the downloaded file.
Please help me find out what the problem is and how to solve it.
@DanielHauschildt facing the same issue. I even added the fetch args
fetchArgs: { mode: 'no-cors' }
but this didn't help
Uncaught (in promise) Error: Failed to fetch medium with size 88188479 but got 133 at bundle.ts:98:11