Repository navigation
h3: MiniMax-H3-Image's text to image end to end: the prompt tool writes the canvas and the seed's starting rows - #2781
Merged
Merged
Conversation
This was referenced Nov 10, 2026
Owner
Author
ashhart
force-pushed
the
lead/h3-image-t2i
branch
from
November 18, 2026 20:30
fa0e45c to
949468d
Compare
ashhart
force-pushed
the
lead/h3-image-t2i
branch
3 times, most recently
from
November 23, 2026 20:06
7092fa5 to
e906236
Compare
This was referenced Nov 24, 2026
… main does image_decoder.zig pulls in geometry.zig, which on main reads core.safetensors, and image_decoder_test.zig runs in test-h3-geometry, whose module imports core alone, so the decoder's files read st from core.safetensors. The tool also writes PNGs with MOSS-Image's writer, whose test reads core/picture/png.zig by path, and a file may sit in one module of a build only. So the tool's core is h3_decoder_core.zig, one module holding safetensors, core's pictures and that writer, in place of picture_writer.zig; it resamples through core.picture.
ashhart
force-pushed
the
lead/h3-image-t2i
branch
from
November 24, 2026 12:35
e906236 to
5a4e8b4
Compare
ashhart
added a commit
that referenced
this pull request
Nov 24, 2026
ashhart
added a commit
that referenced
this pull request
Nov 24, 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 this changes
MiniMax-H3-Image's text to image now runs end to end with TensorFold's own tools. Before, the transformer's starting rows and canvas had to come from a reference pipeline's case. After:
With a size and a seed (and optionally the smallest area),
tf-h3-image-promptwrites a whole text-to-image case beside the prompt's rows:randnover the latent [24, h/16, w/16], made bymoss_image/noise.zigand patchified.picture.startRowsholds that rule, with a host test.tf-h3-image ... freeis a generation: it exits 0 when there is no reference to gate against, rather than 2.The recipe runs the three tools in turn (prompt, transformer on an M5, decoder), puts the edit encoder beside the decoder, and lists what is still not done.
Issue: n/a. The maintainer asked for MiniMax-H3-Image directly. This is adapted clean-room from a written spec of vLLM-Omni's and SGLang's support.
copy_scanagainst hashes of every upstream file read finds no run of 12 or more tokens.Stacked on: h3: MiniMax-H3-Image's image decoder on Metal in bf16 (tf-h3-image-decoder) #2780, then h3: MiniMax-H3-Image's prompt path on Metal: Qwen3-VL to layer 50 and the token refiner (tf-h3-image-prompt) #2779, h3: MiniMax-H3-Image's edit encoder on Metal in fp32 (tf-h3-image-encoder) #2778, h3: MiniMax-H3-Image's VAE rules on the host, and Pillow's Lanczos-3 in core/picture #2775 and h3: MiniMax-H3-Image's transformer on Metal from a picture case (tf-h3-image) #2766. Land it before kernel contract: MiniMax-H3-Image's 19 Metal kernels, 31 registrations and 34 planted controls; the prompt path's attention keeps an infinite last value #2808 and h3: MiniMax-H3-Image's edits end to end: Qwen3-VL's vision tower with DeepStack (opt-in), tf-h3-image-vision, and the prompt tool's references #2810 (MiniMax-H3-Image's kernel contract and edits, stacked on this). This adds
afc99a6239andfa0e45c77b.atc overlap --json: no open pull request touches these files.Checks on this head
fa0e45c77b. It adds a test that Lanczos gives Pillow 13.0.0'sImage.resize(LANCZOS)bytes when shrinking (7x5 to 3x2), enlarging (4x2 to 6x3) and both at once (7x5 to 4x9), and at a 2720x1536 canvas's ratio to 1280x720 (170x96 to 80x45, checked by its FNV-1a hash). The goldens were made with an existing local Pillow 13.0.0.tools/pr_check.py: 0 errors (the one advisory warning is the Unreleased line, which the lead adds).zig build test-h3-geometry test-h3-image-prompt test-picture-host compile-h3-host compile-h3-image-encoder compile-h3-image-prompt compile-h3-image-decoder-host --summary all: 18 of 18 steps. The new start-rows test fails withoutstartRows.tf-h3-image-promptbuilds with-Doptimize=ReleaseFast.zig fmt --checkandgit diff --check: clean.Receipt
tf-h3-imageruns on an M5.tf-h3-image-promptgains optional positional arguments,WIDTHxHEIGHT [SEED [MIN_AREA]].fa0e45c77b, Zig 0.17.0, host checks on macOS.Checklist
The inference checklist does not apply: these are tools for a denoiser beside the engine.