From eacd771207e4e197a2b08e4c6888206046c5ae23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Sat, 22 Nov 2025 16:48:40 +0100 Subject: [PATCH] fix: use stat -L to follow symlinks when checking checkpoint file size HuggingFace cache stores files as symlinks to blobs, so stat without -L was returning the symlink size (76 bytes) instead of actual file size (6.5GB). This caused the >500MB check to fail and skip linking checkpoint files. --- artifact_comfyui_download.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/artifact_comfyui_download.sh b/artifact_comfyui_download.sh index 22623da..18ba9cd 100755 --- a/artifact_comfyui_download.sh +++ b/artifact_comfyui_download.sh @@ -474,7 +474,8 @@ link_model() { fi # Only link if the file is large enough to be a checkpoint (> 500MB) - local file_size=$(stat -c%s "$ckpt_file" 2>/dev/null || echo "0") + # Use -L to follow symlinks (HuggingFace cache uses symlinks to blobs) + local file_size=$(stat -L -c%s "$ckpt_file" 2>/dev/null || echo "0") if [[ $file_size -gt 524288000 ]]; then local ckpt_link="${checkpoint_dir}/${ckpt_name}"