HuggingFace models use symlinks pointing to blobs in the cache. The stat command was returning the size of the symlink itself (76 bytes) instead of the actual file it points to. Fixed by: - Adding -L flag to stat commands to follow symlinks - Testing which stat format works (Linux -c vs macOS -f) before executing - Using proper spacing and quotes in stat commands - Checking for both regular files and symlinks in the condition This fixes disk usage showing as 1 KB instead of the actual ~50+ GB for models like FLUX.
46 KiB
Executable File
46 KiB
Executable File