Repository navigation
CI: a stuck CUDA redist staging directory no longer fails the Windows CUDA job - #112
Merged
Merged
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Member
Author
|
@codex review |
1 similar comment
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
danielhanchen
added a commit
to unslothai/unsloth
that referenced
this pull request
Dec 2, 2026
…GroupNorm fallback fix) (#20791) ## Summary Moves the Studio sd.cpp prebuilt pin from `master-982-0518b34-uf22ff38` to `master-982-0518b34-u0c69df2` (unslothai/stable-diffusion.cpp at `0c69df28`). The new build adds three fork changes: - unslothai/stable-diffusion.cpp#110 (from upstream #2476): the MiniMax-H3 video VAE pads the last frames into one allocation instead of one full-clip concat per padded frame. In the encoder, CausalConv3d does its reflection, downsample end padding and causal zero frames in one padding op. On CUDA / HIP, TemporalGroupNorm runs GroupNorm + affine + SiLU as one frame-norm op. CPU, Metal and Vulkan build one batched GroupNorm over all frames instead of a slice, norm and concat per frame. - unslothai/stable-diffusion.cpp#111: SYCL and OpenCL keep the per-frame GroupNorm fallback. The CPU, CUDA, Vulkan and Metal graphs are the same as in #110. - unslothai/stable-diffusion.cpp#112: CI only. The Windows CUDA 13 toolkit install no longer fails when it cleans up an extracted redist folder that is not yet empty. That failure is why the `c4b0713` build published without its three Windows CUDA 13 bundles, so this build is the one to pin. `0c69df28` is three commits ahead of `f22ff38d31`. The source changes are in `src/model/vae/minimax_h3_vae.hpp`, `src/core/ggml_extensions.*`, `src/core/ggml_extend.*` and two new CUDA files (`vae_frame_norm.cu`, `vae_pad.cu`); #112 only touches `.github/workflows/unsloth-sd-prebuilt.yml`. ggml and the fork's ggml patch list are unchanged. ## Changes - `install_sd_cpp_prebuilt.py`: `DEFAULT_TAG` and `PINNED_RELEASE_ASSETS` move to the new tag, with all 22 assets and their sha256. The digests come from the release's `sd-prebuilt-sha256.json`. The two JSON files were hashed after download. All 22 match the digests the GitHub releases API reports. - `sd_cpp_args.py`: the new tag joins `METAL_IMPLICIT_GEMM_CONV_TAGS` and `VULKAN_PAGEABLE_OFFLOAD_TAGS`. `0c69df28` descends from `f22ff38d31`, so it still carries #103 (implicit GEMM Metal CONV_2D) and #106 (Vulkan offload in pageable RAM). - Tests that name the pin move with it: `test_diffusion_more_families.py`, `test_sd_cpp_args.py` (new row; `uf22ff38` stays as the previous pin), `test_sd_cpp_cuda_cpu_torch.py`, `test_sd_cpp_vulkan_cpu_torch.py`, `test_sd_cpp_metal_vae_conv_default.py`, `test_sd_cpp_metal_vae_conv_direct.py`, `test_sd_cpp_metal_vae_conv_status_argv.py` and `test_h3_native_pageable_offload.py`. The last one now also checks that `u9213d05` and `ub6ed0ee` stay pageable. ## Tests Release check: the release is published (not a draft, not a prerelease) with the same 22 asset names as `uf22ff38`. Apart from the tag, source commit, timestamp and hashes, `sd-prebuilt-manifest.json` is the same as the old one, including the asset and CUDA coverage rows. Linux x86_64 CPU, `uf22ff38` vs `uc4b0713` (the build of #110 + #111; `u0c69df2` adds only the CI change of #112), using the release zips: FLUX.2 klein 4B Q4_K_M (4 steps) and Z-Image-Turbo Q4_K_M (8 steps), 256x256, seed 42, `--rng cpu`, Studio's `--flash-attn off,diffusion=on,te=auto`, 8 threads, A B B A, each render in a fresh process. For each model all four PNGs are byte-identical. Each log reports its own tag and commit. MiniMax-H3 on CUDA, from the fork PR #110 run on an L4 (sm_89): Ref2VA at 864x480, 124-frame reference video, 8 steps, plain decode, unsloth/MiniMax-H3-GGUF ref2va Q4_K. | build | request (s) | decode (s) | output md5 | | --- | --- | --- | --- | | before #110 | 848.3 | 48.5 | 2da16326 | | #110 | 790.3, 794.0 | 48.5, 51.5 | 2da16326 | The request is 6.5% faster and the output video is byte-identical. The fork PR also reports the padding step at 124 -> 136 frames, 864x480, going from 4.78 s to 0.36 s with peak memory 1885 -> 1242 MiB, and CPU VAE encode latents byte-identical before and after. Unit tests: the sd.cpp, installer and H3 suites (136 files) give 4639 passed on this branch and 4638 on main. The extra case is the new previous-pin row. The same 57 failed and 64 errored test IDs show up on both sides; they are mostly in the H3 image suites, fail the same way on main, and do not touch the pin. `test_sd_cpp_pinned_prebuilt.py` and `test_sd_cpp_install_ratelimit.py` pass on this branch. With the pin on the incomplete `uc4b0713` release (19 assets), `test_sd_cpp_pinned_prebuilt.py` fails 9 tests (the Windows CUDA 13 routing cases and `test_the_shipped_asset_list_carries_every_cuda_family_bundle`), so the suite catches a release that is missing bundles. ## Not covered - The CPU renders used the `uc4b0713` zips, not `u0c69df2`. The only change between them is the CI workflow. - The L4 numbers come from the fork PR's build, not from this release's CUDA bundle. No new GPU render was made for this pin. - No Metal, Vulkan, ROCm or Windows render was run for this pin. Metal and Vulkan take the batched GroupNorm path. In the fork PR, Linux RADV only measured the padding step (2.3 s to 0.6 s), because every render at that size, master included, hit `ErrorDeviceLost` in DiT sampling.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The scheduled and dispatched prebuilt runs keep losing the Windows CUDA 13 assets. In run 46820687136 (
master-982-0518b34-uc4b0713),windows-x64-cuda13-portableandwindows-x64-cuda13-olderfailed in "Install CUDA toolkit 13.3" on the staging cleanup:The publish job still ran, so the release shipped 19 of 22 assets, without:
sd-*-bin-win-cuda13-x64.zipsd-*-windows-x64-cuda13-newer.zipsd-*-windows-x64-cuda13-older.zipThe same error hit
windows-x64-cuda13-olderin thef22ff38run and in the cancelled367b615run. A release with missing assets cannot be pinned by Studio, andgh run rerun --failedis refused for these runs.Fix
That
Remove-Itemonly frees runner disk after the component has already been copied into the toolkit prefix. It now retries up to 3 times, 5 s apart, removing only paths that still exist. If the directory is still held open after the third attempt, it logs a warning and the job continues instead of failing.Tests
pwsh7 with one removable staging pair and one undeletable directory. The removable pair and the second zip are deleted. The undeletable directory produces one warning after three attempts, and the loop continues to the next component.