Nodes/Trent Nodes/H3 Repack AV Latent
ComfyUI Node

H3 Repack AV Latent

Your saved H3 latent won't plug into VAE Decode. This fixes it.

By TrentHunter82·Created 9 months ago·Updated 3 days ago· 39
H3 Repack AV Latent
  • latent
  • latent

MiniMax H3 is the odd video model out in one very good way: it isn't a silent image generator with an audio pass bolted on. It's omni-modal - video and its synced stereo audio are generated as one thing, and ComfyUI carries them together inside a single LATENT whose samples are a [video, audio] pair. That's the whole reason nodes like VAE Decode are handed two streams instead of one.

The catch is that not every node in the H3 ecosystem hands you that pair in the same shape. The H3 Motion Context Load Latent node (from ComfyUI-H3-Motion-Context-MultiRef) deliberately returns its two streams as a plain Python list - deliberately, per its design, so you can't accidentally wire a cross-run latent into something that expects the real thing. The MMH3Tools nodes (MMH3SplitAV, MMH3TrimAV, MMH3ConcatAV, and friends) demand the proper NestedTensor pair instead, and their unpack_av() refuses the plain list with a message you will eventually meet: "is a plain latent, not a MiniMax H3 AV latent."

That's the exact gap H3 Repack AV Latent exists to close. It's a one-in, one-out bridge node for when a latent crosses a workflow boundary - a Meta Batch requeue, a manually chained run, or a fresh session where you reload something saved earlier - and lands on the wrong side of that shape mismatch.

What it actually does

The entire node is one latent in and one latent out, and the tooltip tells you what you're allowed to feed it: an H3 AV latent whose samples are a plain [video, audio] list. Under the hood it rewraps that list as comfy.nested_tensor.NestedTensor - the structure the MMH3Tools nodes and VAE decode expect - then hands it back.

Two behaviors worth knowing before you reach for it:

  • Already a NestedTensor? Passed through untouched. The node checks the type first. So you can drop it into a workflow unconditionally - a bridge that's only active when there's a gap - rather than building a conditional branch around "did this come from the loader or from a decode?"
  • It's picky, on purpose. It checks for exactly two streams and errors with an actionable message if you hand it one or three ("expected [video, audio], got N stream(s)"). It also verifies the first stream is a 5D video latent [B, 24, T, h, w] before wrapping. And a plain single-tensor latent - an ordinary image or silent-video latent with no audio stream - cannot be repacked, and it says so rather than silently guessing.

So the workflow is: produce an H3 AV latent in one run, save or carry it across, load it back via H3 Motion Context Load Latent, run it through this node, and then split, trim, or decode to your heart's content. Where people get burned is skipping the repack and wiring the plain-list latent straight into an MMH3Tools node or VAE Decode - you get that "is a plain latent" error and a head-scratch about why a LATENT socket won't take a LATENT.

Install

It ships in TrentNodes ("Trent Nodes" in ComfyUI Manager, or comfy node registry-install trentnodes). Manual path:

cd ComfyUI/custom_nodes
git clone https://github.com/TrentHunter82/TrentNodes.git
cd TrentNodes && pip install -r requirements.txt

Restart ComfyUI after. The node needs no extra dependencies itself - NestedTensor is core ComfyUI - but it's only useful inside the H3 ecosystem, which is a heavier lift: the H3 weights (~42.5 GB for the full release, so check your VRAM appetite), the H3 loader/sampler nodes, and the MMH3Tools pack if you're splitting or trimming downstream. It lives under Trent/MiniMax.

One honest caveat from the model itself: H3's open weights ship under the MiniMax H3 Community License, which excludes the US, EU, UK and South Korea from its territory - users there aren't licensed to run the local weights at all. This node is pure latent plumbing and has no opinion on any of that, but it's worth knowing before you build a pipeline around the local path. If you're in a licensed region and juggling cross-run H3 latents, this is the two-minute fix that unblocks an entire second half of your workflow.

CategoryTrent/MiniMax

Inputs (1)

NameTypeDefaultDescription
latentLATENTAn H3 AV latent whose samples are a plain [video, audio] list — e.g. the output of H3 Motion Context Load Latent. NestedTensor latents pass through unchanged.

Outputs (1)

NameTypeDescription
latentLATENT