Skip to content

Commit c020db4

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

File tree

4 files changed

+311
-0
lines changed

4 files changed

+311
-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,29 @@
1+
name: Test ComfyUI Windows with Default Workflow
2+
on:
3+
push:
4+
branches:
5+
- mirror
6+
workflow_dispatch:
7+
8+
9+
jobs:
10+
test-action:
11+
if: >-
12+
(github.event_name == 'workflow_dispatch') ||
13+
(github.event_name == 'issue_comment' &&
14+
contains(github.event.comment.body, 'run_test') &&
15+
contains(fromJson('["WRITE", "MAINTAIN", "ADMIN"]'), github.event.comment.author_association))
16+
runs-on: win
17+
steps:
18+
- name: Use ComfyUI GitHub Action
19+
uses: drip-art/comfy-action@main
20+
with:
21+
os: windows
22+
cuda_version: 12.1
23+
workflow_name: "default-workflow"
24+
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"}}'
25+
workflow_json_path: '.github/workflows/json_examples/workflow_api.json'
26+
gcs_bucket_name: 'comfy-ci-results'
27+
google_credentials: ${{ secrets.GCS_SERVICE_ACCOUNT_JSON }}
28+
output_prefix: 'ComfyUI'
29+
timeout: 50

.github/workflows/test-workflows.yaml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Test ComfyUI Example Workflows
2+
on:
3+
push:
4+
branches:
5+
- mirror
6+
workflow_dispatch:
7+
8+
9+
jobs:
10+
test-default-workflow:
11+
if: >-
12+
(github.event_name == 'workflow_dispatch') ||
13+
(github.event.review.state == 'approved')
14+
strategy:
15+
matrix:
16+
os: [macos, linux]
17+
include:
18+
- os: macos
19+
runner_label: [self-hosted, m2]
20+
- os: linux
21+
cuda_version: 12.1
22+
runner_label: [self-hosted, Linux, nvidia-tesla-t4]
23+
runs-on: ${{ matrix.runner_label }}
24+
steps:
25+
- name: Test Default Workflow
26+
uses: drip-art/comfy-action@main
27+
with:
28+
os: ${{ matrix.os }}
29+
cuda_version: ${{ matrix.cuda_version }}
30+
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"}}'
31+
workflow_name: "default-workflow"
32+
workflow_json_path: '.github/workflows/json_examples/workflow_api.json'
33+
gcs_bucket_name: 'comfy-ci-results'
34+
google_credentials: ${{ secrets.GCS_SERVICE_ACCOUNT_JSON }}
35+
output_prefix: 'ComfyUI'
36+
timeout: 50
37+
38+
- name: Test Lora Workflow
39+
uses: drip-art/comfy-action@main
40+
with:
41+
os: ${{ matrix.os }}
42+
cuda_version: ${{ matrix.cuda_version }}
43+
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"}}'
44+
workflow_name: "lora-workflow"
45+
workflow_json_path: '.github/workflows/json_examples/workflow_lora_api.json'
46+
gcs_bucket_name: 'comfy-ci-results'
47+
google_credentials: ${{ secrets.GCS_SERVICE_ACCOUNT_JSON }}
48+
output_prefix: 'ComfyUI'
49+
timeout: 50

0 commit comments

Comments
 (0)