README.md
6.0 KB · 106 lines · markdown Raw
1 ---
2 license: other
3 license_name: minimax-h3-image-community-license-agreement
4 license_link: LICENSE
5 base_model: MiniMaxAI/MiniMax-H3-Image
6 base_model_relation: quantized
7 pipeline_tag: text-to-image
8 library_name: gguf
9 language:
10 - en
11 tags:
12 - gguf
13 - stable-diffusion.cpp
14 - text-to-image
15 - image-to-image
16 - image-editing
17 - minimax
18 - minimax-h3
19 - minimax-h3-image
20 - quantized
21 widget:
22 - text: 'A night market food stall in Taipei, a hand-painted menu board reading "BEEF NOODLES 120" and "SCALLION PANCAKE 60", steam rising from a pot, warm lantern light, 35mm photo'
23 output:
24 url: assets/menu.png
25 - text: 'Portrait of an elderly fisherman in a yellow raincoat on a harbour wall at dawn, light rain, weathered skin and kind eyes, fishing boats behind him, 85mm photo, shallow depth of field'
26 output:
27 url: assets/portrait.png
28 - text: 'Edit of the portrait: Give him a red knitted beanie. Keep everything else exactly the same.'
29 output:
30 url: assets/edit.png
31 - text: 'A cozy bookshop cafe on a rainy evening, warm lamps, shelves up to the ceiling, a chalkboard by the door reading "OPEN LATE", two people reading by the window, rain on the glass, cinematic photo (2048 × 2048)'
32 output:
33 url: assets/bookshop.jpg
34 - text: 'Concept art of a city built into the ribs of a giant fossil in a desert, caravans with sails crossing the dunes at sunset, lanterns in the windows, matte painting, wide shot'
35 output:
36 url: assets/city.png
37 - text: 'A minimalist poster for a jazz night, a saxophone made of brass leaves on a cream background, the words "HEARTH JAZZ" in bold letters at the top and "FRIDAY 9 PM" at the bottom, Swiss design'
38 output:
39 url: assets/poster.png
40 ---
41
42 # MiniMax H3-Image GGUF
43
44 GGUF files of the pruned diffusion transformer of [MiniMax H3-Image](https://huggingface.co/MiniMaxAI/MiniMax-H3-Image), for [stable-diffusion.cpp](https://github.com/leejet/stable-diffusion.cpp) and [Hearthscale](https://hearthscale.com). MiniMax H3-Image is a model for text-to-image and picture editing, up to 16 megapixels, distilled to 6 steps.
45
46 The files are converted from `minimax_h3_image_pruned_bf16.safetensors` in [Comfy-Org/MiniMax-H3-Image](https://huggingface.co/Comfy-Org/MiniMax-H3-Image) with the converter of stable-diffusion.cpp `master-1088-32d516c`. They load in stable-diffusion.cpp from `master-1088`, the first build that reads MiniMax H3-Image, with no patch.
47
48 <Gallery />
49
50 Every picture above comes from the Q4_K_M file with seed 42, the Q2_K_M text encoder and stable-diffusion.cpp's own `master-1088-32d516c` release build. The edit takes the portrait as its reference.
51
52 ## Files
53
54 | File | Size | Block weights | Graphics memory to hold the whole model | Quality |
55 |---|---|---|---|---|
56 | [minimax_h3_image_pruned-Q8_0.gguf](minimax_h3_image_pruned-Q8_0.gguf) | 21.4 GB | Q8_0 | 24 GB | Closest to the bf16 weights. |
57 | [minimax_h3_image_pruned-Q5_K_M.gguf](minimax_h3_image_pruned-Q5_K_M.gguf) | 13.9 GB | Q5_K | 16 GB | Very close to Q8_0. |
58 | [minimax_h3_image_pruned-Q4_K_M.gguf](minimax_h3_image_pruned-Q4_K_M.gguf) | 11.4 GB | Q4_K | 16 GB | **Recommended.** Lettering and fine detail hold. |
59 | [minimax_h3_image_pruned-Q3_K_M.gguf](minimax_h3_image_pruned-Q3_K_M.gguf) | 8.8 GB | Q3_K | 12 GB | Softer detail. The smallest file that keeps lettering right. |
60
61 With less graphics memory, the weights stream from system memory at each step. Every file runs on a 10 GB graphics card with 32 GB of system memory, at the times below. A 2-bit file is not published: at Q2_K, lettering and detail break.
62
63 In every file, the attention and MLP weights of the 50 blocks and of the token refiner take the type in the name. The AdaLN projections stay in F16, the norms and the condition projection in BF16, and the output heads in F32. The input projection is F32, except in the Q8_0 file, where it is Q8_0. The naming follows [leejet/MiniMax-H3-GGUF](https://huggingface.co/leejet/MiniMax-H3-GGUF).
64
65 ## Measured
66
67 On an NVIDIA RTX 3080 with 10 GB and 32 GB of system memory, with the Vulkan build, the Q2_K_M text encoder, `--auto-fit on --max-vram 6` and one picture of 6 steps:
68
69 | File | 1024 × 1024, in all | Sampling |
70 |---|---|---|
71 | Q8_0 | 285 s | 265 s |
72 | Q5_K_M | 98 s | 76 s |
73 | Q4_K_M | 61 s | 38 s |
74 | Q3_K_M | 52 s | 31 s |
75
76 With the same setup and Q4_K_M, a 2048 × 2048 picture takes 77 s, and an edit of a 1024 × 1024 picture takes 76 s.
77
78 ## Hearthscale
79
80 1. Update Hearthscale to 0.3.2, which ships stable-diffusion.cpp `master-1088`.
81 2. Open the Server, go to **Explore**, and search for `Hearthscale/MiniMax-H3-Image-GGUF`.
82 3. Choose a file. The Server offers the VAE and the text encoder beside it, with the text encoder in the size your device's memory takes.
83 4. Draw and edit in Image studio. Each picture takes 6 steps, on the schedule the model was distilled for.
84
85 ## stable-diffusion.cpp
86
87 You also need the VAE and the text encoder:
88
89 - VAE: `vae/minimax_h3_image_vae_fp16.safetensors` from [Comfy-Org/MiniMax-H3-Image](https://huggingface.co/Comfy-Org/MiniMax-H3-Image/tree/main/vae)
90 - Text encoder: `qwen3vl_32b_minimax_h3-Q4_K_M.gguf` (18.2 GB) or `qwen3vl_32b_minimax_h3-Q2_K_M.gguf` (13.1 GB) from [leejet/MiniMax-H3-GGUF](https://huggingface.co/leejet/MiniMax-H3-GGUF)
91
92 ```sh
93 sd-cli --diffusion-model minimax_h3_image_pruned-Q4_K_M.gguf \
94 --vae minimax_h3_image_vae_fp16.safetensors \
95 --llm qwen3vl_32b_minimax_h3-Q2_K_M.gguf \
96 -p "A silver tabby kitten holding a sign reading 'sd.cpp', natural daylight" \
97 --cfg-scale 1 --sampling-method euler --sigmas minimax-h3-image \
98 -W 1024 -H 1024 --auto-fit on
99 ```
100
101 To edit a picture, add `-r picture.png` and say what to change, for example `-p "Give him a red knitted beanie. Keep everything else exactly the same."`. Repeat `-r` for more reference pictures, up to 16. See the [MiniMax-H3-Image guide](https://github.com/leejet/stable-diffusion.cpp/blob/master/docs/minimax_h3_image.md) of stable-diffusion.cpp.
102
103 ## Licence
104
105 The files follow the licence of the original model, the [MiniMax-H3-Image Community License Agreement](LICENSE). Read it before you use them: it limits where the model may be used.
106