From bd3403603950e8825b9b070ee22813e030697c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Tue, 25 Nov 2025 16:53:28 +0100 Subject: [PATCH] fix: correct cache directory path construction in cleanup function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix bash string substitution to replace all forward slashes with double hyphens when constructing HuggingFace cache paths. Changed from: ${repo_id/\//-} (replaces first / with single -) Changed to: ${repo_id//\/--} (replaces all / with --) This fixes the "Cache directory not found" warning when using the --cleanup flag with repositories that have slashes in their names (e.g., black-forest-labs/FLUX.1-schnell). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- artifact_huggingface_download.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artifact_huggingface_download.sh b/artifact_huggingface_download.sh index 1a7f689..4e2e86f 100755 --- a/artifact_huggingface_download.sh +++ b/artifact_huggingface_download.sh @@ -704,7 +704,7 @@ cleanup_unused_cache_files() { local comfyui_dir="$3" # Find the latest snapshot directory for this repo - local repo_cache_dir="${cache_dir}/models--${repo_id/\//-}" + local repo_cache_dir="${cache_dir}/models--${repo_id//\/--}" if [[ ! -d "$repo_cache_dir" ]]; then print_warning "Cache directory not found for $repo_id" return 1