From fc4d07f198a88840cb4df8eef74662d122740114 Mon Sep 17 00:00:00 2001 From: mauwii Date: Sat, 29 Oct 2022 08:59:23 +0200 Subject: [PATCH] reenable preload models, move huggingface-cache... ... on top of conda env activation, since `~/.cache` also contains pip --- .github/workflows/test-invoke-conda.yml | 28 ++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test-invoke-conda.yml b/.github/workflows/test-invoke-conda.yml index c1505d30a5..43b294b4ab 100644 --- a/.github/workflows/test-invoke-conda.yml +++ b/.github/workflows/test-invoke-conda.yml @@ -45,12 +45,23 @@ jobs: - name: Checkout sources uses: actions/checkout@v3 - - name: Cache conda packages + - name: Use cached conda packages uses: actions/cache@v3 with: path: ~/conda_pkgs_dir key: conda-pkgs-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles(matrix.environment-file) }} + - name: Use Cached Huggingface and Torch models + id: cache-hugginface-torch + uses: actions/cache@v3 + env: + cache-name: cache-hugginface-and-torch-models + with: + path: ~/.cache + key: ${{ env.cache-name }} + restore-keys: | + ${{ env.cache-name }}-${{ hashFiles('scripts/preload_models.py') }} + - name: Activate Conda Env uses: conda-incubator/setup-miniconda@v2 with: @@ -90,19 +101,8 @@ jobs: -o ${{ matrix.stable-diffusion-model-dl-path }} \ -L ${{ matrix.stable-diffusion-model }} - # - name: Use Cached Huggingface and Torch models - # id: cache-hugginface-torch - # uses: actions/cache@v3 - # env: - # cache-name: cache-hugginface-torch - # with: - # path: ~/.cache - # key: ${{ env.cache-name }} - # restore-keys: | - # ${{ env.cache-name }}-${{ hashFiles('scripts/preload_models.py') }} - - # - name: run preload_models.py - # run: python scripts/preload_models.py + - name: run preload_models.py + run: python scripts/preload_models.py - name: Run the tests run: |