From 63202e2467c34cd567c9c0325476150a453bc884 Mon Sep 17 00:00:00 2001 From: mauwii Date: Sat, 29 Oct 2022 07:25:19 +0200 Subject: [PATCH] try to run matrix with different models --- .github/workflows/test-invoke-conda.yml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-invoke-conda.yml b/.github/workflows/test-invoke-conda.yml index b7cca63726..4b85432fca 100644 --- a/.github/workflows/test-invoke-conda.yml +++ b/.github/workflows/test-invoke-conda.yml @@ -11,12 +11,16 @@ on: - 'development' jobs: - os_matrix: + matrix: strategy: fail-fast: false matrix: - stable-diffusion-model: ['https://huggingface.co/CompVis/stable-diffusion-v-1-4-original/resolve/main/sd-v1-4.ckpt'] - os: [ubuntu-latest, macos-latest] + stable-diffusion-model: + - 'https://huggingface.co/CompVis/stable-diffusion-v-1-4-original/resolve/main/sd-v1-4.ckpt' + - 'https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt' + os: + - ubuntu-latest + - macos-latest include: - os: ubuntu-latest environment-file: environment.yml @@ -24,6 +28,12 @@ jobs: - os: macos-latest environment-file: environment-mac.yml default-shell: bash -l {0} + - stable-diffusion-model: https://huggingface.co/CompVis/stable-diffusion-v-1-4-original/resolve/main/sd-v1-4.ckpt + stable-diffusion-model-dl-path: models/ldm/stable-diffusion-v1/model.ckpt + stable-diffusion-model-switch: stable-diffusion-1.4 + - stable-diffusion-model: https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt + stable-diffusion-model-dl-path: models/ldm/stable-diffusion-v1/v1-5-pruned-emaonly.ckpt + stable-diffusion-model-switch: stable-diffusion-1.5 name: Test invoke.py on ${{ matrix.os }} with ${{ matrix.stable-diffusion-model }} runs-on: ${{ matrix.os }} env: @@ -78,7 +88,7 @@ jobs: [[ -r models/ldm/stable-diffusion-v1/model.ckpt ]] \ || curl \ -H "Authorization: Bearer ${{ secrets.HUGGINGFACE_TOKEN }}" \ - -o models/ldm/stable-diffusion-v1/model.ckpt \ + -o ${{ matrix.stable-diffusion-model-dl-path }} \ -L ${{ matrix.stable-diffusion-model }} - name: Use Cached Huggingface and Torch models @@ -97,8 +107,10 @@ jobs: - name: Run the tests run: | + echo "!switch ${{ matrix.stable-diffusion-model-switch }}" > testprompts.txt + cat ${{ env.TEST_PROMPTS }} >> testprompts.txt time python scripts/invoke.py \ - --from_file ${{ env.TEST_PROMPTS }} + --from_file testprompts.txt - name: export conda env run: |