diff --git a/.github/workflows/json_examples/workflow_lora_api.json b/.github/workflows/json_examples/workflow_lora_api.json new file mode 100644 index 000000000..71ee48eb9 --- /dev/null +++ b/.github/workflows/json_examples/workflow_lora_api.json @@ -0,0 +1,126 @@ +{ + "3": { + "inputs": { + "seed": 851616030078638, + "steps": 20, + "cfg": 8, + "sampler_name": "euler", + "scheduler": "normal", + "denoise": 1, + "model": [ + "10", + 0 + ], + "positive": [ + "6", + 0 + ], + "negative": [ + "7", + 0 + ], + "latent_image": [ + "5", + 0 + ] + }, + "class_type": "KSampler", + "_meta": { + "title": "KSampler" + } + }, + "4": { + "inputs": { + "ckpt_name": "v1-5-pruned-emaonly.ckpt" + }, + "class_type": "CheckpointLoaderSimple", + "_meta": { + "title": "Load Checkpoint" + } + }, + "5": { + "inputs": { + "width": 512, + "height": 512, + "batch_size": 1 + }, + "class_type": "EmptyLatentImage", + "_meta": { + "title": "Empty Latent Image" + } + }, + "6": { + "inputs": { + "text": "masterpiece best quality girl", + "clip": [ + "10", + 1 + ] + }, + "class_type": "CLIPTextEncode", + "_meta": { + "title": "CLIP Text Encode (Prompt)" + } + }, + "7": { + "inputs": { + "text": "bad hands", + "clip": [ + "10", + 1 + ] + }, + "class_type": "CLIPTextEncode", + "_meta": { + "title": "CLIP Text Encode (Prompt)" + } + }, + "8": { + "inputs": { + "samples": [ + "3", + 0 + ], + "vae": [ + "4", + 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": { + "lora_name": "epiNoiseoffset_v2.safetensors", + "strength_model": 1, + "strength_clip": 1, + "model": [ + "4", + 0 + ], + "clip": [ + "4", + 1 + ] + }, + "class_type": "LoraLoader", + "_meta": { + "title": "Load LoRA" + } + } +} \ No newline at end of file diff --git a/.github/workflows/linux-os-test.yml b/.github/workflows/linux-os-test.yml deleted file mode 100644 index e61bc5e45..000000000 --- a/.github/workflows/linux-os-test.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Test ComfyUI Linux with Default Workflow -on: - pull_request: - branches: - - master - paths-ignore: - - "tests/**" - - "tests-ui/**" - - ".github/workflows/**" - - "!.github/workflows/linux-os-test.yml" - push: - branches: - - master - paths-ignore: - - "tests/**" - - "tests-ui/**" - - ".github/workflows/**" - - "!.github/workflows/linux-os-test.yml" - workflow_dispatch: - - -jobs: - test-action: - runs-on: nvidia-tesla-t4 - steps: - - name: Use ComfyUI GitHub Action - uses: drip-art/comfy-action@main - with: - os: linux - cuda_version: 12.1 - torch_ver: 'stable' - 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"}}' - workflow_json_path: '.github/workflows/json_examples/workflow_api.json' - timeout: 50 diff --git a/.github/workflows/mac-os-test.yml b/.github/workflows/mac-os-test.yml deleted file mode 100644 index 524bc61fc..000000000 --- a/.github/workflows/mac-os-test.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Test ComfyUI Mac With Default Workflow - -on: - pull_request: - branches: - - master - paths-ignore: - - 'tests/**' - - 'tests-ui/**' - - ".github/workflows/**" - - "!.github/workflows/mac-os-test.yml" - push: - branches: - - master - paths-ignore: - - 'tests/**' - - 'tests-ui/**' - - ".github/workflows/**" - - "!.github/workflows/mac-os-test.yml" - workflow_dispatch: - - -jobs: - test-action: - runs-on: m2 - steps: - - name: Use ComfyUI GitHub Action - uses: drip-art/comfy-action@main - with: - os: macos - torch_ver: 'nightly' - 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"}}' - workflow_json_path: '.github/workflows/json_examples/workflow_api.json' - timeout: 50 diff --git a/.github/workflows/test-example-workflows.yml b/.github/workflows/test-example-workflows.yml new file mode 100644 index 000000000..a2006c6b3 --- /dev/null +++ b/.github/workflows/test-example-workflows.yml @@ -0,0 +1,49 @@ +name: Test ComfyUI Example Workflows +on: + pull_request: + branches: + - master + paths-ignore: + - 'tests/**' + - 'tests-ui/**' + push: + paths-ignore: + - 'tests/**' + - 'tests-ui/**' + workflow_dispatch: + +jobs: + test-default-workflow: + strategy: + matrix: + os: [macos, linux] + include: + - os: macos + torch_ver: 'nightly' + runner_label: [self-hosted, m2] + - os: linux + cuda_version: 12.1 + torch_ver: 'stable' + runner_label: [self-hosted, Linux, nvidia-tesla-t4] + runs-on: ${{ matrix.runner_label }} + steps: + - name: Test Default Workflow + uses: drip-art/comfy-action@main + with: + os: ${{ matrix.os }} + cuda_version: ${{ matrix.cuda_version }} + torch_ver: ${{ matrix.torch_ver }} + 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"}}' + workflow_name: "default-workflow" + workflow_json_path: '.github/workflows/json_examples/workflow_api.json' + timeout: 50 + - name: Test Lora Workflow + uses: drip-art/comfy-action@main + with: + os: ${{ matrix.os }} + cuda_version: ${{ matrix.cuda_version }} + torch_ver: ${{ matrix.torch_ver }} + 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"}}' + workflow_name: "lora-workflow" + workflow_json_path: '.github/workflows/json_examples/workflow_lora_api.json' + timeout: 50 diff --git a/.github/workflows/win-os-test.yml b/.github/workflows/win-os-test.yml index 775069b86..b2c612d49 100644 --- a/.github/workflows/win-os-test.yml +++ b/.github/workflows/win-os-test.yml @@ -29,6 +29,7 @@ jobs: os: windows cuda_version: 12.1 torch_ver: 'stable' + workflow_name: "default-workflow" 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"}}' workflow_json_path: '.github/workflows/json_examples/workflow_api.json' timeout: 50