Nodes/VELVET VICE — MiniMax H3/VELVET VICE MiniMax H3 — Re-Encode AV Prepare
ComfyUI Node

VELVET VICE MiniMax H3 — Re-Encode AV Prepare

Re-packaging H3's [video, audio] latent so the second pass is even legal

By Velvet-Vice·Created 10 days ago·Updated 7 days ago· 2
VELVET VICE MiniMax H3 — Re-Encode AV Prepare
  • base_latent
  • reencoded_video_latent
  • latent

Here's a thing about MiniMax H3 that catches people off guard: its latents aren't one video tensor. Because H3 generates audio together with the picture, its latent is a NestedTensor pair - [video, audio] - and H3 sampling expects to receive that structure. Feed it a plain video-only latent and you're in for a confusing failure. This node is what makes sure the fancy refine path doesn't do that.

The problem it solves

The Quality Refine feature in this pack (v1.5.0) can refine your render at higher resolution via a Decode → Upscale → Re-Encode route: pass-1 video is decoded to frames, resized, then VAE-encoded again. That re-encode produces a video-only latent at the new resolution - which is a problem twice over. It isn't in the [video, audio] shape H3 sampling demands, and while you were busy resizing frames, the pass-1 audio quietly fell out of the picture entirely.

VelvetViceMiniMaxH3ReencodeAVPrepare is the reconciliation step. It sits between the VAE re-encode and the second sampler, and its whole job is rebuilding a valid H3 AV latent: the freshly re-encoded higher-resolution video tensor on one side, the original pass-1 audio carried forward on the other.

Inputs and outputs

  • base_latent - LATENT. The true pass-1 AV latent, the one straight out of the first H3 sampler.
  • reencoded_video_latent - LATENT. The video-only latent from re-encoding the upscaled frames.
  • Output: latent - a rebuilt [video, audio] NestedTensor ready for pass 2.

The mechanism reads cleanly in the source: it unpacks base_latent, grabs the audio stream (index 1 of the pair), and if the re-encoded latent is itself a NestedTensor it keeps the video part; then it assembles NestedTensor([reencoded_video, base_audio]) in the official H3 order.

What's nice is how it fails. If base_latent isn't the nested AV structure, or has no audio stream, it raises a clear [VELVET VICE] RuntimeError telling you exactly that - instead of letting a malformed latent wander into the sampler and explode six nodes later. If you're hand-building this chain, that error is your checklist item: base_latent must come from the pass-1 sampler, not from some intermediate.

Do you need it?

Only if you're running the re-encode refine path, which you opt into via the System Hub's re-encode toggle and scale - off by default, and when it's off this node never executes thanks to the pack's lazy bypass. Inside the shipped v1.5.0 workflow it's pre-wired, so the practical take is short: if you're doing video-quality refinement at higher resolution, keep the pass-1 audio by leaving Preserve Base Audio on and let this node (plus its merge sibling) do the structural heavy lifting. Note this is about local H3 weights - which, if you're in the US, EU, UK or Korea, the Community License doesn't let you run anyway.

Installing the pack

This node is part of the Velvet Vice MiniMax H3 pack. Install via ComfyUI Manager (search velvet-vice-minimax-h3), or:

cd ComfyUI/custom_nodes
git clone https://github.com/Velvet-Vice/velvet-vice-minimax-h3

Restart ComfyUI. No extra pip dependencies - the pack leans on ComfyUI's own nested-tensor support, which means your ComfyUI build needs to be new enough to run MiniMax H3 in the first place, with the H3 model and video/audio VAEs installed.

CategoryVELVET VICE/MiniMax H3/Internal

Inputs (2)

NameTypeDefaultDescription
base_latentLATENT
reencoded_video_latentLATENT

Outputs (1)

NameTypeDescription
latentLATENT