Skip to content

Commit 019c288

Browse files
author
Comfy-Org Mirror Autopull Bot
committed
[Rebase Mirror Onto] IS_CHANGED should be a classmethod (#5159)
1 parent 2c641e6 commit 019c288

7 files changed

+337
-3
lines changed

.github/workflows/release.yml

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
2+
name: "Release Stable Version"
3+
4+
on:
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+
27+
28+
jobs:
29+
package_comfy_windows:
30+
permissions:
31+
contents: "write"
32+
packages: "write"
33+
pull-requests: "read"
34+
runs-on: windows-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
with:
38+
ref: ${{ inputs.git_tag }}
39+
fetch-depth: 0
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 }}
48+
- shell: bash
49+
run: |
50+
mv cu${{ inputs.cu }}_python_deps.tar ../
51+
mv update_comfyui_and_python_dependencies.bat ../
52+
cd ..
53+
tar xf cu${{ inputs.cu }}_python_deps.tar
54+
pwd
55+
ls
56+
57+
- shell: bash
58+
run: |
59+
cd ..
60+
cp -r ComfyUI ComfyUI_copy
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+
unzip python_embeded.zip -d python_embeded
63+
cd python_embeded
64+
echo ${{ env.MINOR_VERSION }}
65+
echo 'import site' >> ./python3${{ inputs.python_minor }}._pth
66+
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
67+
./python.exe get-pip.py
68+
./python.exe -s -m pip install ../cu${{ inputs.cu }}_python_deps/*
69+
sed -i '1i../ComfyUI' ./python3${{ inputs.python_minor }}._pth
70+
cd ..
71+
72+
git clone https://github.com/comfyanonymous/taesd
73+
cp taesd/*.pth ./ComfyUI_copy/models/vae_approx/
74+
75+
mkdir ComfyUI_windows_portable
76+
mv python_embeded ComfyUI_windows_portable
77+
mv ComfyUI_copy ComfyUI_windows_portable/ComfyUI
78+
79+
cd ComfyUI_windows_portable
80+
81+
mkdir update
82+
cp -r ComfyUI/.ci/update_windows/* ./update/
83+
cp -r ComfyUI/.ci/windows_base_files/* ./
84+
cp ../update_comfyui_and_python_dependencies.bat ./update/
85+
86+
cd ..
87+
88+
"C:\Program Files\7-Zip\7z.exe" a -t7z -m0=lzma2 -mx=8 -mfb=64 -md=32m -ms=on -mf=BCJ2 ComfyUI_windows_portable.7z ComfyUI_windows_portable
89+
mv ComfyUI_windows_portable.7z ComfyUI/ComfyUI_windows_portable_nvidia.7z
90+
91+
cd ComfyUI_windows_portable
92+
python_embeded/python.exe -s ComfyUI/main.py --quick-test-for-ci --cpu
93+
94+
ls
95+
96+
- name: Upload binaries to release
97+
uses: svenstaro/upload-release-action@v2
98+
with:
99+
repo_token: ${{ secrets.GITHUB_TOKEN }}
100+
file: ComfyUI_windows_portable_nvidia.7z
101+
tag: ${{ inputs.git_tag }}
102+
overwrite: true
103+
prerelease: true
104+
make_latest: false

.github/workflows/stable-release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
- shell: bash
5858
run: |
5959
cd ..
60-
cp -r ComfyUI ComfyUI_copy
60+
cp -r ${{ github.event.repository.name }} ComfyUI_copy
6161
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
@@ -86,7 +86,7 @@ jobs:
8686
cd ..
8787
8888
"C:\Program Files\7-Zip\7z.exe" a -t7z -m0=lzma2 -mx=8 -mfb=64 -md=32m -ms=on -mf=BCJ2 ComfyUI_windows_portable.7z ComfyUI_windows_portable
89-
mv ComfyUI_windows_portable.7z ComfyUI/ComfyUI_windows_portable_nvidia.7z
89+
mv ComfyUI_windows_portable.7z ${{ github.event.repository.name }}/ComfyUI_windows_portable_nvidia.7z
9090
9191
cd ComfyUI_windows_portable
9292
python_embeded/python.exe -s ComfyUI/main.py --quick-test-for-ci --cpu
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Use Custom Runner Target To Test ComfyUI Windows with Default Workflow
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
runs_on:
6+
description: 'What runners to run this test on'
7+
required: false
8+
default: 'win'
9+
10+
jobs:
11+
test-action:
12+
runs-on: ${{ inputs.runs_on }}
13+
steps:
14+
- name: Use ComfyUI GitHub Action
15+
uses: comfy-org/comfy-action@monkeytest
16+
with:
17+
os: windows
18+
cuda_version: 12.1
19+
workflow_filenames: 'default.json'
20+
gcs_bucket_name: 'comfy-ci-results'
21+
google_credentials: ${{ secrets.GCS_SERVICE_ACCOUNT_JSON }}
22+
output_prefix: 'ComfyUI'
23+
timeout: 50
24+
# api_endpoint: http://localhost:8080/upload-artifact
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Test ComfyUI Workflows Manual
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
os:
6+
description: 'Operating System'
7+
required: true
8+
default: 'macos'
9+
type: choice
10+
options:
11+
- macos
12+
- linux
13+
- win
14+
runner_label:
15+
description: 'Runner Label'
16+
required: false
17+
default: 'self-hosted'
18+
type: string
19+
python_version:
20+
description: 'Python Version'
21+
required: true
22+
default: '3.9'
23+
type: choice
24+
options:
25+
- '3.8'
26+
- '3.9'
27+
- '3.10'
28+
- '3.11'
29+
- '3.12'
30+
- other
31+
python_version_number:
32+
description: 'Specify your own Python Version Number, e.g. 3.9.12'
33+
required: false
34+
default: '3.9'
35+
type: string
36+
cuda_version:
37+
description: 'CUDA Version, currently only 12.1 is supported'
38+
required: true
39+
default: '12.1'
40+
type: choice
41+
options:
42+
- '12.1'
43+
torch_version:
44+
description: 'Torch Version'
45+
required: true
46+
default: 'stable'
47+
type: choice
48+
options:
49+
- stable
50+
- preview
51+
- other
52+
torch_version_number:
53+
description: 'Torch Version Number'
54+
required: false
55+
default: '2.3.1'
56+
type: string
57+
comfyui_flags:
58+
description: 'ComfyUI Flags'
59+
required: false
60+
default: '--force-fp16'
61+
type: string
62+
workflow_filenames:
63+
description: 'Workflow Filenames'
64+
required: false
65+
default: 'default.json,lora.json'
66+
type: string
67+
workflow_raw_json:
68+
description: 'Workflow Raw JSON (Not yet supported)'
69+
required: false
70+
default: ''
71+
type: string
72+
73+
74+
75+
76+
77+
jobs:
78+
test-default-workflow:
79+
runs-on: ${{ inputs.runner_label }}
80+
steps:
81+
- name: Test Default Workflow
82+
uses: comfy-org/comfy-action@main
83+
with:
84+
os: ${{ inputs.os }}
85+
python_version: ${{ (contains(inputs.python_version, "other") && inputs.python_version_number != '' ) && inputs.python_version_number || inputs.python_version}}
86+
cuda_version: ${{ inputs.cuda_version }}
87+
torch_version: ${{ (contains(inputs.torch_version, "other") && inputs.torch_version_number != '' ) && inputs.torch_version_number || inputs.torch_version}}
88+
workflow_filenames: "default.json,lora.json"
89+
workflow_raw_json: ${{ inputs.workflow_raw_json }}
90+
google_credentials: ${{ secrets.GCS_SERVICE_ACCOUNT_JSON }}
91+
timeout: 50

.github/workflows/windows_release_package.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
- shell: bash
5656
run: |
5757
cd ..
58-
cp -r ComfyUI ComfyUI_copy
58+
cp -r ComfyUI-Mirror ComfyUI_copy
5959
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
6060
unzip python_embeded.zip -d python_embeded
6161
cd python_embeded
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: Comfy CI Workflows Run
2+
on:
3+
push:
4+
branches:
5+
- master
6+
paths-ignore:
7+
- 'app/**'
8+
- 'input/**'
9+
- 'output/**'
10+
- 'model/**'
11+
- 'notebook/**'
12+
- 'script_example/**'
13+
- 'tests/**'
14+
- 'tests-ui/**'
15+
- '.github/**'
16+
- '.ci/**'
17+
- 'web/**'
18+
workflow_dispatch:
19+
20+
jobs:
21+
test-stable:
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
os: [macos, linux, windows]
26+
python_version: ["3.9", "3.10", "3.11", "3.12"]
27+
cuda_version: ["12.1"]
28+
torch_version: ["stable"]
29+
include:
30+
- os: macos
31+
runner_label: [self-hosted, macOS, m2]
32+
flags: "--use-pytorch-cross-attention"
33+
- os: linux
34+
runner_label: [self-hosted, Linux, t4]
35+
flags: ""
36+
- os: windows
37+
runner_label: [self-hosted, win]
38+
flags: ""
39+
runs-on: ${{ matrix.runner_label }}
40+
steps:
41+
- name: Test Workflows
42+
uses: comfy-org/comfy-action@main
43+
with:
44+
os: ${{ matrix.os }}
45+
python_version: ${{ matrix.python_version }}
46+
torch_version: ${{ matrix.torch_version }}
47+
google_credentials: ${{ secrets.GCS_SERVICE_ACCOUNT_JSON }}
48+
comfyui_flags: ${{ matrix.flags }}
49+
output_prefix: 'ComfyUI'
50+
timeout: 50
51+
use_prior_commit: 'true'
52+
test-win-nightly:
53+
strategy:
54+
fail-fast: true
55+
matrix:
56+
os: [windows]
57+
python_version: ["3.9", "3.10", "3.11", "3.12"]
58+
cuda_version: ["12.1"]
59+
torch_version: ["nightly"]
60+
include:
61+
- os: windows
62+
runner_label: [self-hosted, win]
63+
flags: ""
64+
runs-on: ${{ matrix.runner_label }}
65+
steps:
66+
- name: Test Workflows
67+
uses: comfy-org/comfy-action@main
68+
with:
69+
os: ${{ matrix.os }}
70+
python_version: ${{ matrix.python_version }}
71+
torch_version: ${{ matrix.torch_version }}
72+
google_credentials: ${{ secrets.GCS_SERVICE_ACCOUNT_JSON }}
73+
comfyui_flags: ${{ matrix.flags }}
74+
output_prefix: 'ComfyUI'
75+
timeout: 50
76+
use_prior_commit: 'true'
77+
test-unix-nightly:
78+
strategy:
79+
fail-fast: false
80+
matrix:
81+
os: [macos, linux]
82+
python_version: ["3.11"]
83+
cuda_version: ["12.1"]
84+
torch_version: ["nightly"]
85+
include:
86+
- os: macos
87+
runner_label: [self-hosted, macOS, m2]
88+
flags: "--use-pytorch-cross-attention"
89+
- os: linux
90+
runner_label: [self-hosted, Linux, t4]
91+
flags: ""
92+
93+
runs-on: ${{ matrix.runner_label }}
94+
steps:
95+
- name: Test Workflows
96+
uses: comfy-org/comfy-action@main
97+
with:
98+
os: ${{ matrix.os }}
99+
python_version: ${{ matrix.python_version }}
100+
torch_version: ${{ matrix.torch_version }}
101+
google_credentials: ${{ secrets.GCS_SERVICE_ACCOUNT_JSON }}
102+
comfyui_flags: ${{ matrix.flags }}
103+
output_prefix: 'ComfyUI'
104+
timeout: 50
105+
use_prior_commit: 'true'

.vscode/settings.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"workbench.colorCustomizations": {
3+
"inlineChat.background": "#FFFFFF",
4+
"inlineChatInput.background": "#FFFFFF",
5+
"inlineChatInput.focusBorder": "#EFEFEF",
6+
"inlineChat.regionHighlight": "#F0F0F0",
7+
"titleBar.activeBackground": "#0D4A23",
8+
"titleBar.activeForeground": "#F2FCF5"
9+
}
10+
}

0 commit comments

Comments
 (0)