Use global_cache_dir calls properly

This commit is contained in:
Daya Adianto 2023-01-18 21:06:01 +07:00
parent aa4e8d8cf3
commit f3e952ecf0
No known key found for this signature in database
GPG Key ID: 2C979F39966F058B

View File

@ -759,7 +759,7 @@ class ModelManager(object):
# transformer files get moved into the hub directory
if cls._is_huggingface_hub_directory_present():
hub = global_cache_dir() / 'hub'
hub = global_cache_dir('hub')
else:
hub = models_dir / 'hub'
@ -776,7 +776,7 @@ class ModelManager(object):
# anything else gets moved into the diffusers directory
if cls._is_huggingface_hub_directory_present():
diffusers = global_cache_dir() / 'diffusers'
diffusers = global_cache_dir('diffusers')
else:
diffusers = models_dir / 'diffusers'