Skip to content

Commit 4aa1d28

Browse files
committed
Merge branch 'gempoll' into gempoll-docker
2 parents 04b4fd7 + 97b7d64 commit 4aa1d28

File tree

320 files changed

+289701
-57786
lines changed

Some content is hidden

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

320 files changed

+289701
-57786
lines changed

.ci/update_windows/update.py

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,38 @@ def pull(repo, remote_name='origin', branch='master'):
6262

6363
print("checking out master branch")
6464
branch = repo.lookup_branch('master')
65-
ref = repo.lookup_reference(branch.name)
66-
repo.checkout(ref)
65+
if branch is None:
66+
ref = repo.lookup_reference('refs/remotes/origin/master')
67+
repo.checkout(ref)
68+
branch = repo.lookup_branch('master')
69+
if branch is None:
70+
repo.create_branch('master', repo.get(ref.target))
71+
else:
72+
ref = repo.lookup_reference(branch.name)
73+
repo.checkout(ref)
6774

6875
print("pulling latest changes")
6976
pull(repo)
7077

78+
if "--stable" in sys.argv:
79+
def latest_tag(repo):
80+
versions = []
81+
for k in repo.references:
82+
try:
83+
prefix = "refs/tags/v"
84+
if k.startswith(prefix):
85+
version = list(map(int, k[len(prefix):].split(".")))
86+
versions.append((version[0] * 10000000000 + version[1] * 100000 + version[2], k))
87+
except:
88+
pass
89+
versions.sort()
90+
if len(versions) > 0:
91+
return versions[-1][1]
92+
return None
93+
latest_tag = latest_tag(repo)
94+
if latest_tag is not None:
95+
repo.checkout(latest_tag)
96+
7197
print("Done!")
7298

7399
self_update = True
@@ -108,3 +134,13 @@ def file_size(f):
108134
shutil.copy(repo_req_path, req_path)
109135
except:
110136
pass
137+
138+
139+
stable_update_script = os.path.join(repo_path, ".ci/update_windows/update_comfyui_stable.bat")
140+
stable_update_script_to = os.path.join(cur_path, "update_comfyui_stable.bat")
141+
142+
try:
143+
if not file_size(stable_update_script_to) > 10:
144+
shutil.copy(stable_update_script, stable_update_script_to)
145+
except:
146+
pass
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@echo off
2+
..\python_embeded\python.exe .\update.py ..\ComfyUI\ --stable
3+
if exist update_new.py (
4+
move /y update_new.py update.py
5+
echo Running updater again since it got updated.
6+
..\python_embeded\python.exe .\update.py ..\ComfyUI\ --skip_self_update --stable
7+
)
8+
if "%~1"=="" pause

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/web/assets/** linguist-generated
2+
/web/** linguist-vendored
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Bug Report
2+
description: "Something is broken inside of ComfyUI. (Do not use this if you're just having issues and need help, or if the issue relates to a custom node)"
3+
labels: ["Potential Bug"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Before submitting a **Bug Report**, please ensure the following:
9+
10+
- **1:** You are running the latest version of ComfyUI.
11+
- **2:** You have looked at the existing bug reports and made sure this isn't already reported.
12+
- **3:** You confirmed that the bug is not caused by a custom node. You can disable all custom nodes by passing
13+
`--disable-all-custom-nodes` command line argument.
14+
- **4:** This is an actual bug in ComfyUI, not just a support question. A bug is when you can specify exact
15+
steps to replicate what went wrong and others will be able to repeat your steps and see the same issue happen.
16+
17+
If unsure, ask on the [ComfyUI Matrix Space](https://app.element.io/#/room/%23comfyui_space%3Amatrix.org) or the [Comfy Org Discord](https://discord.gg/comfyorg) first.
18+
- type: textarea
19+
attributes:
20+
label: Expected Behavior
21+
description: "What you expected to happen."
22+
validations:
23+
required: true
24+
- type: textarea
25+
attributes:
26+
label: Actual Behavior
27+
description: "What actually happened. Please include a screenshot of the issue if possible."
28+
validations:
29+
required: true
30+
- type: textarea
31+
attributes:
32+
label: Steps to Reproduce
33+
description: "Describe how to reproduce the issue. Please be sure to attach a workflow JSON or PNG, ideally one that doesn't require custom nodes to test. If the bug open happens when certain custom nodes are used, most likely that custom node is what has the bug rather than ComfyUI, in which case it should be reported to the node's author."
34+
validations:
35+
required: true
36+
- type: textarea
37+
attributes:
38+
label: Debug Logs
39+
description: "Please copy the output from your terminal logs here."
40+
render: powershell
41+
validations:
42+
required: true
43+
- type: textarea
44+
attributes:
45+
label: Other
46+
description: "Any other additional information you think might be helpful."
47+
validations:
48+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: ComfyUI Matrix Space
4+
url: https://app.element.io/#/room/%23comfyui_space%3Amatrix.org
5+
about: The ComfyUI Matrix Space is available for support and general discussion related to ComfyUI (Matrix is like Discord but open source).
6+
- name: Comfy Org Discord
7+
url: https://discord.gg/comfyorg
8+
about: The Comfy Org Discord is available for support and general discussion related to ComfyUI.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Feature Request
2+
description: "You have an idea for something new you would like to see added to ComfyUI's core."
3+
labels: [ "Feature" ]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Before submitting a **Feature Request**, please ensure the following:
9+
10+
**1:** You are running the latest version of ComfyUI.
11+
**2:** You have looked to make sure there is not already a feature that does what you need, and there is not already a Feature Request listed for the same idea.
12+
**3:** This is something that makes sense to add to ComfyUI Core, and wouldn't make more sense as a custom node.
13+
14+
If unsure, ask on the [ComfyUI Matrix Space](https://app.element.io/#/room/%23comfyui_space%3Amatrix.org) or the [Comfy Org Discord](https://discord.gg/comfyorg) first.
15+
- type: textarea
16+
attributes:
17+
label: Feature Idea
18+
description: "Describe the feature you want to see."
19+
validations:
20+
required: true
21+
- type: textarea
22+
attributes:
23+
label: Existing Solutions
24+
description: "Please search through available custom nodes / extensions to see if there are existing custom solutions for this. If so, please link the options you found here as a reference."
25+
validations:
26+
required: false
27+
- type: textarea
28+
attributes:
29+
label: Other
30+
description: "Any other additional information you think might be helpful."
31+
validations:
32+
required: false
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: User Support
2+
description: "Use this if you need help with something, or you're experiencing an issue."
3+
labels: [ "User Support" ]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Before submitting a **User Report** issue, please ensure the following:
9+
10+
**1:** You are running the latest version of ComfyUI.
11+
**2:** You have made an effort to find public answers to your question before asking here. In other words, you googled it first, and scrolled through recent help topics.
12+
13+
If unsure, ask on the [ComfyUI Matrix Space](https://app.element.io/#/room/%23comfyui_space%3Amatrix.org) or the [Comfy Org Discord](https://discord.gg/comfyorg) first.
14+
- type: textarea
15+
attributes:
16+
label: Your question
17+
description: "Post your question here. Please be as detailed as possible."
18+
validations:
19+
required: true
20+
- type: textarea
21+
attributes:
22+
label: Logs
23+
description: "If your question relates to an issue you're experiencing, please go to `Server` -> `Logs` -> potentially set `View Type` to `Debug` as well, then copypaste all the text into here."
24+
render: powershell
25+
validations:
26+
required: false
27+
- type: textarea
28+
attributes:
29+
label: Other
30+
description: "Any other additional information you think might be helpful."
31+
validations:
32+
required: false
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# This is the GitHub Workflow that drives full-GPU-enabled tests of pull requests to ComfyUI, when the 'Run-CI-Test' label is added
2+
# Results are reported as checkmarks on the commits, as well as onto https://ci.comfy.org/
3+
name: Pull Request CI Workflow Runs
4+
on:
5+
pull_request_target:
6+
types: [labeled]
7+
8+
jobs:
9+
pr-test-stable:
10+
if: ${{ github.event.label.name == 'Run-CI-Test' }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
os: [macos, linux, windows]
15+
python_version: ["3.9", "3.10", "3.11", "3.12"]
16+
cuda_version: ["12.1"]
17+
torch_version: ["stable"]
18+
include:
19+
- os: macos
20+
runner_label: [self-hosted, macOS]
21+
flags: "--use-pytorch-cross-attention"
22+
- os: linux
23+
runner_label: [self-hosted, Linux]
24+
flags: ""
25+
- os: windows
26+
runner_label: [self-hosted, win]
27+
flags: ""
28+
runs-on: ${{ matrix.runner_label }}
29+
steps:
30+
- name: Test Workflows
31+
uses: comfy-org/comfy-action@main
32+
with:
33+
os: ${{ matrix.os }}
34+
python_version: ${{ matrix.python_version }}
35+
torch_version: ${{ matrix.torch_version }}
36+
google_credentials: ${{ secrets.GCS_SERVICE_ACCOUNT_JSON }}
37+
comfyui_flags: ${{ matrix.flags }}
38+
use_prior_commit: 'true'
39+
comment:
40+
if: ${{ github.event.label.name == 'Run-CI-Test' }}
41+
runs-on: ubuntu-latest
42+
permissions:
43+
pull-requests: write
44+
steps:
45+
- uses: actions/github-script@v6
46+
with:
47+
script: |
48+
github.rest.issues.createComment({
49+
issue_number: context.issue.number,
50+
owner: context.repo.owner,
51+
repo: context.repo.repo,
52+
body: '(Automated Bot Message) CI Tests are running, you can view the results at https://ci.comfy.org/?branch=${{ github.event.pull_request.number }}%2Fmerge'
53+
})

.github/workflows/pylint.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Python Linting
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
pylint:
7+
name: Run Pylint
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
13+
14+
- name: Set up Python
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: 3.x
18+
19+
- name: Install Pylint
20+
run: pip install pylint
21+
22+
- name: Run Pylint
23+
run: pylint --rcfile=.pylintrc $(find . -type f -name "*.py")
Lines changed: 104 additions & 0 deletions
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: "121"
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 --depth 1 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

0 commit comments

Comments
 (0)