Skip to content

Commit

Permalink
support image inputs for workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Aug 22, 2024
1 parent abe62d1 commit d1a4cd8
Show file tree
Hide file tree
Showing 2 changed files with 149 additions and 0 deletions.
2 changes: 2 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ runs:
which pip
pip install -r requirements.txt
python default-models-prep.py --cache-directory ~/.cache/comfy-actions-runner/modelcache --live-directory "$GITHUB_WORKSPACE/models"
cp -r "${{ github.action_path }}/workflow-images" "$GITHUB_WORKSPACE/input"
- name: '[Unix] Run ComfyUI quick test'
if: ${{ inputs.os != 'windows' && inputs.skip_quick_ci != 'true' }}
Expand Down Expand Up @@ -381,6 +382,7 @@ runs:
cd $Env:GITHUB_ACTION_PATH
pip install -r requirements.txt
python default-models-prep.py --cache-directory C:\actions-runner\modelcache --live-directory "$Env:GITHUB_WORKSPACE/models"
Copy-Item -Path "$Env:GITHUB_ACTION_PATH\workflow-images" -Destination "$Env:GITHUB_WORKSPACE\input" -Recurse
shell: powershell

- name: '[Win] Run ComfyUI quick test'
Expand Down
147 changes: 147 additions & 0 deletions workflows/xl_sketch_control.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
{
"3": {
"inputs": {
"seed": 1,
"steps": 20,
"cfg": 7,
"sampler_name": "euler",
"scheduler": "normal",
"denoise": 1,
"model": [
"14",
0
],
"positive": [
"10",
0
],
"negative": [
"7",
0
],
"latent_image": [
"5",
0
]
},
"class_type": "KSampler",
"_meta": {
"title": "KSampler"
}
},
"5": {
"inputs": {
"width": 1024,
"height": 1024,
"batch_size": 1
},
"class_type": "EmptyLatentImage",
"_meta": {
"title": "Empty Latent Image"
}
},
"6": {
"inputs": {
"text": "a beautiful anime drawing of a smiling blonde girl with blue eyes, anthropomorphic fennec fox girl, smiling, centerscreen, blue eyes, big fluffy fennec ears, in a field",
"clip": [
"14",
1
]
},
"class_type": "CLIPTextEncode",
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"7": {
"inputs": {
"text": "",
"clip": [
"14",
1
]
},
"class_type": "CLIPTextEncode",
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"8": {
"inputs": {
"samples": [
"3",
0
],
"vae": [
"14",
2
]
},
"class_type": "VAEDecode",
"_meta": {
"title": "VAE Decode"
}
},
"9": {
"inputs": {
"filename_prefix": "ComfyUI",
"images": [
"8",
0
]
},
"class_type": "SaveImage",
"_meta": {
"title": "Save Image"
}
},
"10": {
"inputs": {
"strength": 0.6,
"conditioning": [
"6",
0
],
"control_net": [
"12",
0
],
"image": [
"11",
0
]
},
"class_type": "ControlNetApply",
"_meta": {
"title": "Apply ControlNet"
}
},
"11": {
"inputs": {
"image": "input_scribble_example.png",
"upload": "image"
},
"class_type": "LoadImage",
"_meta": {
"title": "Load Image"
}
},
"12": {
"inputs": {
"control_net_name": "control-lora-sketch-rank128-metadata.safetensors"
},
"class_type": "ControlNetLoader",
"_meta": {
"title": "Load ControlNet Model"
}
},
"14": {
"inputs": {
"ckpt_name": "sd_xl_base_1.0.safetensors"
},
"class_type": "CheckpointLoaderSimple",
"_meta": {
"title": "Load Checkpoint"
}
}
}

0 comments on commit d1a4cd8

Please sign in to comment.