Skip to content

Commit

Permalink
docs for scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
YanWenKun committed Oct 30, 2024
1 parent 4ebf8c7 commit b3d0128
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 8 deletions.
8 changes: 4 additions & 4 deletions attachments/force-update-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# 注意:Windows 下运行需要安装 Git 并在安装时选择 Git Bash(默认)

set -e
set -eu

# 如果希望“尝试更新但不强制”,删除 git reset 行以避免还原本地变更
function change_url_or_pull () {
Expand Down
25 changes: 22 additions & 3 deletions stage3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b3d0128

Please sign in to comment.