Repository navigation
h3: MiniMax-H3-Image's VAE rules on the host, and Pillow's Lanczos-3 in core/picture - #2775
Merged
Merged
Conversation
This was referenced Nov 10, 2026
Owner
Author
|
Rebased onto today's main, on #2766's new head On the new head these pass: What's left: #2766 lands first. No device run is owed here. These are host rules, and no existing resize changes its bytes.
|
ashhart
force-pushed
the
lead/h3-image-pixels
branch
from
November 12, 2026 14:29
f5dad8b to
ad173c6
Compare
ashhart
force-pushed
the
lead/h3-image-pixels
branch
2 times, most recently
from
November 21, 2026 11:05
51033c4 to
9e7ac29
Compare
…in core/picture picture_vae.zig: the released VAE config, the tile split (256 pixels, overlaps of at least 64 spread 16 at a time), the float32 band blend and placement, the latent statistics, ImageNet pixels with truncating bytes, and the fp16-kept posterior sample. resample.zig gains Pillow's LANCZOS filter, sinc(x) sinc(x / 3) within 3.
…load's io, and H3's Metal tools in h3_metal.zig Main moved H3's safetensors import into the core module (h3_core in metal_targets.zig, core in h3_host.zig). This series came from before that move: tf-h3-image imported safetensors and checkpoint_fixture modules of their own. It now imports core and reads both from it, since a file may sit in one module of a build only and core holds both. Main's h3.Model.load also takes the process's io now, so tf-h3-image passes init.io as tf-h3-dit does. Main's metal_targets.zig is at the 600-line cap, so tf-h3-image's target, and main's tf-h3-dit beside it, move to h3_metal.zig with the H3 modules they share (and the kernel sources they take); metal_targets.zig calls it in one line (589 lines). The steps and their modules are otherwise unchanged.
ashhart
force-pushed
the
lead/h3-image-pixels
branch
from
November 21, 2026 14:47
9e7ac29 to
c5d836b
Compare
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 VAE rules on the host, and Pillow's Lanczos-3 resize. These are the parts its image decoder and edit encoder share. Before, TensorFold had no MiniMax-H3-Image VAE rules and
core/pictureresized with Keys' cubic or Pillow's triangle only. After:zig/src/families/h3/picture_vae.zigchecksvae/config.jsonat the released geometry, splits an axis into 256-pixel tiles and blends them, and handles the latent statistics, the bytes and the posterior:zig/src/core/picture/resample.ziggainsFilter.lanczos: sinc(x) · sinc(x / 3) within 3, through the same 22-bit fixed point as the other filters. Nothing that resizes today uses it, so every existing resize keeps its bytes.Issue: n/a. The maintainer asked for MiniMax-H3-Image directly. This adapts the behaviour 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 transformer on Metal from a picture case (tf-h3-image) #2766 (its six commits). This adds
f5dad8bcac.atc overlap --json: no open pull request toucheszig/src/families/h3/orzig/src/core/picture/resample.zig.Checks on this head
f5dad8bcac(on h3: MiniMax-H3-Image's transformer on Metal from a picture case (tf-h3-image) #2766's9692b83d53, on main14dea6c6ad).python3 tools/zig/lean_check.py: 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).zig build test-h3-geometry --summary all: 61 passed, 0 failed, 0 skipped. Five of them are new VAE-rule tests.zig build test-picture-host --summary all: 26 passed, 0 failed, 4 skipped. The skips are the same four as on main.zig build compile-h3-host: builds.zig fmt --checkandgit diff --check: clean.fa0e45c77b): shrinking, enlarging, both at once and at a canvas's ratio, all byte-exact against Pillow 13.0.0.Receipt
f5dad8bcac, Zig 0.17.0, host checks on macOS. The config fixture followsMiniMaxAI/MiniMax-H3-Image'svae/config.jsonat492fd8c4ec.Checklist
The inference checklist does not apply: these are host rules for a denoiser beside the engine.