Repository navigation
minimax-h3 0.16.0rc1: fused NDHWC fp16 VAE encoder, vae_round_trip (cr-306) - #956
Merged
Merged
Conversation
…cr-306) A private entrypoint that reads a video at its H3 canvas, encodes it as upscale does (vae_encode) and decodes those latents, or a given run's, as generate does, streamed to its MP4 (vae_decode). It needs the VAE's weights alone, so the VAE's speed against ComfyUI and its release-gate cell cost a few minutes of a pod. It returns the latents in float32 and every 32nd decoded frame, for the PSNR of one build against another.
…only as the package's own child)
H3Model places its text encoder (placeable), so a function of it must load that encoder too: pod-session 44045202003's run PRO-2 failed model_preparation_failed. H3VideoVAE is the same pipeline with only its vae loaded, the same fused decoder blocks and 8-bit decoder attention.
PaulFidika
force-pushed
the
claude/cr-306-h3-vae
branch
from
November 17, 2026 08:36
82b064e to
2d2cded
Compare
…oVAE) A Model's construction may build only the components its methods declare: pod-session 44048259303's run PRO-2 failed undeclared_construction with the whole pipeline. The VAE's encode and decode math moves to official.encode_clip and decode_chunks, which OfficialH3Pipeline and OfficialH3VideoVAE both run; PIXEL_STATS is ImageNet's, the pipeline's held to it.
…cumulation (cr-306) VAE_ENCODER declares the encoder to Runtime's fusion.CausalConvEncoder: its causal conv and the padding it reads, the per-frame GroupNorm, the resnet blocks (norm1/conv1, norm2/conv2, conv_shortcut) and the downsampler's reflected right column and bottom row. Each GroupNorm, SiLU and pad runs as one pass, each conv accumulates in fp16 with its bias and the block's residual in its epilogue (comfy-kitchen #167), as ComfyUI's encoder runs under --fast fp16_accumulation (Paul, 11-16).
PaulFidika
force-pushed
the
claude/cr-306-h3-vae
branch
from
November 17, 2026 08:48
2d2cded to
e9538d1
Compare
PaulFidika
marked this pull request as ready for review
November 17, 2026 11:56
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 17, 2026
…(0.47.0.dev2307, cozy-runtime #2223); the pipeline's VAE typed as the TileBatchedVideoVAE it is
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 17, 2026
…cozy-runtime#2223, 5d3ec26e; cr-306)
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.
cr-306. Paul, 11-16, on ComfyUI's "MiniMax H3's video VAE is ~2x faster": "if it's worthwhile, please incorporate it", "we should be using the --fast fp16_accumulation".
VAE_ENCODERdeclares the video VAE's causal-conv encoder to the Runtime'sfusion.CausalConvEncoder(cozy-runtime #2223, merged5d3ec26e): NDHWC fp16, each per-frame GroupNorm, SiLU and pad one pass, each conv accumulating in fp16 with its resnet block's residual in its epilogue (comfy-kitchen Release corrected 15-second H3 package as 1.10.1 #167's kernels). Installed byH3ModelandH3VideoVAE.vae_round_trip: the video VAE alone, encode then decode, stagesvae_encode/vae_decode, onH3VideoVAE(the release'svaeonly: a function ofH3Modelmust load its placeable text encoder). Its benchmark (release-gate/sessions/h3-vae.sh) and release-gate cell (suites/runtime/h3-vae.sh).official.encode_clip/decode_chunks: the VAE mathOfficialH3Pipelineran, now shared withOfficialH3VideoVAE;PIXEL_STATSis ImageNet's, the pipeline's held to it.>=0.47.0.dev0, RELEASING.md); the 0.27 promotion's floor must be the first release withfusion.CausalConvEncoder(0.48.0).Proof
pod-session 44069065274, one RTX 5090, int8 lane, 1344x768, warm passes, same pod: RC Runtime with packages 973cd7d (this branch before the encoder) against dev-build 44063767252 (#2223) with e9538d1 (this branch; 0966958 adds only the version):
Plan report: the encoder fused (33 convs, 12 resnet blocks, 4 downsamplers), the decoder's 36 blocks as before. Latents 65.3 / 65.9 dB against before, the same latents' decode bit-identical, the round trip 57.2 / 58.3 dB (the VAE's own loss ~38 dB); frame 64 side by side shows no seam or border.