Skip to content

Commit

Permalink
Refactor stage3
Browse files Browse the repository at this point in the history
  • Loading branch information
YanWenKun committed Nov 2, 2024
1 parent cd55bc4 commit efaffca
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 34 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions stage2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,5 @@ rm ./ComfyUI-Custom-Scripts/pysssss.json
cd "$workdir"

ls -lahF

du -hd2 ComfyUI_Windows_portable
34 changes: 34 additions & 0 deletions stage3.bat
Original file line number Diff line number Diff line change
@@ -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
32 changes: 0 additions & 32 deletions stage3.sh

This file was deleted.

0 comments on commit efaffca

Please sign in to comment.