Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 3 additions & 21 deletions .github/workflows/create-caches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,27 +54,9 @@ jobs:
[[ -d models/ldm/stable-diffusion-v1 ]] \
|| mkdir -p models/ldm/stable-diffusion-v1
[[ -r models/ldm/stable-diffusion-v1/model.ckpt ]] \
|| curl -o models/ldm/stable-diffusion-v1/model.ckpt ${{ secrets.SD_V1_4_URL }}

- name: Use cached Conda Environment
uses: actions/cache@v3
env:
cache-name: cache-conda-env-${{ env.CONDA_ENV_NAME }}
conda-env-file: ${{ matrix.environment-file }}
with:
path: ${{ env.CONDA_ROOT }}/envs/${{ env.CONDA_ENV_NAME }}
key: ${{ env.cache-name }}
restore-keys: ${{ env.cache-name }}-${{ runner.os }}-${{ hashFiles(env.conda-env-file) }}

- name: Use cached Conda Packages
uses: actions/cache@v3
env:
cache-name: cache-conda-env-${{ env.CONDA_ENV_NAME }}
conda-env-file: ${{ matrix.environment-file }}
with:
path: ${{ env.CONDA_PKGS_DIR }}
key: ${{ env.cache-name }}
restore-keys: ${{ env.cache-name }}-${{ runner.os }}-${{ hashFiles(env.conda-env-file) }}
|| 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

- name: Activate Conda Env
uses: conda-incubator/setup-miniconda@v2
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/test-invoke-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
branches:
- 'main'
- 'development'
pull_request:
pull_request_target:
branches:
- 'main'
- 'development'
Expand All @@ -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:
Expand All @@ -48,7 +50,7 @@ jobs:

- name: set test prompt to Pull Request validation
if: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/development' }}
run: echo "TEST_PROMPTS=tests/pr_prompt.txt" >> $GITHUB_ENV
run: echo "TEST_PROMPTS=tests/validate_pr_prompt.txt" >> $GITHUB_ENV

- name: set conda environment name
run: echo "CONDA_ENV_NAME=invokeai" >> $GITHUB_ENV
Expand All @@ -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 }}
Expand All @@ -69,7 +71,9 @@ jobs:
[[ -d models/ldm/stable-diffusion-v1 ]] \
|| mkdir -p models/ldm/stable-diffusion-v1
[[ -r models/ldm/stable-diffusion-v1/model.ckpt ]] \
|| curl -o models/ldm/stable-diffusion-v1/model.ckpt ${{ secrets.SD_V1_4_URL }}
|| curl --user "${{ secrets.HUGGINGFACE_TOKEN }}" \
-o models/ldm/stable-diffusion-v1/model.ckpt \
-O -L ${{ matrix.stable-diffusion-model }}

- name: Activate Conda Env
uses: conda-incubator/setup-miniconda@v2
Expand Down
1 change: 1 addition & 0 deletions tests/validate_pr_prompt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
banana sushi -Ak_lms -S42 -s10