Skip to content

Commit 16e45d7

Browse files
comfyanonymousgmaOCR
authored andcommitted
Improvements to the stable release workflow. (comfyanonymous#10065)
1 parent 9bcd5f3 commit 16e45d7

File tree

2 files changed

+27
-15
lines changed

2 files changed

+27
-15
lines changed

.github/workflows/stable-release.yml

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ on:
88
description: 'Git tag'
99
required: true
1010
type: string
11-
cu:
12-
description: 'CUDA version'
11+
cache_tag:
12+
description: 'Cached dependencies tag'
1313
required: true
1414
type: string
15-
default: "129"
15+
default: "cu129"
1616
python_minor:
1717
description: 'Python minor version'
1818
required: true
@@ -23,7 +23,11 @@ on:
2323
required: true
2424
type: string
2525
default: "6"
26-
26+
rel_name:
27+
description: 'Release name'
28+
required: true
29+
type: string
30+
default: "nvidia"
2731

2832
jobs:
2933
package_comfy_windows:
@@ -42,15 +46,15 @@ jobs:
4246
id: cache
4347
with:
4448
path: |
45-
cu${{ inputs.cu }}_python_deps.tar
49+
${{ inputs.cache_tag }}_python_deps.tar
4650
update_comfyui_and_python_dependencies.bat
47-
key: ${{ runner.os }}-build-cu${{ inputs.cu }}-${{ inputs.python_minor }}
51+
key: ${{ runner.os }}-build-${{ inputs.cache_tag }}-${{ inputs.python_minor }}
4852
- shell: bash
4953
run: |
50-
mv cu${{ inputs.cu }}_python_deps.tar ../
54+
mv ${{ inputs.cache_tag }}_python_deps.tar ../
5155
mv update_comfyui_and_python_dependencies.bat ../
5256
cd ..
53-
tar xf cu${{ inputs.cu }}_python_deps.tar
57+
tar xf ${{ inputs.cache_tag }}_python_deps.tar
5458
pwd
5559
ls
5660
@@ -65,12 +69,19 @@ jobs:
6569
echo 'import site' >> ./python3${{ inputs.python_minor }}._pth
6670
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
6771
./python.exe get-pip.py
68-
./python.exe -s -m pip install ../cu${{ inputs.cu }}_python_deps/*
72+
./python.exe -s -m pip install ../${{ inputs.cache_tag }}_python_deps/*
73+
74+
grep comfyui ../ComfyUI/requirements.txt ./requirements_comfyui.txt
75+
./python.exe -s -m pip install -r requirements_comfyui.txt
76+
rm requirements_comfyui.txt
77+
6978
sed -i '1i../ComfyUI' ./python3${{ inputs.python_minor }}._pth
7079
71-
rm ./Lib/site-packages/torch/lib/dnnl.lib #I don't think this is actually used and I need the space
72-
rm ./Lib/site-packages/torch/lib/libprotoc.lib
73-
rm ./Lib/site-packages/torch/lib/libprotobuf.lib
80+
if test -f ./Lib/site-packages/torch/lib/dnnl.lib; then
81+
rm ./Lib/site-packages/torch/lib/dnnl.lib #I don't think this is actually used and I need the space
82+
rm ./Lib/site-packages/torch/lib/libprotoc.lib
83+
rm ./Lib/site-packages/torch/lib/libprotobuf.lib
84+
fi
7485
7586
cd ..
7687
@@ -91,7 +102,7 @@ jobs:
91102
cd ..
92103
93104
"C:\Program Files\7-Zip\7z.exe" a -t7z -m0=lzma2 -mx=9 -mfb=128 -md=768m -ms=on -mf=BCJ2 ComfyUI_windows_portable.7z ComfyUI_windows_portable
94-
mv ComfyUI_windows_portable.7z ComfyUI/ComfyUI_windows_portable_nvidia.7z
105+
mv ComfyUI_windows_portable.7z ComfyUI/ComfyUI_windows_portable_${{ inputs.rel_name }}.7z
95106
96107
cd ComfyUI_windows_portable
97108
python_embeded/python.exe -s ComfyUI/main.py --quick-test-for-ci --cpu
@@ -104,7 +115,7 @@ jobs:
104115
uses: svenstaro/upload-release-action@v2
105116
with:
106117
repo_token: ${{ secrets.GITHUB_TOKEN }}
107-
file: ComfyUI_windows_portable_nvidia.7z
118+
file: ComfyUI_windows_portable_${{ inputs.rel_name }}.7z
108119
tag: ${{ inputs.git_tag }}
109120
overwrite: true
110121
draft: true

.github/workflows/windows_release_dependencies.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ jobs:
5656
..\python_embeded\python.exe -s -m pip install --upgrade torch torchvision torchaudio ${{ inputs.xformers }} --extra-index-url https://download.pytorch.org/whl/cu${{ inputs.cu }} -r ../ComfyUI/requirements.txt pygit2
5757
pause" > update_comfyui_and_python_dependencies.bat
5858
59-
python -m pip wheel --no-cache-dir torch torchvision torchaudio ${{ inputs.xformers }} ${{ inputs.extra_dependencies }} --extra-index-url https://download.pytorch.org/whl/cu${{ inputs.cu }} -r requirements.txt pygit2 -w ./temp_wheel_dir
59+
grep -v comfyui requirements.txt > requirements_nocomfyui.txt
60+
python -m pip wheel --no-cache-dir torch torchvision torchaudio ${{ inputs.xformers }} ${{ inputs.extra_dependencies }} --extra-index-url https://download.pytorch.org/whl/cu${{ inputs.cu }} -r requirements_nocomfyui.txt pygit2 -w ./temp_wheel_dir
6061
python -m pip install --no-cache-dir ./temp_wheel_dir/*
6162
echo installed basic
6263
ls -lah temp_wheel_dir

0 commit comments

Comments
 (0)