Skip to content

Fix Windows MAX_PATH failure in CI model download step - #2

Open
makn87amd with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-failing-github-actions-job-again
Open

Fix Windows MAX_PATH failure in CI model download step#2
makn87amd with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-failing-github-actions-job-again

Conversation

Copilot AI commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

snapshot_download writes temp files to {local_dir}/.cache/huggingface/download/{subdir}/{hash}.incomplete. With models stored under the workspace path, this produces a 261-char path — 1 char over Windows' 260-char MAX_PATH limit, causing a FileNotFoundError.

The existing "Enable Windows long path support" step silently swallows admin-privilege errors when writing to HKLM, so it is not a reliable fix.

Change

  • Set $modelsDir = "C:\m" instead of "${{ github.workspace }}/test_models", reducing the longest temp-file path from 261 → 194 chars — safely under MAX_PATH regardless of OS long-path registry state.
- $modelsDir = "${{ github.workspace }}/test_models"
+ $modelsDir = "C:\m"

The snapshot_download call was writing temp .incomplete files to a
path 261 chars long — 1 char over the Windows 260-char MAX_PATH limit:

  {workspace}/test_models/stable-diffusion-turbo-amdnpu-onnx/
    .cache/huggingface/download/text_encoder/<hash>.incomplete

The existing "Enable Windows long path support" step silently swallows
admin-privilege errors when setting the HKLM registry key, so it
cannot be relied upon.

Fix: use C:\m as $modelsDir, reducing the longest temp path from 261
to 194 chars — safely within MAX_PATH regardless of OS long-path
support.
Copilot AI changed the title [WIP] Fix failing GitHub Actions job Build and Test RyzenAI SD Server Fix Windows MAX_PATH failure in CI model download step Jul 13, 2026
Copilot AI requested a review from makn87amd July 13, 2026 18:02
@makn87amd
makn87amd marked this pull request as ready for review July 13, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants