From 1611f0d1815022fe90d33f41c21d670251a75f29 Mon Sep 17 00:00:00 2001 From: mauwii Date: Wed, 2 Nov 2022 02:18:46 +0100 Subject: [PATCH] readd caching of sd-models - this would remove the necesarrity of the secret availability in PRs --- .github/workflows/test-invoke-conda.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/test-invoke-conda.yml b/.github/workflows/test-invoke-conda.yml index 4f39d86538..1d9d490eef 100644 --- a/.github/workflows/test-invoke-conda.yml +++ b/.github/workflows/test-invoke-conda.yml @@ -75,8 +75,18 @@ jobs: if: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/development' }} run: echo "TEST_PROMPTS=tests/validate_pr_prompt.txt" >> $GITHUB_ENV + - name: Use Cached Stable Diffusion v1.4 Model + id: cache-sd-model + uses: actions/cache@v3 + env: + cache-name: cache-${{ matrix.stable-diffusion-model-switch }} + with: + path: ${{ matrix.stable-diffusion-model-dl-path }} + key: ${{ env.cache-name }} + - name: Download ${{ matrix.stable-diffusion-model-switch }} id: download-stable-diffusion-model + if: ${{ steps.cache-sd-model.outputs.cache-hit != 'true' }} run: | [[ -d models/ldm/stable-diffusion-v1 ]] \ || mkdir -p models/ldm/stable-diffusion-v1