diff --git a/artifact_huggingface_download.sh b/artifact_huggingface_download.sh index f888e11..7c2cf9e 100755 --- a/artifact_huggingface_download.sh +++ b/artifact_huggingface_download.sh @@ -623,9 +623,9 @@ link_model() { local filename_only filename_only=$(basename "$source_pattern") - # Find files matching the filename, then filter by full source pattern + # Find files matching the filename (HuggingFace cache flattens directory structure) local source_file - source_file=$(find_model_files "$repo_id" "$filename_only" 2>/dev/null | grep "/$source_pattern$" | head -n1) + source_file=$(find_model_files "$repo_id" "$filename_only" 2>/dev/null | grep "/$filename_only$" | head -n1) if [[ -z "$source_file" ]] || [[ ! -f "$source_file" ]]; then print_warning "Source file not found: ${source_pattern}"