diff --git a/.github/workflows/docker-create-ai-runner.yaml b/.github/workflows/ai-runner-docker.yaml similarity index 88% rename from .github/workflows/docker-create-ai-runner.yaml rename to .github/workflows/ai-runner-docker.yaml index 8a1c6b2a..f5a0a292 100644 --- a/.github/workflows/docker-create-ai-runner.yaml +++ b/.github/workflows/ai-runner-docker.yaml @@ -1,7 +1,7 @@ name: Build ai-runner base Docker image on: - check_run: + pull_request: paths: - "runner/**" - "!runner/.devcontainer/**" @@ -13,7 +13,6 @@ on: paths: - "runner/**" - "!runner/.devcontainer/**" - workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} @@ -22,7 +21,7 @@ concurrency: jobs: docker: name: Docker image generation - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'workflow_dispatch' + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository permissions: packages: write contents: read @@ -50,7 +49,7 @@ jobs: uses: docker/metadata-action@v5 with: images: | - jjassonn69/ai-runner + livepeer/ai-runner tags: | type=sha type=ref,event=pr @@ -75,5 +74,5 @@ jobs: tags: ${{ steps.meta.outputs.tags }} file: "Dockerfile" labels: ${{ steps.meta.outputs.labels }} - cache-from: type=registry,ref=jjassonn69/build:cache - cache-to: type=registry,ref=jjassonn69/build:cache,mode=max + cache-from: type=registry,ref=livepeerci/build:cache + cache-to: type=registry,ref=livepeerci/build:cache,mode=max \ No newline at end of file diff --git a/.github/workflows/trigger-upstream-openapi-sync.yaml b/.github/workflows/trigger-upstream-openapi-sync.yaml new file mode 100644 index 00000000..5c7bdeb1 --- /dev/null +++ b/.github/workflows/trigger-upstream-openapi-sync.yaml @@ -0,0 +1,30 @@ +name: Trigger upstream OpenAPI sync + +on: + push: + paths: + - "runner/openapi.json" + workflow_dispatch: + +jobs: + trigger-upstream-openapi-sync: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Trigger docs AI OpenAPI spec update + uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ secrets.DOCS_TRIGGER_PAT }} + repository: livepeer/docs + event-type: update-ai-openapi + client-payload: '{"sha": "${{ github.sha }}"}' + + - name: Trigger SDK generation + uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ secrets.SDKS_TRIGGER_PAT }} + repository: livepeer/livepeer-ai-sdks + event-type: update-ai-openapi + client-payload: '{"sha": "${{ github.sha }}"}' \ No newline at end of file diff --git a/.github/workflows/validate-openapi-on-push.yaml b/.github/workflows/validate-openapi-on-pr.yaml similarity index 96% rename from .github/workflows/validate-openapi-on-push.yaml rename to .github/workflows/validate-openapi-on-pr.yaml index 68a495d3..7dbce3e1 100644 --- a/.github/workflows/validate-openapi-on-push.yaml +++ b/.github/workflows/validate-openapi-on-pr.yaml @@ -1,9 +1,6 @@ name: Check OpenAPI spec and Golang bindings on: - push: - branches: - - main pull_request: jobs: @@ -46,4 +43,4 @@ jobs: if ! git diff --exit-code; then echo "::error::Go bindings have changed. Please run 'make' at the root of the repository and commit the changes." exit 1 - fi + fi \ No newline at end of file diff --git a/runner/app/pipelines/optim/sfast.py b/runner/app/pipelines/optim/sfast.py index 166e014e..9d9880cd 100644 --- a/runner/app/pipelines/optim/sfast.py +++ b/runner/app/pipelines/optim/sfast.py @@ -1,7 +1,7 @@ """This module provides a function to enable StableFast optimization for the pipeline. -For more information, see the DeepCache project on GitHub: https://github.com/chengzeyi/stable-fast -""" # noqa: E501 +For more information, see the Stable Fast project on GitHub: https://github.com/chengzeyi/stable-fast +""" import logging diff --git a/runner/app/pipelines/upscale.py b/runner/app/pipelines/upscale.py index e1b04004..b4978262 100644 --- a/runner/app/pipelines/upscale.py +++ b/runner/app/pipelines/upscale.py @@ -73,10 +73,10 @@ def __init__(self, model_id: str): # TODO: Retrieve defaults from Pydantic class in route. warmup_kwargs = { "prompt": "Upscaling the pipeline with sfast enabled", - "image": PIL.Image.new("RGB", (576, 1024)), + "image": PIL.Image.new("RGB", (400, 400)), # anything higher than this size cause the model to OOM } - logger.info("Warming up ImageToVideoPipeline pipeline...") + logger.info("Warming up Upscale pipeline...") total_time = 0 for ii in range(SFAST_WARMUP_ITERATIONS): t = time.time() @@ -84,7 +84,7 @@ def __init__(self, model_id: str): self.ldm(**warmup_kwargs).images except Exception as e: # FIXME: When out of memory, pipeline is corrupted. - logger.error(f"ImageToVideoPipeline warmup error: {e}") + logger.error(f"Upscale pipeline warmup error: {e}") raise e iteration_time = time.time() - t total_time += iteration_time