h3
Native MiniMax-H3 video and audio inference CLI for Apple Silicon
TLDR
SYNOPSIS
h3 -d MODELDIR [**-p** PROMPT] [**-o** OUTPUT] [options_]h3 -d MODELDIR_ --info
DESCRIPTION
h3 (project name h3-metal / repository h3.c) is Salvatore Sanfilippo's native MiniMax-H3 inference engine for Apple Silicon. It loads a local Hugging Face-style MiniMax-H3 checkpoint, runs the DiT and VAEs on Metal, and writes synchronized H.264 video plus AAC audio (via ffmpeg / ffprobe on PATH).Without -p, the binary starts an interactive session: type prompts to generate numbered videos while BF16 prompt conditioning and decoders stay resident. Session bang-commands such as !seed, !first, !last, !ref-image, and !help control generation without restarting.With -p, generation is one-shot. Quality and speed are controlled by independent knobs: --steps (denoising passes), --layers (active DiT blocks), --reuse or --core-reuse (how often the full denoiser runs), optional --token-reduction, and optional lower --render-width / --render-height with upscale to the final canvas. First/last-frame flags select the FL2VA path; --ref-image, --ref-video, and related flags select the ordered Ref2VA path.The tool targets Mac GPUs with large unified memory (M3/M5 class). It is not a portable Linux GPU runtime; build with make on macOS against the local model tree.
PARAMETERS
-d, --model-dir PATH
Local MiniMax-H3 checkpoint directory (required).-p, --prompt TEXT
Generation prompt. Omit to enter the interactive session.-o, --output PATH
Output MP4 path (default outputs/h3.mp4). Empty string disables encoding.--width N, --height N
Output canvas size (multiples of 32; product limited). Defaults depend on release (commonly 864×480).--render-width N, --render-height N
Smaller internal DiT/VAE canvas (same aspect), then upscale to output size.--frames N | --seconds N
Requested length. H3 aligns frames to its temporal grid at 24 fps. Mutually exclusive.--steps N
Number of denoising passes (default 20). Low budgets (for example 4–7) are for previews.--reuse N
Whole-denoiser reuse interval: 1 close, 2 fast, 3 aggressive. Mutually exclusive with --core-reuse.--layers N
Active DiT blocks: 50 exact, 45 fast, 40 aggressive.--core-reuse N
Refresh expensive core less often while keeping patch/head work fresh.--token-reduction
Pair horizontal video tokens in middle DiT blocks (faster; may change composition).--seed N
RNG seed (default 42).--first-frame PATH, --last-frame PATH
FL2VA conditioning images.--ref-image PATH, --ref-video PATH, --ref-silent-video PATH, --ref-audio PATH, --ref-video-audio VIDEO AUDIO
Ordered Ref2VA references (repeatable; order preserved).--show
Display progressive previews in Kitty/iTerm2-class graphical terminals.--profile
Print per-phase Metal timing and allocation stats.--info
Inspect model layout and Metal device without mapping all weights.-h, --help
Show the full option list for this build.
INSTALLATION
Build from source on macOS (Apple Silicon). Requires make, a C/ObjC toolchain, and FFmpeg on PATH:
cd h3.c
make -j8
./h3 --help
CAVEATS
Requires Apple Silicon with Metal, a full MiniMax-H3 weight tree (tens of GiB), and ffmpeg/ffprobe. Peak unified-memory use is large; aggressive presets trade fidelity for speed and can alter composition.--reuse and --core-reuse cannot be combined. Do not stack the most aggressive layer, reuse, and token-reduction settings without validating quality. Name collision: other ecosystems ship unrelated h3 binaries (for example geospatial H3 tooling).
HISTORY
h3-metal is a 2026 C/Metal project by Salvatore Sanfilippo (antirez), built as successive vertical slices (host metadata, Metal block parity, prompt-to-video/audio, FL2VA and Ref2VA). It targets native MiniMax-H3 inference on Mac without a Python ML stack.
