Skip to content

Commit 7f38e4c

Browse files
Add action to create cached deps with manually specified torch. (#10102)
1 parent 8accf50 commit 7f38e4c

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: "Windows Release dependencies Manual"
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
torch_dependencies:
7+
description: 'torch dependencies'
8+
required: false
9+
type: string
10+
default: "torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu128"
11+
cache_tag:
12+
description: 'Cached dependencies tag'
13+
required: true
14+
type: string
15+
default: "cu128"
16+
17+
python_minor:
18+
description: 'python minor version'
19+
required: true
20+
type: string
21+
default: "12"
22+
23+
python_patch:
24+
description: 'python patch version'
25+
required: true
26+
type: string
27+
default: "10"
28+
29+
jobs:
30+
build_dependencies:
31+
runs-on: windows-latest
32+
steps:
33+
- uses: actions/checkout@v4
34+
- uses: actions/setup-python@v5
35+
with:
36+
python-version: 3.${{ inputs.python_minor }}.${{ inputs.python_patch }}
37+
38+
- shell: bash
39+
run: |
40+
echo "@echo off
41+
call update_comfyui.bat nopause
42+
echo -
43+
echo This will try to update pytorch and all python dependencies.
44+
echo -
45+
echo If you just want to update normally, close this and run update_comfyui.bat instead.
46+
echo -
47+
pause
48+
..\python_embeded\python.exe -s -m pip install --upgrade ${{ inputs.torch_dependencies }} -r ../ComfyUI/requirements.txt pygit2
49+
pause" > update_comfyui_and_python_dependencies.bat
50+
51+
grep -v comfyui requirements.txt > requirements_nocomfyui.txt
52+
python -m pip wheel --no-cache-dir ${{ inputs.torch_dependencies }} -r requirements_nocomfyui.txt pygit2 -w ./temp_wheel_dir
53+
python -m pip install --no-cache-dir ./temp_wheel_dir/*
54+
echo installed basic
55+
ls -lah temp_wheel_dir
56+
mv temp_wheel_dir ${{ inputs.cache_tag }}_python_deps
57+
tar cf ${{ inputs.cache_tag }}_python_deps.tar ${{ inputs.cache_tag }}_python_deps
58+
59+
- uses: actions/cache/save@v4
60+
with:
61+
path: |
62+
${{ inputs.cache_tag }}_python_deps.tar
63+
update_comfyui_and_python_dependencies.bat
64+
key: ${{ runner.os }}-build-${{ inputs.cache_tag }}-${{ inputs.python_minor }}

0 commit comments

Comments
 (0)