Text-to-Image
Diffusion Single File
comfyui

MiniMax-H3-Image in the CMF format: one 24.6 GB file, CUDA and Vulkan, from 4 GB of VRAM

#17
by infosave - opened

Thank you for MiniMax-H3-Image and for the files in this repository. The model's quality at 4 to 16 megapixels in six steps is remarkable, and the pruned checkpoint made the port straightforward.

I have added the model to cortiq, a Rust inference engine with no Python and no ML framework, in its CMF container: https://huggingface.co/infosave/MiniMax-H3-Image-cmf

What the format gives here:

  • One file of 24.6 GB holds everything: the diffusion transformer (from the pruned BF16 checkpoint here) and the Qwen3-VL prompt encoder in 4 bits, the image VAE in 8 bits. It is memory-mapped and there is nothing else to download.
  • Text to image and image editing from one command, cortiq imagine; --image makes the run an edit.
  • A native CUDA path. The transformer, the encoder and the VAE run as chains on the card; the weights stay in 4 bits there and are expanded only for their product. On an RTX 2000 Ada with 16 GB, 2048 x 2048 takes 50.3 s and 4096 x 4096 takes 283.7 s.
  • A ceiling on the card's memory. CMF_GPU_VRAM_MB=4000 renders the same 2048 x 2048 picture in 60.2 s within 3.7 GB of the card (49.6 dB PSNR against the run without a ceiling): the blocks that do not fit pass through the card every step.
  • Vulkan on any vendor's card, with the same file.
cargo install cortiq-cli --features cuda
hf download infosave/MiniMax-H3-Image-cmf minimax-h3-image-q4tp.cmf --local-dir .
CMF_GPU=cuda cortiq imagine minimax-h3-image-q4tp.cmf --prompt @prompt.txt --out out.png
CMF_GPU=cuda cortiq imagine minimax-h3-image-q4tp.cmf --image photo.png --prompt @edit.txt --out edit.png

Two results of the 4-bit file, 2048 x 2048, seed 42, six steps. Text to image:

A bakery shopfront with a bicycle, generated by the 4-bit file

Image editing, the example picture of the original repository with its edit brief (headphones removed, a fist bump, every sign and mug text kept):

The edit of the original repository's example picture

The weights are quantized and not retrained, and the file is under the MiniMax-H3-Image Community License like the original. Measurements, more examples and the known limits are on the page.

Sign up or log in to comment