From d1a4cd8f7b04597b6d975e22fc8e910df2412850 Mon Sep 17 00:00:00 2001 From: "Alex \"mcmonkey\" Goodwin" Date: Wed, 21 Aug 2024 21:00:21 -0700 Subject: [PATCH] support image inputs for workflows --- action.yml | 2 + workflows/xl_sketch_control.json | 147 +++++++++++++++++++++++++++++++ 2 files changed, 149 insertions(+) create mode 100644 workflows/xl_sketch_control.json diff --git a/action.yml b/action.yml index f53c8d2..d4d6e14 100644 --- a/action.yml +++ b/action.yml @@ -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' }} @@ -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' diff --git a/workflows/xl_sketch_control.json b/workflows/xl_sketch_control.json new file mode 100644 index 0000000..18a0ba6 --- /dev/null +++ b/workflows/xl_sketch_control.json @@ -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" + } + } +} \ No newline at end of file