fix memory issue on windows runner

- use cpu version which is only 162.6 MB
- set `INVOKEAI_ROOT=C:\InvokeAI` on Windows runners
This commit is contained in:
mauwii 2023-01-17 06:14:54 +01:00
parent 5a788f8f73
commit 963b666844
No known key found for this signature in database
GPG Key ID: D923DB04ADB3F5AB

View File

@ -3,6 +3,7 @@ on:
push: push:
branches: branches:
- 'main' - 'main'
- 'debug/dev/pyproject-toml'
pull_request: pull_request:
types: types:
- 'ready_for_review' - 'ready_for_review'
@ -28,8 +29,8 @@ jobs:
- linux-rocm-5_2 - linux-rocm-5_2
# - linux-cpu # - linux-cpu
- macos-default - macos-default
# - windows-cpu - windows-cpu
- windows-cuda-11_7 # - windows-cuda-11_7
include: include:
- pytorch: linux-cuda-11_7 - pytorch: linux-cuda-11_7
os: ubuntu-22.04 os: ubuntu-22.04
@ -41,38 +42,34 @@ jobs:
# - 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
- 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
- pytorch: windows-cuda-11_7
os: windows-2022 os: windows-2022
extra-index-url: 'https://download.pytorch.org/whl/cu117'
github-env: $env:GITHUB_ENV github-env: $env:GITHUB_ENV
# - pytorch: windows-cuda-11_7
# os: windows-2022
# extra-index-url: 'https://download.pytorch.org/whl/cu117'
# 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: env:
INVOKEAI_ROOT: ${{ github.workspace }}
INVOKE_MODEL_RECONFIGURE: '--yes' INVOKE_MODEL_RECONFIGURE: '--yes'
INVOKEAI_ROOT: '${{ github.workspace }}/invokeai'
PYTHONUNBUFFERED: 1 PYTHONUNBUFFERED: 1
HAVE_SECRETS: ${{ secrets.HUGGINGFACE_TOKEN != '' }}
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: set INVOKEAI_ROOT Windows
if: matrix.os == 'windows-2022' if: runner.os == 'Windows'
run: | run: |
echo "INVOKEAI_ROOT=${{ github.workspace }}\invokeai" >> ${{ matrix.github-env }} Get-PSDrive
echo "INVOKEAI_OUTDIR=${{ github.workspace }}\invokeai\outputs" >> ${{ matrix.github-env }} mkdir C:\InvokeAI
echo "INVOKEAI_ROOT=C:\InvokeAI" >> ${{ matrix.github-env }}
- name: set INVOKEAI_ROOT others
if: matrix.os != 'windows-2022'
run: |
echo "INVOKEAI_ROOT=${{ github.workspace }}/invokeai" >> ${{ matrix.github-env }}
echo "INVOKEAI_OUTDIR=${{ github.workspace }}/invokeai/outputs" >> ${{ matrix.github-env }}
- name: Use Cached diffusers-1.5 - name: Use Cached diffusers-1.5
id: cache-sd-model id: cache-sd-model
@ -120,7 +117,7 @@ jobs:
- name: Run the tests - name: Run the tests
id: run-tests id: run-tests
if: matrix.os != 'windows-2022' if: runner.os != 'Windows'
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
@ -133,11 +130,10 @@ jobs:
--model ${{ matrix.stable-diffusion-model }} --model ${{ matrix.stable-diffusion-model }}
--from_file ${{ env.TEST_PROMPTS }} --from_file ${{ env.TEST_PROMPTS }}
--root="${{ env.INVOKEAI_ROOT }}" --root="${{ env.INVOKEAI_ROOT }}"
--outdir="${{ env.INVOKEAI_OUTDIR }}"
- name: Archive results - name: Archive results
id: archive-results id: archive-results
if: matrix.os != 'windows-2022' if: runner.os != 'Windows'
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: results_${{ matrix.pytorch }}_${{ matrix.python-version }} name: results_${{ matrix.pytorch }}_${{ matrix.python-version }}