fix: correct cache directory path construction in cleanup function
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user