add documentation caveat about location of HF cached models

This commit is contained in:
Lincoln Stein 2023-01-26 11:48:03 -05:00
parent a49d546125
commit cbd967cbc4

View File

@ -72,7 +72,13 @@ def global_cache_dir(subdir:Union[str,Path]='')->Path:
for huggingface-style conventions: for huggingface-style conventions:
global_cache_dir('diffusers') global_cache_dir('diffusers')
global_cache_dir('hub') global_cache_dir('hub')
global_cache_dir('transformers') # not used? Current HuggingFace documentation (mid-Jan 2023) indicates that
transformers models will be cached into a "transformers" subdirectory,
but in practice they seem to go into "hub". But if needed:
global_cache_dir('transformers')
One other caveat is that HuggingFace is moving some diffusers models
into the "hub" subdirectory as well, so this will need to be revisited
from time to time.
''' '''
home: str = os.getenv('HF_HOME') home: str = os.getenv('HF_HOME')