Huggingface_hub filled my C: disk, where are the files?

Hello
Using windows and anaconda installed on my H: drive.
I was trying to download a repository to my H: disk. The download was aborted when my C: disk was full. I don’t know where the files went. Please help?
I started a python prompt and

from huggingface_hub import hf_hub_download
hf_hub_download(repo_id=“”)
It threw an error saying my disk was full, pointing at a .py file on my C: disk. I tried restarting assuming it was some sort of temp file that would clear out. I got about 5gb back. It was at 0 bytes of free disk space before the restart.
Any suggestions on where the stuff is and maybe even how to download a large rep without having to increase the disk size on my OS disk?

hi @TonoTheHero, have you looked into our docs about managing cache?

you can also try

huggingface-cli scan-cache

lastly you can look on Windows default cache folders, %APPDATA% or %LOCALAPPDATA%

Thank you for the response. I’ve looked in to the docs about cache but couldn’t make sense of it. I’ve made a search on the C: disk for “assets” As that’s the first folder in the assets tree. Everything the search finds combined takes up 150 MB. %APPDATA% and %LOCALAPPDATA% combined takes up about 30GB. I wasn’t running low on disk space before trying to download the model. I think I had more than that. With fresh eyes from a nights sleep I managed to delete the cache with
huggingface-cli delete-cache.
I don’t know where the files were located, or how to move the cache location before downloading again. But not having a full C: disk is a start! Thank you.

1 Like

hi @TonoTheHero great to hear you’ve managed to clean the cache.
On windows if I’m not wrong you can echo the value of the variables

echo %APPDATA% or
echo %LOCALAPPDATA%

and if you read the docs

The <CACHE_DIR> is usually your user’s home directory. However, it is customizable with the cache_dir argument on all methods, or by specifying either HF_HOME or HUGGINGFACE_HUB_CACHE environment variable.

Manage huggingface_hub cache-system.

You might be able to set a new location to it
set HUGGINGFACE_HUB_CACHE=c:\your_cache_folder

Thank you for the continued input. I did manage to change set a new location for the cache using
set HUGGINGFACE_HUB_CACHE=c:\your_cache_folder
Also I found the default folder on my system by searching for a file in the repo.
C:\Users\MyUserAccount.cache\huggingface\

Case closed. Thank you once again for the help.

1 Like