2
2
name : " Release Stable Version"
3
3
4
4
on :
5
- push :
6
- tags :
7
- - ' v*'
5
+ workflow_dispatch :
6
+ inputs :
7
+ git_tag :
8
+ description : ' Git tag'
9
+ required : true
10
+ type : string
11
+ cu :
12
+ description : ' CUDA version'
13
+ required : true
14
+ type : string
15
+ default : " 124"
16
+ python_minor :
17
+ description : ' Python minor version'
18
+ required : true
19
+ type : string
20
+ default : " 11"
21
+ python_patch :
22
+ description : ' Python patch version'
23
+ required : true
24
+ type : string
25
+ default : " 9"
26
+
8
27
9
28
jobs :
10
29
package_comfy_windows :
@@ -13,67 +32,42 @@ jobs:
13
32
packages : " write"
14
33
pull-requests : " read"
15
34
runs-on : windows-latest
16
- strategy :
17
- matrix :
18
- python_version : [3.11.8]
19
- cuda_version : [121]
20
35
steps :
21
- - name : Calculate Minor Version
22
- shell : bash
23
- run : |
24
- # Extract the minor version from the Python version
25
- MINOR_VERSION=$(echo "${{ matrix.python_version }}" | cut -d'.' -f2)
26
- echo "MINOR_VERSION=$MINOR_VERSION" >> $GITHUB_ENV
27
- - name : Setup Python
28
- uses : actions/setup-python@v5
29
- with :
30
- python-version : ${{ matrix.python_version }}
31
-
32
36
- uses : actions/checkout@v4
33
37
with :
38
+ ref : ${{ inputs.git_tag }}
34
39
fetch-depth : 0
35
40
persist-credentials : false
41
+ - uses : actions/cache/restore@v4
42
+ id : cache
43
+ with :
44
+ path : |
45
+ cu${{ inputs.cu }}_python_deps.tar
46
+ update_comfyui_and_python_dependencies.bat
47
+ key : ${{ runner.os }}-build-cu${{ inputs.cu }}-${{ inputs.python_minor }}
36
48
- shell : bash
37
49
run : |
38
- echo "@echo off
39
- call update_comfyui.bat nopause
40
- echo -
41
- echo This will try to update pytorch and all python dependencies.
42
- echo -
43
- echo If you just want to update normally, close this and run update_comfyui.bat instead.
44
- echo -
45
- pause
46
- ..\python_embeded\python.exe -s -m pip install --upgrade torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu${{ matrix.cuda_version }} -r ../ComfyUI/requirements.txt pygit2
47
- pause" > update_comfyui_and_python_dependencies.bat
48
-
49
- python -m pip wheel --no-cache-dir torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu${{ matrix.cuda_version }} -r requirements.txt pygit2 -w ./temp_wheel_dir
50
- python -m pip install --no-cache-dir ./temp_wheel_dir/*
51
- echo installed basic
52
- ls -lah temp_wheel_dir
53
- mv temp_wheel_dir cu${{ matrix.cuda_version }}_python_deps
54
- mv cu${{ matrix.cuda_version }}_python_deps ../
50
+ mv cu${{ inputs.cu }}_python_deps.tar ../
55
51
mv update_comfyui_and_python_dependencies.bat ../
56
52
cd ..
53
+ tar xf cu${{ inputs.cu }}_python_deps.tar
57
54
pwd
58
55
ls
59
-
56
+
57
+ - shell : bash
58
+ run : |
59
+ cd ..
60
60
cp -r ComfyUI ComfyUI_copy
61
- curl https://www.python.org/ftp/python/${{ matrix.python_version }}/python-${{ matrix.python_version }}-embed-amd64.zip -o python_embeded.zip
61
+ curl https://www.python.org/ftp/python/3. ${{ inputs.python_minor }}.${{ inputs.python_patch }} /python-3. ${{ inputs.python_minor }}.${{ inputs.python_patch }}-embed-amd64.zip -o python_embeded.zip
62
62
unzip python_embeded.zip -d python_embeded
63
63
cd python_embeded
64
64
echo ${{ env.MINOR_VERSION }}
65
- echo 'import site' >> ./python3${{ env.MINOR_VERSION }}._pth
65
+ echo 'import site' >> ./python3${{ inputs.python_minor }}._pth
66
66
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
67
67
./python.exe get-pip.py
68
- ./python.exe --version
69
- echo "Pip version:"
70
- ./python.exe -m pip --version
71
-
72
- set PATH=$PWD/Scripts:$PATH
73
- echo $PATH
74
- ./python.exe -s -m pip install ../cu${{ matrix.cuda_version }}_python_deps/*
75
- sed -i '1i../ComfyUI' ./python3${{ env.MINOR_VERSION }}._pth
76
- cd ..
68
+ ./python.exe -s -m pip install ../cu${{ inputs.cu }}_python_deps/*
69
+ sed -i '1i../ComfyUI' ./python3${{ inputs.python_minor }}._pth
70
+ cd ..
77
71
78
72
git clone https://github.com/comfyanonymous/taesd
79
73
cp taesd/*.pth ./ComfyUI_copy/models/vae_approx/
104
98
with :
105
99
repo_token : ${{ secrets.GITHUB_TOKEN }}
106
100
file : ComfyUI_windows_portable_nvidia.7z
107
- tag : ${{ github.ref }}
101
+ tag : ${{ inputs.git_tag }}
108
102
overwrite : true
109
103
prerelease : true
110
104
make_latest : false
0 commit comments