From 763b507c3052b1214856d5a30cb6bae7de180a2b Mon Sep 17 00:00:00 2001 From: Jingya HUANG <44135271+JingyaHuang@users.noreply.github.com> Date: Mon, 2 Sep 2024 14:42:28 +0200 Subject: [PATCH] Add workflow for caching stable diffusion models (#685) * workflow for sd models * rename and schedule weekly * rename the workflows --- ...ence_cache.yml => inference_cache_llm.yml} | 2 +- .../inference_cache_stable_diffusion.yml | 52 +++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) rename .github/workflows/{inference_cache.yml => inference_cache_llm.yml} (97%) create mode 100644 .github/workflows/inference_cache_stable_diffusion.yml diff --git a/.github/workflows/inference_cache.yml b/.github/workflows/inference_cache_llm.yml similarity index 97% rename from .github/workflows/inference_cache.yml rename to .github/workflows/inference_cache_llm.yml index 51d65909f..9ead54d9a 100644 --- a/.github/workflows/inference_cache.yml +++ b/.github/workflows/inference_cache_llm.yml @@ -1,4 +1,4 @@ -name: Optimum neuron inference cache builder +name: Optimum neuron LLM inference cache builder on: workflow_dispatch: diff --git a/.github/workflows/inference_cache_stable_diffusion.yml b/.github/workflows/inference_cache_stable_diffusion.yml new file mode 100644 index 000000000..6dd811d47 --- /dev/null +++ b/.github/workflows/inference_cache_stable_diffusion.yml @@ -0,0 +1,52 @@ +name: Optimum neuron SD inference cache builder + +on: + workflow_dispatch: + schedule: + # Schedule the workflow to run every Saturday at midnight UTC + - cron: '0 0 * * 6' + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + +jobs: + cache: + name: Create optimum-neuron inference cache + runs-on: + group: aws-inf2-8xlarge + env: + AWS_REGION: us-east-1 + strategy: + fail-fast: false + matrix: + config: [stable-diffusion] + steps: + - name: Install Neuron runtime + run: | + . /etc/os-release + sudo tee /etc/apt/sources.list.d/neuron.list > /dev/null <