Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions .github/workflows/studio-mac-inference-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -710,11 +710,22 @@ jobs:
continue-on-error: true
with:
path: gguf-cache
key: ${{ runner.os }}-gguf-${{ env.GGUF_REPO }}-${{ env.GGUF_FILE }}-${{ env.MMPROJ_FILE }}-v1
key: ${{ runner.os }}-gguf-${{ env.GGUF_REPO }}-${{ env.GGUF_FILE }}-${{ env.MMPROJ_FILE }}-v2

- name: Download GGUF + mmproj if cache miss
- name: Verify cache contains BOTH gguf + mmproj
id: verify-cache
if: steps.cache-gguf.outputs.cache-hit == 'true'
run: |
if [[ -f "gguf-cache/$GGUF_FILE" && -f "gguf-cache/$MMPROJ_FILE" ]]; then
echo "ok=true" >> "$GITHUB_OUTPUT"
else
echo "Partial cache hit -- forcing re-download."
echo "ok=false" >> "$GITHUB_OUTPUT"
fi

- name: Download GGUF + mmproj if cache miss or partial
id: download-gguf
if: steps.cache-gguf.outputs.cache-hit != 'true' || steps.cache-gguf.outcome != 'success'
if: steps.cache-gguf.outputs.cache-hit != 'true' || steps.verify-cache.outputs.ok != 'true'
# Authenticated + parallel: shared macos-14 NAT egress stalls
# multi-GB anonymous downloads.
env:
Expand All @@ -734,13 +745,15 @@ jobs:
ls -lh "gguf-cache/$GGUF_FILE" "gguf-cache/$MMPROJ_FILE"

# Save partial caches on cancel. hashFiles guard avoids a hard
# save failure when the download step exits with no files.
# save failure when the download step exits with no files. The
# additional mmproj-presence check stops a partial save from
# poisoning the cache for the next run.
- name: Save GGUF + mmproj files
if: always() && steps.download-gguf.outcome != 'skipped' && hashFiles('gguf-cache/**/*.gguf') != ''
if: always() && steps.download-gguf.outcome != 'skipped' && hashFiles('gguf-cache/**/*.gguf') != '' && hashFiles(format('gguf-cache/{0}', env.MMPROJ_FILE)) != ''

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Require the model GGUF before saving the cache

In the JSON/images workflow, a run where mmproj-F16.gguf downloads successfully but the main GGUF download fails or is cancelled still satisfies this if: the mmproj file itself matches hashFiles('gguf-cache/**/*.gguf'), and the added check only proves the mmproj exists. That allows actions/cache/save to publish a v2 cache with only the mmproj, which the new verify step will reject on every later run and force a full re-download instead of ever getting a usable cache; require GGUF_FILE explicitly here as well.

Useful? React with 👍 / 👎.

uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: gguf-cache
key: ${{ runner.os }}-gguf-${{ env.GGUF_REPO }}-${{ env.GGUF_FILE }}-${{ env.MMPROJ_FILE }}-v1
key: ${{ runner.os }}-gguf-${{ env.GGUF_REPO }}-${{ env.GGUF_FILE }}-${{ env.MMPROJ_FILE }}-v2

- name: Install Studio (--local, --no-torch)
env:
Expand Down
Loading