Skip to content

Commit d02a64f

Browse files
committed
CI/CD for testing workflows.
1 parent f77f047 commit d02a64f

File tree

4 files changed

+308
-0
lines changed

4 files changed

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

.github/workflows/test-workflows.yaml

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

0 commit comments

Comments
 (0)