civitai_mirror / storage-estimator.sh
anonderpling's picture
Add script to estimate LFS storage usage
decefcb
raw
history blame
303 Bytes
# needs numfmt, bc, paste, rev, sed. all but bc are installed on colab
#
# GIT_LFS_SKIP_SMUDGE git clone https://huggingface.co/anonderpling/civitai_mirror
# cd civitai_mirror
it lfs ls-files -san|rev|cut -d'(' -f1|cut -d')' -f2|rev|sed -E 's/ |B$//g'|numfmt --from=iec |paste -sd+ -|bc|numfmt --to=iec