Skip to content

Commit c898588

Browse files
committed
Update.
1 parent 7a839cc commit c898588

File tree

2 files changed

+42
-152
lines changed

2 files changed

+42
-152
lines changed

.github/workflows/release.yml

Lines changed: 0 additions & 104 deletions
This file was deleted.

.github/workflows/stable-release.yml

Lines changed: 42 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,28 @@
22
name: "Release Stable Version"
33

44
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+
827

928
jobs:
1029
package_comfy_windows:
@@ -13,67 +32,42 @@ jobs:
1332
packages: "write"
1433
pull-requests: "read"
1534
runs-on: windows-latest
16-
strategy:
17-
matrix:
18-
python_version: [3.11.8]
19-
cuda_version: [121]
2035
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-
3236
- uses: actions/checkout@v4
3337
with:
38+
ref: ${{ inputs.git_tag }}
3439
fetch-depth: 0
3540
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 }}
3648
- shell: bash
3749
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 ../
5551
mv update_comfyui_and_python_dependencies.bat ../
5652
cd ..
53+
tar xf cu${{ inputs.cu }}_python_deps.tar
5754
pwd
5855
ls
59-
56+
57+
- shell: bash
58+
run: |
59+
cd ..
6060
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
6262
unzip python_embeded.zip -d python_embeded
6363
cd python_embeded
6464
echo ${{ env.MINOR_VERSION }}
65-
echo 'import site' >> ./python3${{ env.MINOR_VERSION }}._pth
65+
echo 'import site' >> ./python3${{ inputs.python_minor }}._pth
6666
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
6767
./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 ..
7771
7872
git clone https://github.com/comfyanonymous/taesd
7973
cp taesd/*.pth ./ComfyUI_copy/models/vae_approx/
@@ -104,7 +98,7 @@ jobs:
10498
with:
10599
repo_token: ${{ secrets.GITHUB_TOKEN }}
106100
file: ComfyUI_windows_portable_nvidia.7z
107-
tag: ${{ github.ref }}
101+
tag: ${{ inputs.git_tag }}
108102
overwrite: true
109103
prerelease: true
110104
make_latest: false

0 commit comments

Comments
 (0)