Apply the open H3 fixes to the prebuilts we publish - #5
Merged
Conversation
The prebuilt pipeline builds leejet's source at an aged release tag, not this fork's master, so the three MiniMax-H3 fixes on master reach nobody: every Studio user installs a binary that still aborts on the default cfg-scale, still aborts on --vae-on-cpu, and still quantizes H3's 1-D norms into an output uncorrelated with its own bf16 reference. Building from master instead would throw away the reason the pipeline is shaped this way, which is that what we publish should be traceable to a specific upstream release. So keep the upstream tag as the base and carry the delta explicitly: - patches/ holds one file per fix, each with its upstream pull request in the header. All three are open on leejet: leejet#1861, leejet#1862, leejet#1863. - resolve applies them to the checked-out tag, after running git apply --check over the whole set so a stale patch stops the run before the tree is half modified. That failure is the signal to delete the patch (upstream merged it) or refresh it (upstream moved the code). - a non-empty set moves the published tag to <upstream tag>-u<id>, where id is the sha256 prefix of the concatenated patches. The tag then says whether a box is stock, and a changed patch set republishes rather than matching an existing release and skipping. - the manifest and the release notes both record the applied list. An empty patches/ leaves the tag and every asset name exactly as they are today. Verified by running the resolve step against master-813-bfbef5b with gh stubbed: all three patches apply, the tag becomes master-813-bfbef5b-u<id>, and the stamped source tarball contains the fixes.
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.
The three MiniMax-H3 fixes on
master(#2, #3, #4) currently reach nobody.unsloth-sd-prebuilt.ymlbuilds leejet's source at an aged release tag, not this fork'smaster, so every binary the Studio installs still aborts on the default--cfg-scale, still aborts on--vae-on-cpu, and still quantizes H3's 1-D norms into an output uncorrelated with its own bf16 reference. All three are open upstream (leejet#1861, leejet#1862, leejet#1863) but none is in a release yet.Building from
masterinstead would throw away the reason the pipeline is shaped this way: what we publish should be traceable to a specific upstream release, not to whatever a fork happened to contain that day. So this keeps the upstream tag as the base and carries the delta explicitly.How it works
patches/holds one file per fix, each with its upstream pull request in the header, plus a README with the rules.resolveapplies them to the checked-out tag, after runninggit apply --checkover the whole set first, so a stale patch stops the run before the tree is half modified.<upstream tag>-u<id>, where<id>is the sha256 prefix of the concatenated patches. So the tag says whether a box is stock, and changing the patch set republishes instead of matching an existing release and skipping.sd-prebuilt-manifest.jsonand the release notes both record the applied list.source_commitstays the upstream commit.An empty
patches/leaves the tag, every asset name and the manifest exactly as they are today, so the normal steady state is unchanged.Why a failing patch is the point
git apply --checkfailing is the designed signal, not a breakage to route around: upstream either merged the fix, in which case the file gets deleted, or moved the code under it, in which case it gets refreshed and re-verified. Without that the next release would silently ship a duplicate of code upstream already has.Verified
Ran the
resolvestep verbatim againstmaster-813-bfbef5bwithghstubbed:patches/empty the tag staysmaster-813-bfbef5band the outputs are byte-identical to today,assemble_metadata.pyrecordsupstream_tagandpatches, and a stock build still getsupstream_tag == tagwith an empty list.The binaries themselves were verified end to end before the three fixes were merged: a CUDA build of
masterrenders at--cfg-scale 7(warns and clamps), renders with--vae-on-cpualone and combined with--offload-to-cpu --clip-on-cpu, and errors cleanly instead of core dumping when--mode vid_genis omitted.