danielgatis / rembg

Rembg is a tool to remove images background
MIT License
16.48k stars 1.84k forks source link

[FEATURE] ...Cache Download of Model #499

Closed djj0s3 closed 1 year ago

djj0s3 commented 1 year ago

First, amazing library; thank you! One challenge I'm having useing it as a library is that each run it re-downloads the latest model. I'd love to pass an argument to use a cached version vs downloading every time which would speed things up. I'd expect it to work something like this: check local folder for model file, if not there download, if there use cached version. Bonus points if I could provide the version number of the model to fetch.

danielgatis commented 1 year ago

The model is downloaded just once the first time you run. After that, the model is saved in your home directory.