Commit 73c81b2f authored by Your Name's avatar Your Name

Fix: Correct HuggingFace cache directory detection

- Updated get_all_cache_dirs() to properly find HuggingFace hub directory
- Now checks for ~/.cache/huggingface/hub/ instead of just ~/.cache/huggingface/
- This fixes --list-cached-models not showing HuggingFace cached models
parent 2cedd442
......@@ -37,8 +37,12 @@ def get_all_cache_dirs() -> dict:
caches['coderai'] = coderai_cache
# HuggingFace cache (for .safetensors, PyTorch models, etc.)
# Check both the main directory and the hub subdirectory
hf_cache = os.path.join(cache_home, 'huggingface')
if os.path.exists(hf_cache):
hf_hub_cache = os.path.join(hf_cache, 'hub')
if os.path.exists(hf_hub_cache):
caches['huggingface'] = hf_hub_cache # Use hub directory if it exists
elif os.path.exists(hf_cache):
caches['huggingface'] = hf_cache
# Local diffusers cache (often stored locally by apps)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment