-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Currently, the transformers library downloads and caches models to the default system-wide directory (e.g., ~/.cache/huggingface/hub on Linux or C:\Users\USER\.cache\huggingface\hub on Windows).
This behavior has a few downsides for users:
- It consumes space on the primary system drive (the C: drive), which is often an SSD with limited capacity.
- It makes PlotCaption less portable. If a user moves the project folder to a different drive, the large model cache is left behind, and the models might need to be re-downloaded.
- Users have no direct control over where these multi-gigabyte models are stored.
Solution
The ideal solution is to have PlotCaption save all downloaded models into a sub-directory within its own project folder. For example, creating a ./models or ./cache folder at the root of the project to store everything.
This would make the entire application self-contained. When a user downloads PlotCaption, everything it needs and downloads will stay inside that one folder.
Additional context
This excellent suggestion was originally proposed by user willdone on Reddit, who has also contributed mods for the project. A huge thank you to them for their input!
This change will likely involve setting the cache_dir parameter when loading models via .from_pretrained().