mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
update test-invoke-pip.yml
- remove stable-diffusion-model from matrix - add windows-cuda-11_6 and linux-cuda-11_6 - enable linux-cpu - disable windows-cpu - change step order - remove job env - set runner.os specific env - install editable - cache models folder - remove `--model` and `--root` arguments from invoke command
This commit is contained in:
parent
ef4b03289a
commit
6a3a0af676
93
.github/workflows/test-invoke-pip.yml
vendored
93
.github/workflows/test-invoke-pip.yml
vendored
@ -18,19 +18,23 @@ jobs:
|
|||||||
if: github.event.pull_request.draft == false
|
if: github.event.pull_request.draft == false
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
stable-diffusion-model:
|
|
||||||
- stable-diffusion-1.5
|
|
||||||
python-version:
|
python-version:
|
||||||
# - '3.9'
|
# - '3.9'
|
||||||
- '3.10'
|
- '3.10'
|
||||||
pytorch:
|
pytorch:
|
||||||
|
- linux-cuda-11_6
|
||||||
- linux-cuda-11_7
|
- linux-cuda-11_7
|
||||||
- linux-rocm-5_2
|
- linux-rocm-5_2
|
||||||
# - linux-cpu
|
- linux-cpu
|
||||||
- macos-default
|
- macos-default
|
||||||
- windows-cpu
|
# - windows-cpu
|
||||||
|
- windows-cuda-11_6
|
||||||
# - windows-cuda-11_7
|
# - windows-cuda-11_7
|
||||||
include:
|
include:
|
||||||
|
- pytorch: linux-cuda-11_6
|
||||||
|
os: ubuntu-22.04
|
||||||
|
extra-index-url: 'https://download.pytorch.org/whl/cu116'
|
||||||
|
github-env: $GITHUB_ENV
|
||||||
- pytorch: linux-cuda-11_7
|
- pytorch: linux-cuda-11_7
|
||||||
os: ubuntu-22.04
|
os: ubuntu-22.04
|
||||||
github-env: $GITHUB_ENV
|
github-env: $GITHUB_ENV
|
||||||
@ -38,15 +42,19 @@ jobs:
|
|||||||
os: ubuntu-22.04
|
os: ubuntu-22.04
|
||||||
extra-index-url: 'https://download.pytorch.org/whl/rocm5.2'
|
extra-index-url: 'https://download.pytorch.org/whl/rocm5.2'
|
||||||
github-env: $GITHUB_ENV
|
github-env: $GITHUB_ENV
|
||||||
# - pytorch: linux-cpu
|
- pytorch: linux-cpu
|
||||||
# os: ubuntu-22.04
|
os: ubuntu-22.04
|
||||||
# extra-index-url: 'https://download.pytorch.org/whl/cpu'
|
extra-index-url: 'https://download.pytorch.org/whl/cpu'
|
||||||
# github-env: $GITHUB_ENV
|
github-env: $GITHUB_ENV
|
||||||
- pytorch: macos-default
|
- pytorch: macos-default
|
||||||
os: macOS-12
|
os: macOS-12
|
||||||
github-env: $GITHUB_ENV
|
github-env: $GITHUB_ENV
|
||||||
- pytorch: windows-cpu
|
# - pytorch: windows-cpu
|
||||||
|
# os: windows-2022
|
||||||
|
# github-env: $env:GITHUB_ENV
|
||||||
|
- pytorch: windows-cuda-11_6
|
||||||
os: windows-2022
|
os: windows-2022
|
||||||
|
extra-index-url: 'https://download.pytorch.org/whl/cu116'
|
||||||
github-env: $env:GITHUB_ENV
|
github-env: $env:GITHUB_ENV
|
||||||
# - pytorch: windows-cuda-11_7
|
# - pytorch: windows-cuda-11_7
|
||||||
# os: windows-2022
|
# os: windows-2022
|
||||||
@ -54,32 +62,27 @@ jobs:
|
|||||||
# github-env: $env:GITHUB_ENV
|
# github-env: $env:GITHUB_ENV
|
||||||
name: ${{ matrix.pytorch }} on ${{ matrix.python-version }}
|
name: ${{ matrix.pytorch }} on ${{ matrix.python-version }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
env:
|
|
||||||
INVOKEAI_ROOT: ${{ github.workspace }}
|
|
||||||
INVOKE_MODEL_RECONFIGURE: '--yes'
|
|
||||||
PYTHONUNBUFFERED: 1
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
id: checkout-sources
|
id: checkout-sources
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: set INVOKEAI_ROOT Windows
|
- name: setup python
|
||||||
if: runner.os == 'Windows'
|
uses: actions/setup-python@v4
|
||||||
run: |
|
|
||||||
mkdir C:\InvokeAI
|
|
||||||
echo "INVOKEAI_ROOT=C:\InvokeAI" >> ${{ matrix.github-env }}
|
|
||||||
|
|
||||||
- name: Use Cached diffusers-1.5
|
|
||||||
id: cache-sd-model
|
|
||||||
uses: actions/cache@v3
|
|
||||||
env:
|
|
||||||
cache-name: huggingface-${{ matrix.stable-diffusion-model }}
|
|
||||||
with:
|
with:
|
||||||
path: |
|
python-version: ${{ matrix.python-version }}
|
||||||
${{ env.INVOKEAI_ROOT }}/models/runwayml
|
|
||||||
${{ env.INVOKEAI_ROOT }}/models/stabilityai
|
- name: Set Cache-Directory Windows
|
||||||
${{ env.INVOKEAI_ROOT }}/models/CompVis
|
if: runner.os == 'Windows'
|
||||||
key: ${{ env.cache-name }}
|
id: set-cache-dir-windows
|
||||||
|
run: |
|
||||||
|
echo "CACHE_DIR=$HOME\invokeai\models" >> ${{ matrix.github-env }}
|
||||||
|
echo "PIP_NO_CACHE_DIR=1" >> ${{ matrix.github-env }}
|
||||||
|
|
||||||
|
- name: Set Cache-Directory others
|
||||||
|
if: runner.os != 'Windows'
|
||||||
|
id: set-cache-dir-others
|
||||||
|
run: echo "CACHE_DIR=$HOME/invokeai/models" >> ${{ matrix.github-env }}
|
||||||
|
|
||||||
- name: set test prompt to main branch validation
|
- name: set test prompt to main branch validation
|
||||||
if: ${{ github.ref == 'refs/heads/main' }}
|
if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
@ -89,16 +92,21 @@ jobs:
|
|||||||
if: ${{ github.ref != 'refs/heads/main' }}
|
if: ${{ github.ref != 'refs/heads/main' }}
|
||||||
run: echo "TEST_PROMPTS=tests/validate_pr_prompt.txt" >> ${{ matrix.github-env }}
|
run: echo "TEST_PROMPTS=tests/validate_pr_prompt.txt" >> ${{ matrix.github-env }}
|
||||||
|
|
||||||
- name: setup python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
|
|
||||||
- name: install invokeai
|
- name: install invokeai
|
||||||
run: pip3 install --use-pep517 .
|
run: pip3 install --use-pep517 -e .
|
||||||
env:
|
env:
|
||||||
PIP_EXTRA_INDEX_URL: ${{ matrix.extra-index-url }}
|
PIP_EXTRA_INDEX_URL: ${{ matrix.extra-index-url }}
|
||||||
|
|
||||||
|
- name: Use Cached models
|
||||||
|
id: cache-sd-model
|
||||||
|
uses: actions/cache@v3
|
||||||
|
env:
|
||||||
|
cache-name: huggingface-models
|
||||||
|
with:
|
||||||
|
path: ${{ env.CACHE_DIR }}
|
||||||
|
key: ${{ env.cache-name }}
|
||||||
|
enableCrossOsArchive: true
|
||||||
|
|
||||||
- name: run configure_invokeai
|
- name: run configure_invokeai
|
||||||
id: run-preload-models
|
id: run-preload-models
|
||||||
env:
|
env:
|
||||||
@ -107,22 +115,21 @@ jobs:
|
|||||||
configure_invokeai
|
configure_invokeai
|
||||||
--yes
|
--yes
|
||||||
--default_only
|
--default_only
|
||||||
--full-precision # can't use fp16 weights without a GPU
|
--full-precision
|
||||||
|
# can't use fp16 weights without a GPU
|
||||||
|
|
||||||
- name: Run the tests
|
- name: Run the tests
|
||||||
id: run-tests
|
id: run-tests
|
||||||
env:
|
# env:
|
||||||
# Set offline mode to make sure configure preloaded successfully.
|
# # Set offline mode to make sure configure preloaded successfully.
|
||||||
HF_HUB_OFFLINE: 1
|
# HF_HUB_OFFLINE: 1
|
||||||
HF_DATASETS_OFFLINE: 1
|
# HF_DATASETS_OFFLINE: 1
|
||||||
TRANSFORMERS_OFFLINE: 1
|
# TRANSFORMERS_OFFLINE: 1
|
||||||
run: >
|
run: >
|
||||||
invoke
|
invoke
|
||||||
--no-patchmatch
|
--no-patchmatch
|
||||||
--no-nsfw_checker
|
--no-nsfw_checker
|
||||||
--model ${{ matrix.stable-diffusion-model }}
|
|
||||||
--from_file ${{ env.TEST_PROMPTS }}
|
--from_file ${{ env.TEST_PROMPTS }}
|
||||||
--root="${{ env.INVOKEAI_ROOT }}"
|
|
||||||
|
|
||||||
- name: Archive results
|
- name: Archive results
|
||||||
id: archive-results
|
id: archive-results
|
||||||
|
Loading…
x
Reference in New Issue
Block a user