Skip to content

Commit 96a448d

Browse files
authored
Merge branch 'comfyanonymous:master' into master
2 parents 8265452 + c37f15f commit 96a448d

283 files changed

Lines changed: 762416 additions & 132878 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.ci/update_windows/update.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ def pull(repo, remote_name='origin', branch='master'):
2828

2929
if repo.index.conflicts is not None:
3030
for conflict in repo.index.conflicts:
31-
print('Conflicts found in:', conflict[0].path)
31+
print('Conflicts found in:', conflict[0].path) # noqa: T201
3232
raise AssertionError('Conflicts, ahhhhh!!')
3333

3434
user = repo.default_signature
3535
tree = repo.index.write_tree()
36-
commit = repo.create_commit('HEAD',
37-
user,
38-
user,
39-
'Merge!',
40-
tree,
41-
[repo.head.target, remote_master_id])
36+
repo.create_commit('HEAD',
37+
user,
38+
user,
39+
'Merge!',
40+
tree,
41+
[repo.head.target, remote_master_id])
4242
# We need to do this or git CLI will think we are still merging.
4343
repo.state_cleanup()
4444
else:
@@ -49,18 +49,18 @@ def pull(repo, remote_name='origin', branch='master'):
4949
repo = pygit2.Repository(repo_path)
5050
ident = pygit2.Signature('comfyui', 'comfy@ui')
5151
try:
52-
print("stashing current changes")
52+
print("stashing current changes") # noqa: T201
5353
repo.stash(ident)
5454
except KeyError:
55-
print("nothing to stash")
55+
print("nothing to stash") # noqa: T201
5656
backup_branch_name = 'backup_branch_{}'.format(datetime.today().strftime('%Y-%m-%d_%H_%M_%S'))
57-
print("creating backup branch: {}".format(backup_branch_name))
57+
print("creating backup branch: {}".format(backup_branch_name)) # noqa: T201
5858
try:
5959
repo.branches.local.create(backup_branch_name, repo.head.peel())
6060
except:
6161
pass
6262

63-
print("checking out master branch")
63+
print("checking out master branch") # noqa: T201
6464
branch = repo.lookup_branch('master')
6565
if branch is None:
6666
ref = repo.lookup_reference('refs/remotes/origin/master')
@@ -72,7 +72,7 @@ def pull(repo, remote_name='origin', branch='master'):
7272
ref = repo.lookup_reference(branch.name)
7373
repo.checkout(ref)
7474

75-
print("pulling latest changes")
75+
print("pulling latest changes") # noqa: T201
7676
pull(repo)
7777

7878
if "--stable" in sys.argv:
@@ -94,7 +94,7 @@ def latest_tag(repo):
9494
if latest_tag is not None:
9595
repo.checkout(latest_tag)
9696

97-
print("Done!")
97+
print("Done!") # noqa: T201
9898

9999
self_update = True
100100
if len(sys.argv) > 2:
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ name: Python Linting
33
on: [push, pull_request]
44

55
jobs:
6-
pylint:
7-
name: Run Pylint
6+
ruff:
7+
name: Run Ruff
88
runs-on: ubuntu-latest
99

1010
steps:
@@ -16,8 +16,8 @@ jobs:
1616
with:
1717
python-version: 3.x
1818

19-
- name: Install Pylint
20-
run: pip install pylint
19+
- name: Install Ruff
20+
run: pip install ruff
2121

22-
- name: Run Pylint
23-
run: pylint --rcfile=.pylintrc $(find . -type f -name "*.py")
22+
- name: Run Ruff
23+
run: ruff check .

.github/workflows/stable-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
description: 'CUDA version'
1313
required: true
1414
type: string
15-
default: "124"
15+
default: "126"
1616
python_minor:
1717
description: 'Python minor version'
1818
required: true
@@ -22,7 +22,7 @@ on:
2222
description: 'Python patch version'
2323
required: true
2424
type: string
25-
default: "7"
25+
default: "8"
2626

2727

2828
jobs:

.github/workflows/test-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
python-version: ["3.8", "3.9", "3.10", "3.11"]
21+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
2222
steps:
2323
- uses: actions/checkout@v4
2424
- name: Set up Python ${{ matrix.python-version }}
@@ -28,4 +28,4 @@ jobs:
2828
- name: Install dependencies
2929
run: |
3030
python -m pip install --upgrade pip
31-
pip install -r requirements.txt
31+
pip install -r requirements.txt

.github/workflows/test-ci.yml

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
os: [macos, linux, windows]
23+
# os: [macos, linux, windows]
24+
os: [macos, linux]
2425
python_version: ["3.9", "3.10", "3.11", "3.12"]
2526
cuda_version: ["12.1"]
2627
torch_version: ["stable"]
@@ -31,9 +32,9 @@ jobs:
3132
- os: linux
3233
runner_label: [self-hosted, Linux]
3334
flags: ""
34-
- os: windows
35-
runner_label: [self-hosted, Windows]
36-
flags: ""
35+
# - os: windows
36+
# runner_label: [self-hosted, Windows]
37+
# flags: ""
3738
runs-on: ${{ matrix.runner_label }}
3839
steps:
3940
- name: Test Workflows
@@ -45,28 +46,28 @@ jobs:
4546
google_credentials: ${{ secrets.GCS_SERVICE_ACCOUNT_JSON }}
4647
comfyui_flags: ${{ matrix.flags }}
4748

48-
test-win-nightly:
49-
strategy:
50-
fail-fast: true
51-
matrix:
52-
os: [windows]
53-
python_version: ["3.9", "3.10", "3.11", "3.12"]
54-
cuda_version: ["12.1"]
55-
torch_version: ["nightly"]
56-
include:
57-
- os: windows
58-
runner_label: [self-hosted, Windows]
59-
flags: ""
60-
runs-on: ${{ matrix.runner_label }}
61-
steps:
62-
- name: Test Workflows
63-
uses: comfy-org/comfy-action@main
64-
with:
65-
os: ${{ matrix.os }}
66-
python_version: ${{ matrix.python_version }}
67-
torch_version: ${{ matrix.torch_version }}
68-
google_credentials: ${{ secrets.GCS_SERVICE_ACCOUNT_JSON }}
69-
comfyui_flags: ${{ matrix.flags }}
49+
# test-win-nightly:
50+
# strategy:
51+
# fail-fast: true
52+
# matrix:
53+
# os: [windows]
54+
# python_version: ["3.9", "3.10", "3.11", "3.12"]
55+
# cuda_version: ["12.1"]
56+
# torch_version: ["nightly"]
57+
# include:
58+
# - os: windows
59+
# runner_label: [self-hosted, Windows]
60+
# flags: ""
61+
# runs-on: ${{ matrix.runner_label }}
62+
# steps:
63+
# - name: Test Workflows
64+
# uses: comfy-org/comfy-action@main
65+
# with:
66+
# os: ${{ matrix.os }}
67+
# python_version: ${{ matrix.python_version }}
68+
# torch_version: ${{ matrix.torch_version }}
69+
# google_credentials: ${{ secrets.GCS_SERVICE_ACCOUNT_JSON }}
70+
# comfyui_flags: ${{ matrix.flags }}
7071

7172
test-unix-nightly:
7273
strategy:

.github/workflows/test-launch.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
path: "ComfyUI"
1818
- uses: actions/setup-python@v4
1919
with:
20-
python-version: '3.8'
20+
python-version: '3.9'
2121
- name: Install requirements
2222
run: |
2323
python -m pip install --upgrade pip
@@ -28,7 +28,7 @@ jobs:
2828
- name: Start ComfyUI server
2929
run: |
3030
python main.py --cpu 2>&1 | tee console_output.log &
31-
wait-for-it --service 127.0.0.1:8188 -t 600
31+
wait-for-it --service 127.0.0.1:8188 -t 30
3232
working-directory: ComfyUI
3333
- name: Check for unhandled exceptions in server log
3434
run: |

.github/workflows/test-unit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set up Python
1919
uses: actions/setup-python@v4
2020
with:
21-
python-version: '3.10'
21+
python-version: '3.12'
2222
- name: Install requirements
2323
run: |
2424
python -m pip install --upgrade pip
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Update Frontend Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "Frontend version to update to (e.g., 1.0.0)"
8+
required: true
9+
type: string
10+
11+
jobs:
12+
update-frontend:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
pull-requests: write
17+
18+
steps:
19+
- name: Checkout ComfyUI
20+
uses: actions/checkout@v4
21+
- uses: actions/setup-python@v4
22+
with:
23+
python-version: '3.10'
24+
- name: Install requirements
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
28+
pip install -r requirements.txt
29+
pip install wait-for-it
30+
# Frontend asset will be downloaded to ComfyUI/web_custom_versions/Comfy-Org_ComfyUI_frontend/{version}
31+
- name: Start ComfyUI server
32+
run: |
33+
python main.py --cpu --front-end-version Comfy-Org/ComfyUI_frontend@${{ github.event.inputs.version }} 2>&1 | tee console_output.log &
34+
wait-for-it --service 127.0.0.1:8188 -t 30
35+
- name: Configure Git
36+
run: |
37+
git config --global user.name "GitHub Action"
38+
git config --global user.email "action@github.com"
39+
# Replace existing frontend content with the new version and remove .js.map files
40+
# See https://github.com/Comfy-Org/ComfyUI_frontend/issues/2145 for why we remove .js.map files
41+
- name: Update frontend content
42+
run: |
43+
rm -rf web/
44+
cp -r web_custom_versions/Comfy-Org_ComfyUI_frontend/${{ github.event.inputs.version }} web/
45+
rm web/**/*.js.map
46+
- name: Create Pull Request
47+
uses: peter-evans/create-pull-request@v7
48+
with:
49+
token: ${{ secrets.PR_BOT_PAT }}
50+
commit-message: "Update frontend to v${{ github.event.inputs.version }}"
51+
title: "Frontend Update: v${{ github.event.inputs.version }}"
52+
body: |
53+
Automated PR to update frontend content to version ${{ github.event.inputs.version }}
54+
55+
This PR was created automatically by the frontend update workflow.
56+
branch: release-${{ github.event.inputs.version }}
57+
base: master
58+
labels: Frontend,dependencies
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Update Version File
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "pyproject.toml"
7+
branches:
8+
- master
9+
10+
jobs:
11+
update-version:
12+
runs-on: ubuntu-latest
13+
# Don't run on fork PRs
14+
if: github.event.pull_request.head.repo.full_name == github.repository
15+
permissions:
16+
pull-requests: write
17+
contents: write
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: "3.11"
27+
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
32+
- name: Update comfyui_version.py
33+
run: |
34+
# Read version from pyproject.toml and update comfyui_version.py
35+
python -c '
36+
import tomllib
37+
38+
# Read version from pyproject.toml
39+
with open("pyproject.toml", "rb") as f:
40+
config = tomllib.load(f)
41+
version = config["project"]["version"]
42+
43+
# Write version to comfyui_version.py
44+
with open("comfyui_version.py", "w") as f:
45+
f.write("# This file is automatically generated by the build process when version is\n")
46+
f.write("# updated in pyproject.toml.\n")
47+
f.write(f"__version__ = \"{version}\"\n")
48+
'
49+
50+
- name: Commit changes
51+
run: |
52+
git config --local user.name "github-actions"
53+
git config --local user.email "github-actions@github.com"
54+
git fetch origin ${{ github.head_ref }}
55+
git checkout -B ${{ github.head_ref }} origin/${{ github.head_ref }}
56+
git add comfyui_version.py
57+
git diff --quiet && git diff --staged --quiet || git commit -m "chore: Update comfyui_version.py to match pyproject.toml"
58+
git push origin HEAD:${{ github.head_ref }}

.github/workflows/windows_release_dependencies.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
description: 'cuda version'
1818
required: true
1919
type: string
20-
default: "124"
20+
default: "126"
2121

2222
python_minor:
2323
description: 'python minor version'
@@ -29,7 +29,7 @@ on:
2929
description: 'python patch version'
3030
required: true
3131
type: string
32-
default: "7"
32+
default: "8"
3333
# push:
3434
# branches:
3535
# - master

0 commit comments

Comments
 (0)