Skip to content

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
ashhart merged 2 commits into
mainfrom
lead/h3-image-t2i
Nov 24, 2026
Merged

ashhart merged 2 commits into
mainfrom
lead/h3-image-t2i

Conversation

@ashhart

@ashhart ashhart commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

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:

Checks on this head

  • Head commit: fa0e45c77b. It adds a test that Lanczos gives Pillow 13.0.0's Image.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.
  • Lean checker: 386 on the base and 386 on this head, 0 new. tools/pr_check.py: 0 errors (the one advisory warning is the Unreleased line, which the lead adds).
  • Tests run, with the command and pass, fail and skip counts:
    • 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 without startRows.
    • tf-h3-image-prompt builds with -Doptimize=ReleaseFast.
    • zig fmt --check and git diff --check: clean.
  • CI: will run on this head.
  • Not run, and why: the whole pipeline on real weights. Their download is on hold, and the transformer needs an M5.

Receipt

  • Main against branch: n/a. These are tools beside the engine; no token path changes.
  • Boxes it reaches: Metal. The prompt tool and decoder run on any Apple GPU; tf-h3-image runs on an M5.
  • New switch? None. tf-h3-image-prompt gains optional positional arguments, WIDTHxHEIGHT [SEED [MIN_AREA]].
  • Environment, with the TensorFold commit, Zig and backend toolchain, machine and GPU, checkpoint and revision: fa0e45c77b, Zig 0.17.0, host checks on macOS.
  • Paths and platforms the change reaches, which I ran and which I could not: host checks and builds only.
  • Exactness, decode and prompt speed: n/a.
  • Licence of any new weights or drafter: n/a, no weights. The recipe notes the MiniMax-H3-Image Community License's excluded territories.

Checklist

  • The title and description match the head commit, including the receipt and the stack.
  • New tests fail before the change, pass after it, and skip cleanly without their dependency.
  • Comments and docstrings are one line. No measurements or history in the source.
  • No personal data, machine names, internal hosts or local paths in the diff or its commits. No AI attribution lines.

The inference checklist does not apply: these are tools for a denoiser beside the engine.

@ashhart

ashhart commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

Status on this head (fa0e45c77b): CI is green, and it merges cleanly with today's main.

… 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
ashhart merged commit 1754680 into main Nov 24, 2026
3 of 12 checks passed
@ashhart
ashhart deleted the lead/h3-image-t2i branch November 24, 2026 12:36
ashhart added a commit that referenced this pull request Nov 24, 2026
ashhart added a commit that referenced this pull request Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant