infinitered / nsfwjs

NSFW detection on the client-side via TensorFlow.js
https://nsfwjs.com/
MIT License
7.94k stars 529 forks source link

Error: Could not load the model. Make sure you are importing the model.min.js bundle. #863

Open ChrisBechi opened 3 months ago

ChrisBechi commented 3 months ago

I have a Vite project and I'm getting the following error when installing the library in version: ^4.1.0. I followed the documentation but apparently Vite has some issues. Does anyone know how I can solve this?

nsfwjs.js?v=168f040f:67180 Uncaught (in promise) Error: Could not load the model. Make sure you are importing the model.min.js bundle. at nsfwjs.js?v=168f040f:67180:17 at step4 (nsfwjs.js?v=168f040f:67073:18) at Object.next (nsfwjs.js?v=168f040f:67025:14) at nsfwjs.js?v=168f040f:67012:70 at new Promise () at __awaiter (nsfwjs.js?v=168f040f:66994:10) at loadModel (nsfwjs.js?v=168f040f:67158:10) at Module. (nsfwjs.js?v=168f040f:67212:22) at step4 (nsfwjs.js?v=168f040f:67073:18) at Object.next (nsfwjs.js?v=168f040f:67025:14)

Anas-7 commented 1 month ago

Hi, did you find a fix for this? Currently facing the same issue

liuyudaye commented 4 days ago

When will this problem be fixed? I've encountered it too.