diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 53c322c..efc3a15 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,8 +22,8 @@ jobs: run: bash stage2.sh - name: Stage 3 Compressing Package - shell: bash - run: bash stage3.sh + shell: cmd + run: stage3.bat - name: Upload archive to release uses: xresloader/upload-to-github-release@v1 diff --git a/stage2.sh b/stage2.sh index 97e88a8..b777251 100644 --- a/stage2.sh +++ b/stage2.sh @@ -143,3 +143,5 @@ rm ./ComfyUI-Custom-Scripts/pysssss.json cd "$workdir" ls -lahF + +du -hd2 ComfyUI_Windows_portable diff --git a/stage3.bat b/stage3.bat new file mode 100644 index 0000000..cd0d7d3 --- /dev/null +++ b/stage3.bat @@ -0,0 +1,34 @@ +rem.||( +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 7-Zip GUI. + +Out of curiosity, I made a comparison: + +"-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) +Ratio: 0.426 +Compression Time: 1050s + +"-mx=5 -mfb=32 -md=16m" +Add new data to archive: 9238 folders, 61469 files, 10962874842 bytes (11 GiB) +Archive size: 4707714040 bytes (4490 MiB) +Ratio: 0.429 +Compression Time: 840s + +"-mx=3 -mfb=32 -md=4m" +Add new data to archive: 9238 folders, 61469 files, 10962875003 bytes (11 GiB) +Archive size: 5027350682 bytes (4795 MiB) +Ratio: 0.459 +Compression Time: 565s + +So I choose the "Normal Compression". Also, its decompression time is ideal. +) + +"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 + +dir diff --git a/stage3.sh b/stage3.sh deleted file mode 100644 index 5be7de1..0000000 --- a/stage3.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -set -eux - -ls -lahF - -du -hd2 ComfyUI_Windows_portable - -# 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=3 -mfb=32 -md=4m -ms=on -mf=BCJ2 -v2140000000b ComfyUI_Windows_portable_cu124.7z ComfyUI_Windows_portable - -ls -lahF