Repository navigation
Conversation
This was referenced Oct 2, 2026
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.
What changed
Load ComfyUI's MiniMax H3 NVFP4 AWQ Qwen3-VL text encoder directly in stable-diffusion.cpp. The safetensors reader recognizes packed NVFP4 weights and their FP8 block and F32 global scales; the loader repacks them into ggml's existing NVFP4 block layout. Linear layers apply the AWQ
pre_quant_scalevectors before matrix multiplication and the global scale afterward.The exact source diff was previously carried as a patch in QVAC's H3 work. This branch moves that diff into the owning backend repository. QVAC draft PR #4818 separately adds the optional download and pins this backend commit; the core T2V/I2V PR #4789 keeps the earlier merged backend pin. No ggml source change or dependency update is required; the pinned ggml commit already provides
GGML_TYPE_NVFP4.Why
Without the AWQ input scales, H3 generated a scene unrelated to the prompt. Applying them restored the requested objects and composition in matched runs.
Verification
#5vcpkg overlay has not yet been rebuilt end to end.The checkpoint requests full-precision matrix multiplication in ComfyUI. This implementation uses ggml's native quantized NVFP4 multiplication, so numerical parity with ComfyUI is not claimed.