Skip to content

Release SDXL and FLUX Shortfin Serving Tests #333

Release SDXL and FLUX Shortfin Serving Tests

Release SDXL and FLUX Shortfin Serving Tests #333

# Copyright 2025 Advanced Micro Devices, Inc.
#
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
name: Release SDXL and FLUX Shortfin Serving Tests
on:
workflow_dispatch:
schedule:
# Weekdays at 11:00 AM UTC = 03:00 AM PST / 04:00 AM PDT
- cron: "0 9 * * *"
concurrency:
# A PR number if a pull request and otherwise the commit hash. This cancels
# queued and in-progress runs for the same PR (presubmit) or commit
# (postsubmit). The workflow name is prepended to avoid conflicts between
# different workflows.
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true
permissions:
contents: write
jobs:
test_sdxl_flux_serving:
if: ${{ github.repository_owner == 'nod-ai' || github.event_name != 'schedule' }}
timeout-minutes: 240
name: "Release: SDXL and Flux Shortfin Serving Tests"
strategy:
matrix:
version: [3.11]
fail-fast: false
runs-on: linux-mi325-1gpu-ossci-nod-ai
defaults:
run:
shell: bash
env:
VENV_DIR: ${{ github.workspace }}/.venv
HF_HOME: "/amdshark-cache/data/huggingface"
HF_TOKEN: ${{ secrets.HF_FLUX_TOKEN }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: "Setting up Python"
id: setup_python
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: ${{matrix.version}}
- name: Create Python venv
run: |
python -m venv ${VENV_DIR}
source ${VENV_DIR}/bin/activate
- name: Install pip deps
run: bash scripts/setenv.sh --nightly
- name: Run SDXL (precompiled)
run: |
bash scripts/run_sdxl_flux.sh \
--model sdxl \
--build_preference precompiled 2>&1 | tee output_artifacts/sdxl/sdxl_precompile.log
- name: Run Flux-Dev (precompiled)
if: always()
run: |
bash scripts/run_sdxl_flux.sh \
--model flux_dev \
--build_preference precompiled \
--hf-token ${HF_TOKEN} 2>&1 | tee output_artifacts/flux_dev/flux_dev_precompile.log
- name: Run Flux-Dev (compile)
if: always()
run: |
bash scripts/run_sdxl_flux.sh \
--model flux_dev \
--build_preference compile \
--hf-token ${HF_TOKEN} 2>&1 | tee output_artifacts/flux_dev/flux_dev_compile.log
- name: Run Flux-Schnell (precompiled)
if: always()
run: |
bash scripts/run_sdxl_flux.sh \
--model flux_schnell \
--build_preference precompiled \
--hf-token ${HF_TOKEN} 2>&1 | tee output_artifacts/flux_schnell/flux_schnell_precompile.log
- name: Run Flux-Schnell (compile)
if: always()
run: |
bash scripts/run_sdxl_flux.sh \
--model flux_schnell \
--build_preference compile \
--hf-token ${HF_TOKEN} 2>&1 | tee output_artifacts/flux_schnell/flux_schnell_compile.log
- name: Upload images
if: always()
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
with:
name: generated-images
path: |
output_artifacts/sdxl/
output_artifacts/flux_dev/
output_artifacts/flux_schnell/
- name: Cleanup output artifacts
run: |
rm -rf output_artifacts
test ! -d output_artifacts && echo "Output artifacts are removed"
# New job to push logs to amd-shark-ai-reports repository
push_images:
if: always()
name: "Push sdxl/flux generated images"
needs: [test_sdxl_flux_serving]
runs-on: ubuntu-24.04
steps:
- name: Download log artifacts
uses: actions/download-artifact@v7
with:
name: generated-images
path: gen_images
- name: Checkout Target Repo
uses: actions/checkout@v6
with:
repository: nod-ai/amd-shark-ai-reports
token: ${{ secrets.AMD_SHARK_AI_GITHUB_TOKEN }}
path: amd-shark-ai-reports
- name: Push artifacts
run: |
git config --global user.name "GitHub Actions Bot"
git config --global user.email ""
date=$(date -u +'%Y-%m-%d')
mkdir -p "amd-shark-ai-reports/amdshark-ai-logs/$date/generated-images"
cp -vr gen_images/* "amd-shark-ai-reports/amdshark-ai-logs/$date/generated-images/"
cd amd-shark-ai-reports
git pull
git add amdshark-ai-logs
git commit -m "Add sdxl/flux images on $(date -u +'%Y-%m-%d')"
git push origin main
rm -rf ../gen_images