use sd-model link from matrix

this enables running tests with diffferent models
This commit is contained in:
mauwii 2022-10-28 19:47:24 +02:00 committed by Lincoln Stein
parent 2ecdfca52f
commit 104466f5c0

View File

@ -19,9 +19,11 @@ jobs:
- os: ubuntu-latest
environment-file: environment.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
- 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
name: Test invoke.py on ${{ matrix.os }} with conda
runs-on: ${{ matrix.os }}
defaults:
@ -57,7 +59,7 @@ jobs:
id: cache-sd-v1-4
uses: actions/cache@v3
env:
cache-name: cache-sd-v1-4
cache-name: cache-sd-${{ matrix.stable-diffusion-model }}
with:
path: models/ldm/stable-diffusion-v1/model.ckpt
key: ${{ env.cache-name }}
@ -71,7 +73,7 @@ jobs:
[[ -r models/ldm/stable-diffusion-v1/model.ckpt ]] \
|| curl --user "${{ secrets.HUGGINGFACE_TOKEN }}" \
-o models/ldm/stable-diffusion-v1/model.ckpt \
-O -L https://huggingface.co/CompVis/stable-diffusion-v-1-4-original/resolve/main/sd-v1-4.ckpt
-O -L ${{ matrix.stable-diffusion-model }}
- name: Activate Conda Env
uses: conda-incubator/setup-miniconda@v2