Nodes/comfyui-minimax-h3-audio-T8/MiniMax H3 TRT VAE 本机编译 (T8 EXP)
ComfyUI Node

MiniMax H3 TRT VAE 本机编译 (T8 EXP)

12GB free VRAM, 24GB RAM, and a long coffee break

By T8mars·Created about a month ago·Updated a day ago· 1,031
MiniMax H3 TRT VAE 本机编译 (T8 EXP)
    • engine_directory
    • report_json
    kinddecoder-flex
    runtime_directory
    timeout_seconds1800

    TensorRT engines are hardware-specific. There is no download that works - the engine has to be built on the machine that will run it, against that machine's GPU, driver and runtime versions. That's what this node is for: a one-shot, serial, out-of-process compile you run when you're setting up, and then never again.

    Set expectations first, because this is the expensive step of the TRT VAE route. Compiling requires at least 12000 MiB of free VRAM, 24 GiB of free RAM and 20 GiB of free disk, it runs alone (nothing else sampling on the GPU), and it's the reason the pack ships a file check and a separate decoder-only node that most people should prefer. If you were hoping to shave a couple of seconds off a clip, walk away now.

    What it does

    Pick a kind: decoder-flex is the recommended one, and the tooltip explains why - a flex decoder is what you need for single frames or small sizes, since the fixed-shape decoder can't handle them. The others are decoder (the plain graph), encoder-t1 and encoder for the full encode path, and decoder-w4a16, a quantised variant whose output the author reviewed as broadly acceptable but with noticeably larger deviation, and with no promise of lower VRAM or higher speed.

    runtime_directory blank means ComfyUI/models/vae/h3_trt/runtime/site-packages, the isolated TensorRT install. timeout_seconds defaults to 1800 and bounds one compile; cancellation ends that subprocess only, and it does so leaving your existing engines alone. If a build fails - or the machine drops below the memory floor mid-run - the node stops the child and keeps the previous engine rather than leaving you with a half-written one.

    Outputs are engine_directory and report_json. Builds are recorded under output/MiniMaxH3/TRT-VAE/builds/<number>.

    Before you run it

    Files in place, checked by the installation node, and the ONNX graphs prepared. The flex graph is not a download - you generate it locally from the decoder ONNX with the bundled CPU tool, which only rewrites input/output shape declarations and verifies hashes on the way:

    <ComfyUI-Python> trt_vae_prepare_flex.py --source <ComfyUI>/models/vae/h3_trt/minimax_h3_vae_decoder.onnx --output <ComfyUI>/models/vae/h3_trt/minimax_h3_vae_decoder_flex.onnx --report <ComfyUI>/models/vae/h3_trt/flex-preparation.json
    

    Only the full encode path needs the extra T1 graph, exported from your native VAE weights with trt_vae_prepare_t1.py. That step uses the GPU briefly and must be serial too. If you have no use for TRT encoding - and per the next two nodes, most people don't - skip it entirely.

    Then compile one kind at a time, and refresh the model lists in ComfyUI afterwards so the new engine folder shows up in the decoder node's dropdown.

    Install

    Manager → search MiniMax H3 Audio T8, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/T8mars/comfyui-minimax-h3-audio-T8.git minimax-h3-audio-T8
    

    Restart fully. The pack installs no Python packages by design; the TensorRT runtime goes in with an explicit --target so it can't replace ComfyUI's Torch and CUDA:

    <ComfyUI-Python> -m pip install --target <ComfyUI>/models/vae/h3_trt/runtime/site-packages tensorrt-cu13==10.13.3.9.post1
    

    The traps

    Engines are bound to the runtime directory and file identities they were built against. Move the folder, change the driver, change the TensorRT build, or rebuild on another card, and you rebuild. The node will not quietly recompile when you hit Generate - it fails instead, which is the behaviour you want, because a silently recompiling node would also silently change what your workflow is doing.

    Don't scatter engine files around, either. model.engine belongs with its manifest.json under h3_trt/engines/<build>/, not in diffusion_models, and copying an engine between machines is the classic way to waste an afternoon on an error that says nothing about mismatched hardware.

    Finally: the reference TRT path is a Windows, single RTX 4060 Ti 16GB, Python 3.12, PyTorch 2.10/cu130, TensorRT 10.13.3.9 setup. Other combinations may well work, but nothing in the pack claims they were tested.

    CategoryT8/MiniMax H3/Acceleration/TRT VAE

    Inputs (3)

    NameTypeDefaultDescription
    kindCOMBOdecoder-flex推荐flex解码;W4A16已审短片整体可接受,但量化差异更大,不承诺省显存或更快。
    runtime_directorySTRING留空使用models/vae/h3_trt/runtime/site-packages。
    timeout_secondsINT18001–3600单次编译时间上限。编译需要至少12000MiB空闲显存和24GiB空闲内存。

    Outputs (2)

    NameTypeDescription
    engine_directorySTRING
    report_jsonSTRING