diff --git a/attachments/force-update-all.sh b/attachments/force-update-all.sh index cf74367..a395263 100644 --- a/attachments/force-update-all.sh +++ b/attachments/force-update-all.sh @@ -2,10 +2,10 @@ # You need to install Git for Windows and select Git Bash (Default) # https://git-scm.com/download/win -set -e +set -eu # If you don't want a FORCE update, remove "git reset" line -function change_url_or_pull () { +function git_pull () { git_remote_url=$(git -C "$1" remote get-url origin) ; if [[ $git_remote_url =~ ^(https:\/\/github\.com\/)(.*)(\.git)$ ]]; then @@ -16,12 +16,12 @@ function change_url_or_pull () { fi ; } -change_url_or_pull ComfyUI +git_pull ComfyUI cd ./ComfyUI/custom_nodes for D in *; do if [ -d "${D}" ]; then - change_url_or_pull "${D}" & + git_pull "${D}" & fi done diff --git "a/attachments/\344\270\255\346\226\207\350\204\232\346\234\254/\344\275\277\347\224\250\345\233\275\345\206\205\351\225\234\345\203\217\345\274\272\345\210\266\346\233\264\346\226\260\345\205\250\351\203\250\350\212\202\347\202\271.sh" "b/attachments/\344\270\255\346\226\207\350\204\232\346\234\254/\344\275\277\347\224\250\345\233\275\345\206\205\351\225\234\345\203\217\345\274\272\345\210\266\346\233\264\346\226\260\345\205\250\351\203\250\350\212\202\347\202\271.sh" index cc0b01b..5bd7d81 100644 --- "a/attachments/\344\270\255\346\226\207\350\204\232\346\234\254/\344\275\277\347\224\250\345\233\275\345\206\205\351\225\234\345\203\217\345\274\272\345\210\266\346\233\264\346\226\260\345\205\250\351\203\250\350\212\202\347\202\271.sh" +++ "b/attachments/\344\270\255\346\226\207\350\204\232\346\234\254/\344\275\277\347\224\250\345\233\275\345\206\205\351\225\234\345\203\217\345\274\272\345\210\266\346\233\264\346\226\260\345\205\250\351\203\250\350\212\202\347\202\271.sh" @@ -1,7 +1,7 @@ #!/bin/bash # 注意:Windows 下运行需要安装 Git 并在安装时选择 Git Bash(默认) -set -e +set -eu # 如果希望“尝试更新但不强制”,删除 git reset 行以避免还原本地变更 function change_url_or_pull () { diff --git a/stage3.sh b/stage3.sh index 7b4c006..aa76199 100644 --- a/stage3.sh +++ b/stage3.sh @@ -5,9 +5,28 @@ ls -lahF du -hd1 -# LZMA2 is ~75% faster than LZMA, but consumes significant more RAM -# Use 2140000000b as volume size just because GitHub think 2147483648b is "larger than 2GB" -# The param "-mx=5 -mfb=32 -md=16m" is equivalent to "Normal Compression" in 7Zip GUI +# Notes on 7zip compression: + +# Use 2140000000b as volume size just because GitHub think 2147483648b is "larger than 2GB". + +# LZMA2 is ~75% faster than LZMA, but consumes significant more RAM. +# The param "-mx=5 -mfb=32 -md=16m" is equivalent to "Normal Compression" in 7Zip GUI. + +# Out of curiosity, I made a comparison: + +# "-mx=5 -mfb=32 -md=16m" +# Add new data to archive: 9181 folders, 61097 files, 10816792329 bytes (11 GiB) +# Archive size: 4681965078 bytes (4466 MiB) +# Compression Time: 866s + +# "-mx=7 -mfb=64 -md=32m" +# Add new data to archive: 9181 folders, 61097 files, 10816801395 bytes (11 GiB) +# Archive size: 4610629660 bytes (4398 MiB) +# Compression Time: 1050s + +# The file size difference is small. +# So I choose the "Normal Compression", not for faster compression time, but for faster decompression time. + "C:\Program Files\7-Zip\7z.exe" a -t7z -m0=lzma2 -mx=5 -mfb=32 -md=16m -ms=on -mf=BCJ2 -v2140000000b ComfyUI_Windows_portable_cu124.7z ComfyUI_Windows_portable ls -lahF