Fail with a message when MiniMax-H3 is run in img_gen mode - #1863
Open
danielhanchen wants to merge 1 commit into
Open
Fail with a message when MiniMax-H3 is run in img_gen mode#1863danielhanchen wants to merge 1 commit into
danielhanchen wants to merge 1 commit into
Conversation
H3 is video-only: the denoiser always splits the packed latent into a video and
an audio half, and only generate_video computes the audio length. Reaching
generate_image with an H3 checkpoint therefore hits
GGML_ASSERT(!audio_input_cache.empty()) and core dumps, after the minutes it
takes to load the weights and with nothing in the output naming the cause.
Forgetting --mode vid_gen is easy since it is the one flag not implied by
passing --audio-vae.
Before: SIGABRT, exit 134, a ggml assert and a stack trace.
After: "MiniMax-H3 is a video model and cannot be run in img_gen mode; use
--mode vid_gen", exit 1.
The AnimateDiff branch routes vid_gen back through generate_image, but that is
SD1.5 plus a motion module and never H3, so the guard cannot fire there.
danielhanchen
added a commit
to unslothai/stable-diffusion.cpp
that referenced
this pull request
Aug 8, 2026
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.
MiniMax-H3 is video-only. Its denoiser always splits the packed latent into a video half and an audio half, and only `generate_video` computes the audio length, so an H3 checkpoint that reaches `generate_image` is guaranteed to die on `GGML_ASSERT(!audio_input_cache.empty())`.
That happens whenever `--mode vid_gen` is left off, which is easy to do because it is the one flag not implied by passing `--audio-vae`. The failure arrives after the several minutes it takes to load the weights, as a core dump with a raw ggml assert and a stack trace, and nothing in the output points at the missing flag.
Before, on a q4_K H3 denoiser with the Qwen3-VL encoder and both VAEs, no `--mode`:
After, same command:
The AnimateDiff path routes `vid_gen` back through `generate_image`, but that is SD1.5 plus a motion module and never H3, so the guard cannot fire there.