Open ariv803 opened 4 months ago
seems to be failing at the line where it requires resources.json
resourceURi file:///Users/user/dev/work/aaa/node_modules/@imgly/background-removal-node/dist/resources.json
also, where do the models come from in case I want to check for updated versions? I mean is there a different git repo or website that this project is getting them from?
How can I use the large model? When I downloaded package version 1.4.5, it does not come with the large model, only the small and medium models. How can I use the large model?
@favger you can download it from the github website I think (download as zip). Not sure how you downloaded the package version (maybe you did an npm install) but you can see it here https://github.com/imgly/background-removal-js/tree/main/bundle/models
In the readme in the Custom Asset serving section it says to copy the onnx and wasm files. My code is stuck at "Loading model...." debug message with no further output and the promise resolving and the program exiting, so I checked to see where it was trying to load a model from and it seems it is trying to load it from "/models/medium" , which does not exist anywhere:
I think the models can be downloaded from here so I will try that: https://github.com/imgly/background-removal-js/tree/main/bundle/models It would be great to throw an error or include them in the NPM install or edit the README with additional instructions though. My use case is a backend NodeJS service with no browser involved.