nihui/h3-ncnn-vulkan
Standalone ncnn/Vulkan CLI for local MiniMax-H3 video and stereo audio generation
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Tracked from daily D1 telemetry snapshots. Hover any data point for exact daily star counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
h3-ncnn-vulkan is a standalone C++ CLI that runs MiniMax-H3 through ncnn and Vulkan. The text encoder and diffusion transformer (DiT) use BF16, while the vision components and VAEs use FP32. Text-to-video-and-audio (T2VA) and first/last-frame generation (FL2VA) share the DiT under transformer/fl2va/; reference-conditioned generation (Ref2VA) uses transformer/ref2va/.
The DiT fuses the gate and up projections in each feed-forward block, and the planner controls how many token rows it processes at once. Automatic weight streaming and tiled video VAE inference address memory pressure from model weights and video decoding, respectively. The CLI can combine multiple LoRA adapters with individual strengths; merged updates are accumulated in FP32 at load time, while Pika Flex Turbo evaluates its low-rank projections in Vulkan. Portable modulation banks are validated against the model fingerprint, sampling preset, and reference modalities; if none matches, the runtime computes and caches a bank.
Key Capabilities & Differentiators
The CLI generates video and stereo audio together from a text prompt, one or both endpoint images, or multimodal references. Ref2VA accepts image inputs, WebM or Matroska video references with their audio stream, and WAV or container audio references. FL2VA also accepts one experimental audio reference, with variable speaker similarity. Output is lossy WebM or lossless Matroska.
Output dimensions are configurable in multiples of 32. At 24 fps, frame requests round up to 17 × n + 5, with supported single-segment lengths of 22–345 frames. Longer FL2VA clips are assembled from adjacent keyframe pairs on one canvas, with a shared prompt or one per segment and a separate frame count per pair. Models are loaded once per stage, adjacent segments reuse their shared keyframe encodings, and the writer counts each shared boundary frame once. The default 50-point schedule runs 49 DiT forwards; supported adapters can select shorter presets.
Trade-offs & Limitations
Against stable-diffusion.cpp 20261127 over Vulkan, h3-ncnn-vulkan 20261201 records a faster second DiT step for 832 × 480, 124-frame T2VA under a 14 GiB RAM budget: 51.15 vs 83.81 s on RX9060XT and 101.46 vs 375.59 s on RTX3060. In the separate 56-frame FL2VA run on RX9060XT, exact mode takes 25.50 s per DiT step versus 46.19 s for stable-diffusion.cpp; rough mode 3 brings that to 19.43 s by freezing the full modulation path rather than using exact mode. These are step timings, not end-to-end latency or quality comparisons.
Disk streaming lowers the planned RAM requirement but shifts part of the workload onto storage. The default T2VA model set occupies about 128 GB, and paging calls for tens of GiB of additional free disk space. Under the table’s disk-streamed settings, T2VA at 832 × 480 and 124 frames is planned at 1,408 MiB RAM and 3,584 MiB VRAM, while 1920 × 1088 at 243 frames rises to 3,200 MiB RAM and 26,496 MiB VRAM. Use --estimate-memory for the actual job rather than treating a table row as a hardware guarantee.
Hardware & Deployment Guide
Release ZIPs target Linux x86-64 (glibc 2.28 or newer), macOS on Apple silicon and Intel, and Windows x86-64. Inference requires a Vulkan-capable GPU and driver, but not CUDA, PyTorch, Python, or FFmpeg. Once the executable and workflow-specific assets are staged, generation runs locally. The default model directory is models/h3; use -m for a different location. Retain the fixed-build files to validate prepared modulation banks and compute banks for other schedules.
Source builds initialize the pinned submodules and build from src/ with CMake and Ninja; the bundled build compiles ncnn and static media libraries. An installed ncnn can be selected with USE_SYSTEM_NCNN=ON if it supports Vulkan and batching. Windows bundled builds use MSYS2 UCRT64; the macOS build takes a MoltenVK library path. The release listing moves from 20261127 to 20261201, and the benchmark tables use 20261201 for this engine. The supplied release entries do not identify what changed between the two versions.
Teams scripting local MiniMax-H3 generation on Vulkan workstations, especially when keyframe continuity or audio and video references matter and there is room to stage large model files.
You need a ready-to-serve API, have limited disk space, or need predictable end-to-end turnaround without benchmarking your target hardware and generation settings.
Quick Start & Installation
hf download nihui-szyl/h3-ncnn --local-dir models \ --include 'h3/LICENSE' \ --include 'h3/NOTICE' \ --include 'h3/processor/*' \ --include 'h3/text_encoder/*' \ --include 'h3/vae/decoder.ncnn.*' \ --include 'h3/audio_vae/decoder.ncnn.*' \ --include 'h3/transformer/fl2va/transformer-core.ncnn.*' \ --include 'h3/transformer/fl2va/fixed-build/modulations.ncnn.*' \ --include 'h3/transformer/fl2va/fixed-modulations-bf16-steps50-none.bin'
Comparison vs. Top Voice, Vision & Video Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| h3-ncnn-vulkan ★ | 1.7k | +1.7k | C++ | Apache-2.0 | Standalone ncnn/Vulkan CLI for local MiniMax-H3 video and stereo audio generatio |
| whisper.cpp | 55.8k | +292 | C++ | MIT | Native C/C++ Whisper inference for offline speech-to-text on CPUs and accelerato |
| faster-whisper | 27.2k | +147 | Python | MIT | Local Whisper transcription with CTranslate2 for CPU and GPU |
| fish-speech | 34k | +84 | Python | — | Self-hosted PyTorch speech inference for directed, multi-speaker audio |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/nihui/h3-ncnn-vulkan.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about h3-ncnn-vulkan
How should an application integrate the engine and select model assets?
h3-ncnn-vulkan as a subprocess, select t2va, fl2va, or ref2va with -t, and set the model directory with -m and the output file with -o. T2VA and FL2VA share transformer/fl2va/; Ref2VA requires transformer/ref2va/ and the assets for its reference inputs. The documented integration surface is a CLI, not an HTTP API.How much GPU memory and disk space should I plan for?
--estimate-memory with the intended dimensions, frame count, prompt, and references. For disk-streamed T2VA at 832 × 480 and 124 frames, the planning table gives 1,408 MiB RAM and 3,584 MiB VRAM. Those are estimates for that configuration, not total machine requirements. Budget separately for the roughly 128 GB default T2VA model set and for paging; point H3_WEIGHT_TMPDIR at a disk-backed directory with tens of GiB free.Can I self-host it commercially or ship it with the model weights?
LICENSE and NOTICE; review those terms separately before commercial use or redistribution, and check any LoRA adapter licenses as well. Local inference does not require a hosted API, but that is an operational property, not a grant of rights to the weights.Does it outperform stable-diffusion.cpp on MiniMax-H3?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy