diff --git a/artifact_comfyui_download.sh b/artifact_comfyui_download.sh index 0966f56..5c16f9b 100755 --- a/artifact_comfyui_download.sh +++ b/artifact_comfyui_download.sh @@ -307,11 +307,16 @@ cache_dir = '${CACHE_DIR}' repo_id = '${repo_id}' filename_filter = '${filename_filter}' -# HuggingFace cache structure: cache_dir/hub/models--org--name/snapshots/hash/ -cache_path = Path(cache_dir) / 'hub' +# HuggingFace cache structure: cache_dir/models--org--name/snapshots/hash/ +# Try both with and without 'hub/' subdirectory for compatibility +cache_path = Path(cache_dir) repo_path = repo_id.replace('/', '--') model_dir = cache_path / f'models--{repo_path}' +# Fallback to hub/ subdirectory if direct path doesn't exist +if not model_dir.exists(): + model_dir = cache_path / 'hub' / f'models--{repo_path}' + if not model_dir.exists(): sys.exit(1)