Repository navigation
Studio: MiniMax-H3-Image GGUFs on stable-diffusion.cpp, sd.cpp prebuilt bump, H3 tiled VAE overlap - #17788
Conversation
Adds unsloth/MiniMax-H3-Image-GGUF as a native-only GGUF route for the MiniMax-H3-Image family, so the model runs on CPU, Apple Silicon, small GPUs and AMD next to the existing diffusers pipeline: - family row: GGUFs load only on sd.cpp (any device), the pipeline stays on diffusers, no single-file load on either engine; sd.cpp assets are the release image VAE and the H3 Qwen3-VL-32B GGUF (vision tower included), arch marker MiniMax-H3-Image, references through the arch-gated call, euler with sd.cpp's own PDD schedule, --rng cpu as on the model card - the CPU / Apple Silicon refusal now applies to the pipeline only and names the GGUF repo - unsloth/MiniMax-H3-GGUF stays a model repo although it lends its encoder - catalog: GGUF row in the MiniMax-H3-Image group; Mac / CPU hosts get it in place of the dense row
…ax-H3 reference parity) Moves DEFAULT_TAG from master-982-0518b34-u67cba2c to master-982-0518b34-u2217753. The new build carries MiniMax-H3-Image (upstream #2324) and the MiniMax-H3 reference parity work (unslothai/stable-diffusion.cpp#88): tokenization, positions, res_multistep on the simple schedule, the reference VAE tile layout and --lossless-video.
… VAE is tiled The H3 VAE tiler in the new sd.cpp build reads --vae-tile-overlap as the minimum overlap of its 256 px tiles and defaults to 0.5 when tiling is on, which gives more tiles than the reference layout. 0.25 is the reference's 64 px. Only the low VRAM policy tiles the H3 VAE today; the flag is added wherever --vae-tiling is.
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. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! 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". |
…umented unmirrored bases [skip ci]
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! 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". |
[skip ci]
Summary
Three things that only make sense together:
unsloth/MiniMax-H3-Image-GGUF) run on stable-diffusion.cpp, so the model works on CPU, Macs, smaller GPUs and AMD next to the existing diffusers pipeline (which needs an NVIDIA or AMD GPU).master-982-0518b34-u67cba2ctomaster-982-0518b34-u2217753, the release built from fork master2217753(MiniMax-H3: match the reference implementation (tokenization, positions, sampler, audio, VAE tiles) and add a lossless video output stable-diffusion.cpp#88). The old pin has no MiniMax-H3-Image at all, so (1) needs this bump.--vae-tile-overlap 0.25whenever Studio adds--vae-tiling, so a tiled decode uses the reference tile layout instead of extra tiles.The pin bump
Fork commits between
67cba2cand2217753that matter to Studio:--lossless-video, sd-serveroutput_format: avi_raw) and explicit soundtrack pairing (--ref-video-audio-index).colab_quantize_to_ggufno longer working in Mistral 7b QLoRA notebook #87).Studio already gates its H3 parity features on the binary: the lossless handoff (
sd_cpp_supports_lossless_video,h3_server_output_format) and explicit soundtrack pairing (sd_cpp_supports_ref_video_audio_index) read--helpand the server's format list. On the old pin they stay off; on the new one they switch on with no further Studio change.Asset names are unchanged: the release ships the same 12 bundles plus
sd-prebuilt-manifest.jsonandsd-prebuilt-sha256.jsonas the current pin, so the installer picks the same bundle on every host. Tests that pin the release name and its asset list point at the new tag;test_sd_cpp_args.pykeeps the old pin in its list of builds that support--mmap.The tile overlap
The H3 VAE tiler in the new build reads
--vae-tile-overlapas the minimum overlap fraction of its 256 px tiles and defaults to 0.5 once--vae-tilingis on. The reference layout uses 64 px, which is 0.25. Studio tiles the H3 VAE in the low VRAM memory mode (offload_flagswith the model policy), so that mode would have decoded more tiles than the reference.with_h3_vae_tile_overlap(insd_cpp_args.py) adds--vae-tile-overlap 0.25to the H3 native flags whenever they contain--vae-tilingand set no overlap. Every sd.cpp build accepts the flag, so no capability gate is needed.MiniMax-H3-Image GGUF wiring
Backend (
studio/backend):diffusion_families.py, MiniMax-H3-Image row:native_transformer_files_only), the rule MOSS-Image uses: a GGUF goes to sd.cpp on every host, the pipeline repo stays on diffusers.single_file_loadable = False: a loose.safetensorsDiT is still refused on both engines, aspipeline_onlyrefused it before.MiniMaxAI/MiniMax-H3-Image,vae/diffusion_pytorch_model.safetensors) and the H3 Qwen3-VL-32B encoder GGUF (unsloth/MiniMax-H3-GGUF,qwen3vl_32b_minimax_h3-Q4_K_M.gguf), which carries the vision tower an edit reads.sd_cpp_arch_marker = "MiniMax-H3-Image": older builds are refused before eviction with a clear message.sd_cpp_reference = True:<Picture N>edits, up to 16 pictures as on diffusers.eulerwith no scheduler, shift or sigmas: sd.cpp's own H3-Image schedule is the 6-step PDD grid.sd_cpp_rngfield,cpuhere, so a seed renders what the model card'ssd-clicommand renders. It reaches the sd-server spawn, every restart and the one-shot sd-cli path.diffusion.py: the CPU / Apple Silicon refusal applies only to the pipeline load and points at the GGUF repo; the native-only refusal names the first upstream build per family.sd_cpp_companion_only_repo_ids: video family repos stay loadable models, sounsloth/MiniMax-H3-GGUFis not hidden as an encoder-only companion.Frontend: a GGUF row in the MiniMax-H3-Image group (
model-catalog.ts); on Mac and CPU hosts the dense row is not offered (host-artifact-policy.ts).Testing
End to end on one Colab G4 session (RTX PRO 6000 Blackwell, 96 GB, torch 2.14.1+cu130). Each arm installs sd.cpp with its own
install_sd_cpp_prebuilt.py(CUDA 13 bundle) and is driven through Studio's HTTP routes. BASE = main atfd7f6adf5b, HEAD = this branch.Installed builds (
--helpprobe on the installedsd-cli):--lossless-video--ref-video-audio-index--audio-flow-shift--vae-tile-overlapmaster-982-0518b34-u67cba2cmaster-982-0518b34-u2217753(commit2217753)UD-Q4_K_XL, download plan + loadsd_cppqwen3vl_32b_minimax_h3-Q4_K_M.gguf18.22 GBt2i_p0.pngexamples/reference1.png+prompt.edit.txt), 1024x1024edit_e0.pngUD-Q3_K_XL, memory auto, 1344x768x124, 4 stepssd_cpp_supports_lossless_videotrue,sd_cpp_supports_ref_video_audio_indextrue,h3_server_output_format=avi_raw; the container sd.cpp handed over before the MP4 export is a 385 MB AVI withrawvideo+pcm_f32lelow_vram--offload-to-cpu --clip-on-cpu --diffusion-fa --vae-tiling --vae-tile-overlap 0.25 --max-vram 93.58 -v --rng cpu; same raw AVI handoffThe BASE refusal needs transformers in the environment (without it BASE stops one check earlier, on the transformers version), so the run installs transformers 4.57.6.
Text encoder: the reference workflows use an int8 Qwen3-VL-32B encoder.
unsloth/MiniMax-H3-GGUFpublishes onlyqwen3vl_32b_minimax_h3-Q2_K_M.gguf(13.10 GB) andqwen3vl_32b_minimax_h3-Q4_K_M.gguf(18.22 GB), no Q8_0, so Q4_K_M stays the H3-Image default (the encoder is the reference's own 50-layer truncation, so a stock Qwen3-VL-32B Q8_0 is not a substitute).The H3-Image render quality numbers from the wiring run on the previous fork branch build (L4, seed 1234, 1024x1024, 6 steps, LPIPS against bf16 sd.cpp renders on an A100): text-to-image warm 9.5 s/image (0.159 / 0.175), first request after load 110.6 s (0.165), edit 36.2 s (0.027), low_vram first request 164.3 s (0.140); the A100
sd-clirender of the same file scores 0.164 to 0.175 and 0.028 on the edit.Unit (CPU):
tests/test_sd_cpp_minimax_h3_image.py(31 tests): routing on cuda / cpu / mps, refusal of a build without the marker, the diffusers GGUF refusal, the single-file refusal, asset specs,--rngon both builders, the video repo staying a model, all 14 file names resolving to the image family, the default quant pick.tests/test_h3_vae_tile_overlap.py(8 tests): the overlap follows--vae-tilingonly, an explicit overlap is kept, per memory mode policy (only the model policy tiles, with--vae-tiling --vae-tile-overlap 0.25adjacent), the pair survives the resident / offloaded render choice and the host memory fit, and the H3 native loader builds its flags through the helper.test_sd_cpp*,test_h3*,test_video*,test_diffusion_minimax_h3*,test_media_auto_switch,test_diffusion_more_families): 6746 passed, 203 skipped on this branch; 6710 passed, 203 skipped on main. The failures are the same IDs on both:test_h3_ref_encode.py::test_chunked_reference_matches_stock_bit_for_bit(4 params), 3 intest_video_needs_ffmpeg.py(no ffprobe on the host) and an error intest_sd_cpp_cuda_cpu_torch.py::test_selection_installs_the_cuda_build. 4test_video_routes.pygenerate-failure tests failed once under xdist on this branch only and pass serially on both (87 / 87).tests/minimax-h3-image-ui.test.ts8 / 8,model-catalog.check.tspasses,model-catalog-network-budget2 / 2,on-device-dot-and-header-alignment24 / 24.Not covered
UD-Q4_K_XLof the image GGUFs ran end to end.Screenshots
Images model picker on a CPU-only host, before and after: the MiniMax-H3-Image pipeline row (needs CUDA or ROCm) is no longer offered there; the MiniMax-H3-Image-GGUF row, which now runs on stable-diffusion.cpp, is the one that loads.