22name : " Release Stable Version"
33
44on :
5+ workflow_call :
6+ inputs :
7+ git_tag :
8+ description : ' Git tag'
9+ required : true
10+ type : string
11+ cache_tag :
12+ description : ' Cached dependencies tag'
13+ required : true
14+ type : string
15+ default : " cu129"
16+ python_minor :
17+ description : ' Python minor version'
18+ required : true
19+ type : string
20+ default : " 13"
21+ python_patch :
22+ description : ' Python patch version'
23+ required : true
24+ type : string
25+ default : " 6"
26+ rel_name :
27+ description : ' Release name'
28+ required : true
29+ type : string
30+ default : " nvidia"
31+ rel_extra_name :
32+ description : ' Release extra name'
33+ required : false
34+ type : string
35+ default : " "
36+ test_release :
37+ description : ' Test Release'
38+ required : true
39+ type : boolean
40+ default : true
541 workflow_dispatch :
642 inputs :
743 git_tag :
844 description : ' Git tag'
945 required : true
1046 type : string
11- cu :
12- description : ' CUDA version '
47+ cache_tag :
48+ description : ' Cached dependencies tag '
1349 required : true
1450 type : string
15- default : " 129 "
51+ default : " cu129 "
1652 python_minor :
1753 description : ' Python minor version'
1854 required : true
2359 required : true
2460 type : string
2561 default : " 6"
26-
62+ rel_name :
63+ description : ' Release name'
64+ required : true
65+ type : string
66+ default : " nvidia"
67+ rel_extra_name :
68+ description : ' Release extra name'
69+ required : false
70+ type : string
71+ default : " "
72+ test_release :
73+ description : ' Test Release'
74+ required : true
75+ type : boolean
76+ default : true
2777
2878jobs :
2979 package_comfy_windows :
@@ -42,15 +92,15 @@ jobs:
4292 id : cache
4393 with :
4494 path : |
45- cu ${{ inputs.cu }}_python_deps.tar
95+ ${{ inputs.cache_tag }}_python_deps.tar
4696 update_comfyui_and_python_dependencies.bat
47- key : ${{ runner.os }}-build-cu ${{ inputs.cu }}-${{ inputs.python_minor }}
97+ key : ${{ runner.os }}-build-${{ inputs.cache_tag }}-${{ inputs.python_minor }}
4898 - shell : bash
4999 run : |
50- mv cu ${{ inputs.cu }}_python_deps.tar ../
100+ mv ${{ inputs.cache_tag }}_python_deps.tar ../
51101 mv update_comfyui_and_python_dependencies.bat ../
52102 cd ..
53- tar xf cu ${{ inputs.cu }}_python_deps.tar
103+ tar xf ${{ inputs.cache_tag }}_python_deps.tar
54104 pwd
55105 ls
56106
@@ -65,12 +115,19 @@ jobs:
65115 echo 'import site' >> ./python3${{ inputs.python_minor }}._pth
66116 curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
67117 ./python.exe get-pip.py
68- ./python.exe -s -m pip install ../cu${{ inputs.cu }}_python_deps/*
118+ ./python.exe -s -m pip install ../${{ inputs.cache_tag }}_python_deps/*
119+
120+ grep comfyui ../ComfyUI/requirements.txt > ./requirements_comfyui.txt
121+ ./python.exe -s -m pip install -r requirements_comfyui.txt
122+ rm requirements_comfyui.txt
123+
69124 sed -i '1i../ComfyUI' ./python3${{ inputs.python_minor }}._pth
70125
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
126+ if test -f ./Lib/site-packages/torch/lib/dnnl.lib; then
127+ rm ./Lib/site-packages/torch/lib/dnnl.lib #I don't think this is actually used and I need the space
128+ rm ./Lib/site-packages/torch/lib/libprotoc.lib
129+ rm ./Lib/site-packages/torch/lib/libprotobuf.lib
130+ fi
74131
75132 cd ..
76133
@@ -85,14 +142,18 @@ jobs:
85142
86143 mkdir update
87144 cp -r ComfyUI/.ci/update_windows/* ./update/
88- cp -r ComfyUI/.ci/windows_base_files /* ./
145+ cp -r ComfyUI/.ci/windows_${{ inputs.rel_name }}_base_files /* ./
89146 cp ../update_comfyui_and_python_dependencies.bat ./update/
90147
91148 cd ..
92149
93150 "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
151+ mv ComfyUI_windows_portable.7z ComfyUI/ComfyUI_windows_portable_${{ inputs.rel_name }}${{ inputs.rel_extra_name }} .7z
95152
153+ - shell : bash
154+ if : ${{ inputs.test_release }}
155+ run : |
156+ cd ..
96157 cd ComfyUI_windows_portable
97158 python_embeded/python.exe -s ComfyUI/main.py --quick-test-for-ci --cpu
98159
@@ -101,10 +162,9 @@ jobs:
101162 ls
102163
103164 - name : Upload binaries to release
104- uses : svenstaro/upload-release-action @v2
165+ uses : softprops/action-gh-release @v2
105166 with :
106- repo_token : ${{ secrets.GITHUB_TOKEN }}
107- file : ComfyUI_windows_portable_nvidia.7z
108- tag : ${{ inputs.git_tag }}
109- overwrite : true
167+ files : ComfyUI_windows_portable_${{ inputs.rel_name }}${{ inputs.rel_extra_name }}.7z
168+ tag_name : ${{ inputs.git_tag }}
110169 draft : true
170+ overwrite_files : true
0 commit comments