mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
rename matrix-job, use macOS-12, add ids to steps
This commit is contained in:
parent
fc4d07f198
commit
bb5fe98e94
22
.github/workflows/test-invoke-conda.yml
vendored
22
.github/workflows/test-invoke-conda.yml
vendored
@ -20,7 +20,7 @@ jobs:
|
|||||||
- 'https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt'
|
- 'https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt'
|
||||||
os:
|
os:
|
||||||
- ubuntu-latest
|
- ubuntu-latest
|
||||||
- macos-latest
|
- macOS-12
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
environment-file: environment.yml
|
environment-file: environment.yml
|
||||||
@ -34,7 +34,7 @@ jobs:
|
|||||||
- stable-diffusion-model: https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt
|
- 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-dl-path: models/ldm/stable-diffusion-v1/v1-5-pruned-emaonly.ckpt
|
||||||
stable-diffusion-model-switch: stable-diffusion-1.5
|
stable-diffusion-model-switch: stable-diffusion-1.5
|
||||||
name: Test invoke.py on ${{ matrix.os }} with ${{ matrix.stable-diffusion-model }}
|
name: Test invoke.py on ${{ matrix.os }} with ${{ matrix.stable-diffusion-model-switch }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
env:
|
env:
|
||||||
CONDA_ENV_NAME: invokeai
|
CONDA_ENV_NAME: invokeai
|
||||||
@ -43,26 +43,28 @@ jobs:
|
|||||||
shell: ${{ matrix.default-shell }}
|
shell: ${{ matrix.default-shell }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
|
id: checkout-sources
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Use cached conda packages
|
- name: Use cached conda packages
|
||||||
|
id: use-cached-conda-packages
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ~/conda_pkgs_dir
|
path: ~/conda_pkgs_dir
|
||||||
key: conda-pkgs-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles(matrix.environment-file) }}
|
key: conda-pkgs-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles(matrix.environment-file) }}
|
||||||
|
|
||||||
- name: Use Cached Huggingface and Torch models
|
- name: Use Cached Huggingface and Torch models
|
||||||
id: cache-hugginface-torch
|
id: cache-hugginface-and-torch-models
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
env:
|
env:
|
||||||
cache-name: cache-hugginface-and-torch-models
|
cache-name: cache-hugginface-and-torch-models
|
||||||
with:
|
with:
|
||||||
path: ~/.cache
|
path: ~/.cache
|
||||||
key: ${{ env.cache-name }}
|
key: ${{ env.cache-name }}
|
||||||
restore-keys: |
|
restore-keys: ${{ env.cache-name }}-${{ hashFiles('scripts/preload_models.py') }}
|
||||||
${{ env.cache-name }}-${{ hashFiles('scripts/preload_models.py') }}
|
|
||||||
|
|
||||||
- name: Activate Conda Env
|
- name: Activate Conda Env
|
||||||
|
id: activate-conda-env
|
||||||
uses: conda-incubator/setup-miniconda@v2
|
uses: conda-incubator/setup-miniconda@v2
|
||||||
with:
|
with:
|
||||||
activate-environment: ${{ env.CONDA_ENV_NAME }}
|
activate-environment: ${{ env.CONDA_ENV_NAME }}
|
||||||
@ -70,14 +72,17 @@ jobs:
|
|||||||
miniconda-version: latest
|
miniconda-version: latest
|
||||||
|
|
||||||
- name: set test prompt to main branch validation
|
- name: set test prompt to main branch validation
|
||||||
|
id: set-test-prompt
|
||||||
if: ${{ github.ref == 'refs/heads/main' }}
|
if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
run: echo "TEST_PROMPTS=tests/preflight_prompts.txt" >> $GITHUB_ENV
|
run: echo "TEST_PROMPTS=tests/preflight_prompts.txt" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: set test prompt to development branch validation
|
- name: set test prompt to development branch validation
|
||||||
|
id: set-test-prompt
|
||||||
if: ${{ github.ref == 'refs/heads/development' }}
|
if: ${{ github.ref == 'refs/heads/development' }}
|
||||||
run: echo "TEST_PROMPTS=tests/dev_prompts.txt" >> $GITHUB_ENV
|
run: echo "TEST_PROMPTS=tests/dev_prompts.txt" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: set test prompt to Pull Request validation
|
- name: set test prompt to Pull Request validation
|
||||||
|
id: set-test-prompt
|
||||||
if: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/development' }}
|
if: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/development' }}
|
||||||
run: echo "TEST_PROMPTS=tests/validate_pr_prompt.txt" >> $GITHUB_ENV
|
run: echo "TEST_PROMPTS=tests/validate_pr_prompt.txt" >> $GITHUB_ENV
|
||||||
|
|
||||||
@ -92,6 +97,7 @@ jobs:
|
|||||||
restore-keys: ${{ env.cache-name }}
|
restore-keys: ${{ env.cache-name }}
|
||||||
|
|
||||||
- name: Download ${{ matrix.stable-diffusion-model-switch }}
|
- name: Download ${{ matrix.stable-diffusion-model-switch }}
|
||||||
|
id: download-stable-diffusion-model
|
||||||
if: ${{ steps.cache-stable-diffusion-model.outputs.cache-hit != 'true' }}
|
if: ${{ steps.cache-stable-diffusion-model.outputs.cache-hit != 'true' }}
|
||||||
run: |
|
run: |
|
||||||
[[ -d models/ldm/stable-diffusion-v1 ]] \
|
[[ -d models/ldm/stable-diffusion-v1 ]] \
|
||||||
@ -102,9 +108,11 @@ jobs:
|
|||||||
-L ${{ matrix.stable-diffusion-model }}
|
-L ${{ matrix.stable-diffusion-model }}
|
||||||
|
|
||||||
- name: run preload_models.py
|
- name: run preload_models.py
|
||||||
|
id: run-preload-models
|
||||||
run: python scripts/preload_models.py
|
run: python scripts/preload_models.py
|
||||||
|
|
||||||
- name: Run the tests
|
- name: Run the tests
|
||||||
|
id: run-tests
|
||||||
run: |
|
run: |
|
||||||
echo "!switch ${{ matrix.stable-diffusion-model-switch }}" > testprompts.txt
|
echo "!switch ${{ matrix.stable-diffusion-model-switch }}" > testprompts.txt
|
||||||
cat ${{ env.TEST_PROMPTS }} >> testprompts.txt
|
cat ${{ env.TEST_PROMPTS }} >> testprompts.txt
|
||||||
@ -112,11 +120,13 @@ jobs:
|
|||||||
--from_file testprompts.txt
|
--from_file testprompts.txt
|
||||||
|
|
||||||
- name: export conda env
|
- name: export conda env
|
||||||
|
id: export-conda-env
|
||||||
run: |
|
run: |
|
||||||
mkdir -p outputs/img-samples
|
mkdir -p outputs/img-samples
|
||||||
conda env export --name ${{ env.CONDA_ENV_NAME }} > outputs/img-samples/environment-${{ runner.os }}.yml
|
conda env export --name ${{ env.CONDA_ENV_NAME }} > outputs/img-samples/environment-${{ runner.os }}-${{ runner.arch }}.yml
|
||||||
|
|
||||||
- name: Archive results
|
- name: Archive results
|
||||||
|
id: archive-results
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: results_${{ matrix.os }}_${{ matrix.stable-diffusion-model-switch }}
|
name: results_${{ matrix.os }}_${{ matrix.stable-diffusion-model-switch }}
|
||||||
|
Loading…
Reference in New Issue
Block a user