Skip to content

Commit d5a5621

Browse files
committed
Merge remote-tracking branch 'origin/main' into bl-snap
2 parents a71b99d + 35ddb19 commit d5a5621

File tree

89 files changed

+20824
-19748
lines changed

Some content is hidden

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

89 files changed

+20824
-19748
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
*.yaml text eol=lf
1313

1414
# Generated files
15-
src/types/comfyRegistryTypes.ts linguist-generated=true
15+
packages/registry-types/src/comfyRegistryTypes.ts linguist-generated=true
1616
src/workbench/extensions/manager/types/generatedManagerTypes.ts linguist-generated=true
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Setup Frontend
2+
description: 'Setup ComfyUI frontend development environment'
3+
inputs:
4+
extra_server_params:
5+
description: 'Additional parameters to pass to ComfyUI server'
6+
required: false
7+
default: ''
8+
runs:
9+
using: 'composite'
10+
steps:
11+
- name: Checkout ComfyUI
12+
uses: actions/checkout@v4
13+
with:
14+
repository: 'comfyanonymous/ComfyUI'
15+
path: 'ComfyUI'
16+
17+
- name: Checkout ComfyUI_frontend
18+
uses: actions/checkout@v4
19+
with:
20+
repository: 'Comfy-Org/ComfyUI_frontend'
21+
path: 'ComfyUI_frontend'
22+
23+
- name: Copy ComfyUI_devtools from frontend repo
24+
shell: bash
25+
run: |
26+
mkdir -p ComfyUI/custom_nodes/ComfyUI_devtools
27+
cp -r ComfyUI_frontend/tools/devtools/* ComfyUI/custom_nodes/ComfyUI_devtools/
28+
29+
- name: Install pnpm
30+
uses: pnpm/action-setup@v4
31+
with:
32+
version: 10
33+
34+
- name: Setup Node.js
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version: 'lts/*'
38+
cache: 'pnpm'
39+
cache-dependency-path: 'ComfyUI_frontend/pnpm-lock.yaml'
40+
41+
- name: Setup Python
42+
uses: actions/setup-python@v4
43+
with:
44+
python-version: '3.10'
45+
46+
- name: Install Python requirements
47+
shell: bash
48+
working-directory: ComfyUI
49+
run: |
50+
python -m pip install --upgrade pip
51+
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
52+
pip install -r requirements.txt
53+
pip install wait-for-it
54+
55+
- name: Build & Install ComfyUI_frontend
56+
shell: bash
57+
working-directory: ComfyUI_frontend
58+
run: |
59+
pnpm install --frozen-lockfile
60+
pnpm build
61+
62+
- name: Start ComfyUI server
63+
shell: bash
64+
working-directory: ComfyUI
65+
run: |
66+
python main.py --cpu --multi-user --front-end-root ../ComfyUI_frontend/dist ${{ inputs.extra_server_params }} &
67+
wait-for-it --service 127.0.0.1:8188 -t 600

.github/workflows/backport.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6161

6262
- name: Checkout repository
63-
uses: actions/checkout@v4
63+
uses: actions/checkout@v5
6464
with:
6565
fetch-depth: 0
6666

.github/workflows/chromatic.yaml

Lines changed: 179 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'Chromatic'
1+
name: Storybook and Chromatic CI
22

33
# - [Automate Chromatic with GitHub Actions • Chromatic docs]( https://www.chromatic.com/docs/github-actions/ )
44

@@ -8,13 +8,100 @@ on:
88
branches: [main]
99

1010
jobs:
11+
# Post starting comment for non-forked PRs
12+
comment-on-pr-start:
13+
runs-on: ubuntu-latest
14+
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false
15+
permissions:
16+
pull-requests: write
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v5
20+
21+
- name: Post starting comment
22+
env:
23+
GITHUB_TOKEN: ${{ github.token }}
24+
run: |
25+
chmod +x scripts/cicd/pr-storybook-deploy-and-comment.sh
26+
./scripts/cicd/pr-storybook-deploy-and-comment.sh \
27+
"${{ github.event.pull_request.number }}" \
28+
"${{ github.head_ref }}" \
29+
"starting" \
30+
"$(date -u '+%m/%d/%Y, %I:%M:%S %p')"
31+
32+
# Build Storybook for all PRs (free Cloudflare deployment)
33+
storybook-build:
34+
runs-on: ubuntu-latest
35+
if: github.event_name == 'pull_request'
36+
outputs:
37+
conclusion: ${{ steps.job-status.outputs.conclusion }}
38+
workflow-url: ${{ steps.workflow-url.outputs.url }}
39+
steps:
40+
- name: Checkout code
41+
uses: actions/checkout@v5
42+
43+
- name: Install pnpm
44+
uses: pnpm/action-setup@v4
45+
with:
46+
version: 10
47+
48+
- name: Setup Node.js
49+
uses: actions/setup-node@v4
50+
with:
51+
node-version: '20'
52+
cache: 'pnpm'
53+
54+
- name: Cache tool outputs
55+
uses: actions/cache@v4
56+
with:
57+
path: |
58+
.cache
59+
storybook-static
60+
tsconfig.tsbuildinfo
61+
key: storybook-cache-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('src/**/*.{ts,vue,js}', '*.config.*', '.storybook/**/*') }}
62+
restore-keys: |
63+
storybook-cache-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}-
64+
storybook-cache-${{ runner.os }}-
65+
storybook-tools-cache-${{ runner.os }}-
66+
67+
- name: Install dependencies
68+
run: pnpm install --frozen-lockfile
69+
70+
- name: Build Storybook
71+
run: pnpm build-storybook
72+
73+
- name: Set job status
74+
id: job-status
75+
if: always()
76+
run: |
77+
echo "conclusion=${{ job.status }}" >> $GITHUB_OUTPUT
78+
79+
- name: Get workflow URL
80+
id: workflow-url
81+
if: always()
82+
run: |
83+
echo "url=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> $GITHUB_OUTPUT
84+
85+
- name: Upload Storybook build
86+
if: success() && github.event.pull_request.head.repo.fork == false
87+
uses: actions/upload-artifact@v4
88+
with:
89+
name: storybook-static
90+
path: storybook-static/
91+
retention-days: 7
92+
93+
# Chromatic deployment only for version-bump-* branches or manual triggers
1194
chromatic-deployment:
1295
runs-on: ubuntu-latest
13-
# Only run for PRs from version-bump-* branches or manual triggers
14-
if: github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'version-bump-')
96+
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && startsWith(github.head_ref, 'version-bump-'))
97+
outputs:
98+
conclusion: ${{ steps.job-status.outputs.conclusion }}
99+
workflow-url: ${{ steps.workflow-url.outputs.url }}
100+
chromatic-build-url: ${{ steps.chromatic.outputs.buildUrl }}
101+
chromatic-storybook-url: ${{ steps.chromatic.outputs.storybookUrl }}
15102
steps:
16103
- name: Checkout code
17-
uses: actions/checkout@v4
104+
uses: actions/checkout@v5
18105
with:
19106
fetch-depth: 0 # Required for Chromatic baseline
20107

@@ -29,7 +116,6 @@ jobs:
29116
node-version: '20'
30117
cache: 'pnpm'
31118

32-
33119
- name: Cache tool outputs
34120
uses: actions/cache@v4
35121
with:
@@ -54,4 +140,92 @@ jobs:
54140
buildScriptName: build-storybook
55141
autoAcceptChanges: 'main' # Auto-accept changes on main branch
56142
exitOnceUploaded: true # Don't wait for UI tests to complete
143+
onlyChanged: true # Only capture changed stories
144+
145+
- name: Set job status
146+
id: job-status
147+
if: always()
148+
run: |
149+
echo "conclusion=${{ job.status }}" >> $GITHUB_OUTPUT
150+
151+
- name: Get workflow URL
152+
id: workflow-url
153+
if: always()
154+
run: |
155+
echo "url=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> $GITHUB_OUTPUT
156+
157+
# Deploy and comment for non-forked PRs only
158+
deploy-and-comment:
159+
needs: [storybook-build]
160+
runs-on: ubuntu-latest
161+
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false && always()
162+
permissions:
163+
pull-requests: write
164+
contents: read
165+
steps:
166+
- name: Checkout repository
167+
uses: actions/checkout@v5
168+
169+
- name: Download Storybook build
170+
if: needs.storybook-build.outputs.conclusion == 'success'
171+
uses: actions/download-artifact@v4
172+
with:
173+
name: storybook-static
174+
path: storybook-static
175+
176+
- name: Make deployment script executable
177+
run: chmod +x scripts/cicd/pr-storybook-deploy-and-comment.sh
178+
179+
- name: Deploy Storybook and comment on PR
180+
env:
181+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
182+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
183+
GITHUB_TOKEN: ${{ github.token }}
184+
WORKFLOW_CONCLUSION: ${{ needs.storybook-build.outputs.conclusion }}
185+
WORKFLOW_URL: ${{ needs.storybook-build.outputs.workflow-url }}
186+
run: |
187+
./scripts/cicd/pr-storybook-deploy-and-comment.sh \
188+
"${{ github.event.pull_request.number }}" \
189+
"${{ github.head_ref }}" \
190+
"completed"
57191
192+
# Update comment with Chromatic URLs for version-bump branches
193+
update-comment-with-chromatic:
194+
needs: [chromatic-deployment, deploy-and-comment]
195+
runs-on: ubuntu-latest
196+
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false && startsWith(github.head_ref, 'version-bump-') && needs.chromatic-deployment.outputs.chromatic-build-url != ''
197+
permissions:
198+
pull-requests: write
199+
steps:
200+
- name: Update comment with Chromatic URLs
201+
uses: actions/github-script@v7
202+
with:
203+
script: |
204+
const buildUrl = '${{ needs.chromatic-deployment.outputs.chromatic-build-url }}';
205+
const storybookUrl = '${{ needs.chromatic-deployment.outputs.chromatic-storybook-url }}';
206+
207+
// Find the existing Storybook comment
208+
const { data: comments } = await github.rest.issues.listComments({
209+
owner: context.repo.owner,
210+
repo: context.repo.repo,
211+
issue_number: ${{ github.event.pull_request.number }}
212+
});
213+
214+
const storybookComment = comments.find(comment =>
215+
comment.body.includes('<!-- STORYBOOK_BUILD_STATUS -->')
216+
);
217+
218+
if (storybookComment && buildUrl && storybookUrl) {
219+
// Append Chromatic info to existing comment
220+
const updatedBody = storybookComment.body.replace(
221+
/---\n(.*)$/s,
222+
`---\n### 🎨 Chromatic Visual Tests\n- 📊 [View Chromatic Build](${buildUrl})\n- 📚 [View Chromatic Storybook](${storybookUrl})\n\n$1`
223+
);
224+
225+
await github.rest.issues.updateComment({
226+
owner: context.repo.owner,
227+
repo: context.repo.repo,
228+
comment_id: storybookComment.id,
229+
body: updatedBody
230+
});
231+
}

.github/workflows/claude-pr-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
timeout-minutes: 30
5151
steps:
5252
- name: Checkout repository
53-
uses: actions/checkout@v4
53+
uses: actions/checkout@v5
5454
with:
5555
fetch-depth: 0
5656

.github/workflows/create-release-candidate-branch.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
steps:
2020
- name: Checkout repository
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v5
2222
with:
2323
fetch-depth: 0
2424
token: ${{ secrets.PR_GH_TOKEN || secrets.GITHUB_TOKEN }}

.github/workflows/dev-release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
version: ${{ steps.current_version.outputs.version }}
1616
steps:
1717
- name: Checkout code
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@v5
1919
- name: Install pnpm
2020
uses: pnpm/action-setup@v4
2121
with:
@@ -62,7 +62,7 @@ jobs:
6262
runs-on: ubuntu-latest
6363
steps:
6464
- name: Checkout code
65-
uses: actions/checkout@v4
65+
uses: actions/checkout@v5
6666
- name: Download dist artifact
6767
uses: actions/download-artifact@v4
6868
with:
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Devtools Python Check
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'tools/devtools/**'
7+
push:
8+
branches: [ main ]
9+
paths:
10+
- 'tools/devtools/**'
11+
12+
jobs:
13+
syntax:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v5
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.11'
24+
25+
- name: Validate Python syntax
26+
run: python3 -m compileall -q tools/devtools

.github/workflows/i18n-custom-nodes.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ jobs:
2222
runs-on: ubuntu-latest
2323
steps:
2424
- name: Checkout ComfyUI
25-
uses: actions/checkout@v4
25+
uses: actions/checkout@v5
2626
with:
2727
repository: comfyanonymous/ComfyUI
2828
path: ComfyUI
2929
ref: master
3030
- name: Checkout ComfyUI_frontend
31-
uses: actions/checkout@v4
31+
uses: actions/checkout@v5
3232
with:
3333
repository: Comfy-Org/ComfyUI_frontend
3434
path: ComfyUI_frontend
@@ -37,7 +37,7 @@ jobs:
3737
mkdir -p ComfyUI/custom_nodes/ComfyUI_devtools
3838
cp -r ComfyUI_frontend/tools/devtools/* ComfyUI/custom_nodes/ComfyUI_devtools/
3939
- name: Checkout custom node repository
40-
uses: actions/checkout@v4
40+
uses: actions/checkout@v5
4141
with:
4242
repository: ${{ inputs.owner }}/${{ inputs.repository }}
4343
path: 'ComfyUI/custom_nodes/${{ inputs.repository }}'

.github/workflows/i18n-node-defs.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ jobs:
1313
update-locales:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: Comfy-Org/ComfyUI_frontend_setup_action@v3
16+
- name: Setup Frontend
17+
uses: ./.github/actions/setup-frontend
1718
- name: Install Playwright Browsers
1819
run: pnpm exec playwright install chromium --with-deps
1920
working-directory: ComfyUI_frontend

0 commit comments

Comments
 (0)