Skip to content

Commit 1c9e5fb

Browse files
robinjhuangyoland68
authored andcommitted
CI/CD for testing workflows.
1 parent 2d41642 commit 1c9e5fb

File tree

4 files changed

+320
-0
lines changed

4 files changed

+320
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
{
2+
"3": {
3+
"inputs": {
4+
"seed": 156680208700286,
5+
"steps": 20,
6+
"cfg": 8,
7+
"sampler_name": "euler",
8+
"scheduler": "normal",
9+
"denoise": 1,
10+
"model": [
11+
"4",
12+
0
13+
],
14+
"positive": [
15+
"6",
16+
0
17+
],
18+
"negative": [
19+
"7",
20+
0
21+
],
22+
"latent_image": [
23+
"5",
24+
0
25+
]
26+
},
27+
"class_type": "KSampler",
28+
"_meta": {
29+
"title": "KSampler"
30+
}
31+
},
32+
"4": {
33+
"inputs": {
34+
"ckpt_name": "v1-5-pruned-emaonly.ckpt"
35+
},
36+
"class_type": "CheckpointLoaderSimple",
37+
"_meta": {
38+
"title": "Load Checkpoint"
39+
}
40+
},
41+
"5": {
42+
"inputs": {
43+
"width": 512,
44+
"height": 512,
45+
"batch_size": 1
46+
},
47+
"class_type": "EmptyLatentImage",
48+
"_meta": {
49+
"title": "Empty Latent Image"
50+
}
51+
},
52+
"6": {
53+
"inputs": {
54+
"text": "beautiful scenery nature glass bottle landscape, , purple galaxy bottle,",
55+
"clip": [
56+
"4",
57+
1
58+
]
59+
},
60+
"class_type": "CLIPTextEncode",
61+
"_meta": {
62+
"title": "CLIP Text Encode (Prompt)"
63+
}
64+
},
65+
"7": {
66+
"inputs": {
67+
"text": "text, watermark",
68+
"clip": [
69+
"4",
70+
1
71+
]
72+
},
73+
"class_type": "CLIPTextEncode",
74+
"_meta": {
75+
"title": "CLIP Text Encode (Prompt)"
76+
}
77+
},
78+
"8": {
79+
"inputs": {
80+
"samples": [
81+
"3",
82+
0
83+
],
84+
"vae": [
85+
"4",
86+
2
87+
]
88+
},
89+
"class_type": "VAEDecode",
90+
"_meta": {
91+
"title": "VAE Decode"
92+
}
93+
},
94+
"9": {
95+
"inputs": {
96+
"filename_prefix": "ComfyUI",
97+
"images": [
98+
"8",
99+
0
100+
]
101+
},
102+
"class_type": "SaveImage",
103+
"_meta": {
104+
"title": "Save Image"
105+
}
106+
}
107+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
{
2+
"3": {
3+
"inputs": {
4+
"seed": 851616030078638,
5+
"steps": 20,
6+
"cfg": 8,
7+
"sampler_name": "euler",
8+
"scheduler": "normal",
9+
"denoise": 1,
10+
"model": [
11+
"10",
12+
0
13+
],
14+
"positive": [
15+
"6",
16+
0
17+
],
18+
"negative": [
19+
"7",
20+
0
21+
],
22+
"latent_image": [
23+
"5",
24+
0
25+
]
26+
},
27+
"class_type": "KSampler",
28+
"_meta": {
29+
"title": "KSampler"
30+
}
31+
},
32+
"4": {
33+
"inputs": {
34+
"ckpt_name": "v1-5-pruned-emaonly.ckpt"
35+
},
36+
"class_type": "CheckpointLoaderSimple",
37+
"_meta": {
38+
"title": "Load Checkpoint"
39+
}
40+
},
41+
"5": {
42+
"inputs": {
43+
"width": 512,
44+
"height": 512,
45+
"batch_size": 1
46+
},
47+
"class_type": "EmptyLatentImage",
48+
"_meta": {
49+
"title": "Empty Latent Image"
50+
}
51+
},
52+
"6": {
53+
"inputs": {
54+
"text": "masterpiece best quality girl",
55+
"clip": [
56+
"10",
57+
1
58+
]
59+
},
60+
"class_type": "CLIPTextEncode",
61+
"_meta": {
62+
"title": "CLIP Text Encode (Prompt)"
63+
}
64+
},
65+
"7": {
66+
"inputs": {
67+
"text": "bad hands",
68+
"clip": [
69+
"10",
70+
1
71+
]
72+
},
73+
"class_type": "CLIPTextEncode",
74+
"_meta": {
75+
"title": "CLIP Text Encode (Prompt)"
76+
}
77+
},
78+
"8": {
79+
"inputs": {
80+
"samples": [
81+
"3",
82+
0
83+
],
84+
"vae": [
85+
"4",
86+
2
87+
]
88+
},
89+
"class_type": "VAEDecode",
90+
"_meta": {
91+
"title": "VAE Decode"
92+
}
93+
},
94+
"9": {
95+
"inputs": {
96+
"filename_prefix": "ComfyUI",
97+
"images": [
98+
"8",
99+
0
100+
]
101+
},
102+
"class_type": "SaveImage",
103+
"_meta": {
104+
"title": "Save Image"
105+
}
106+
},
107+
"10": {
108+
"inputs": {
109+
"lora_name": "epiNoiseoffset_v2.safetensors",
110+
"strength_model": 1,
111+
"strength_clip": 1,
112+
"model": [
113+
"4",
114+
0
115+
],
116+
"clip": [
117+
"4",
118+
1
119+
]
120+
},
121+
"class_type": "LoraLoader",
122+
"_meta": {
123+
"title": "Load LoRA"
124+
}
125+
}
126+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Test ComfyUI Windows with Default Workflow
2+
on:
3+
push:
4+
branches:
5+
- mirror
6+
workflow_dispatch:
7+
inputs:
8+
branch:
9+
description: 'Branch to run the workflow on'
10+
required: true
11+
default: 'mirror'
12+
13+
jobs:
14+
test-action:
15+
if: >-
16+
(github.event_name == 'workflow_dispatch') ||
17+
(github.event_name == 'issue_comment' &&
18+
contains(github.event.comment.body, 'run_test') &&
19+
contains(fromJson('["WRITE", "MAINTAIN", "ADMIN"]'), github.event.comment.author_association))
20+
runs-on: win
21+
steps:
22+
- name: Use ComfyUI GitHub Action
23+
uses: drip-art/comfy-action@main
24+
with:
25+
os: windows
26+
cuda_version: 12.1
27+
workflow_name: "default-workflow"
28+
models-json: '{"v1-5-pruned-emaonly.ckpt": {"url": "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors?download=true", "directory": "checkpoints"}}'
29+
workflow_json_path: '.github/workflows/json_examples/workflow_api.json'
30+
gcs_bucket_name: 'comfy-ci-results'
31+
google_credentials: ${{ secrets.GCS_SERVICE_ACCOUNT_JSON }}
32+
output_prefix: 'ComfyUI'
33+
timeout: 50

.github/workflows/test-workflows.yaml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Test ComfyUI Example Workflows
2+
on:
3+
push:
4+
branches:
5+
- mirror
6+
workflow_dispatch:
7+
inputs:
8+
branch:
9+
description: 'Branch to run the workflow on'
10+
required: true
11+
default: 'mirror'
12+
13+
14+
jobs:
15+
test-default-workflow:
16+
if: >-
17+
(github.event_name == 'workflow_dispatch') ||
18+
(github.event.review.state == 'approved')
19+
strategy:
20+
matrix:
21+
os: [macos, linux]
22+
include:
23+
- os: macos
24+
runner_label: [self-hosted, m2]
25+
- os: linux
26+
cuda_version: 12.1
27+
runner_label: [self-hosted, Linux, nvidia-tesla-t4]
28+
runs-on: ${{ matrix.runner_label }}
29+
steps:
30+
- name: Test Default Workflow
31+
uses: drip-art/comfy-action@main
32+
with:
33+
os: ${{ matrix.os }}
34+
cuda_version: ${{ matrix.cuda_version }}
35+
models-json: '{"v1-5-pruned-emaonly.ckpt": {"url": "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt", "directory": "checkpoints"}}'
36+
workflow_name: "default-workflow"
37+
workflow_json_path: '.github/workflows/json_examples/workflow_api.json'
38+
gcs_bucket_name: 'comfy-ci-results'
39+
google_credentials: ${{ secrets.GCS_SERVICE_ACCOUNT_JSON }}
40+
output_prefix: 'ComfyUI'
41+
timeout: 50
42+
43+
- name: Test Lora Workflow
44+
uses: drip-art/comfy-action@main
45+
with:
46+
os: ${{ matrix.os }}
47+
cuda_version: ${{ matrix.cuda_version }}
48+
models-json: '{"v1-5-pruned-emaonly.ckpt": {"url": "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt", "directory": "checkpoints"}, "epiNoiseoffset_v2.safetensors": {"url": "https://huggingface.co/adhikjoshi/epi_noiseoffset/resolve/main/epiNoiseoffset_v2.safetensors", "directory": "loras"}}'
49+
workflow_name: "lora-workflow"
50+
workflow_json_path: '.github/workflows/json_examples/workflow_lora_api.json'
51+
gcs_bucket_name: 'comfy-ci-results'
52+
google_credentials: ${{ secrets.GCS_SERVICE_ACCOUNT_JSON }}
53+
output_prefix: 'ComfyUI'
54+
timeout: 50

0 commit comments

Comments
 (0)