Nodes/ComfyUI MiniMax H3 Myang/沐阳 H3 · 一采成片转 Latent(内部)
ComfyUI Node

沐阳 H3 · 一采成片转 Latent(内部)

Only kept the finished clip? Re-encode it back into pass 2

By civilcoco·Created 27 days ago·Updated 4 days ago· 4
沐阳 H3 · 一采成片转 Latent(内部)
  • images
  • base_latent
  • video_vae
  • audio_vae
  • audio
  • samples
expected_frames125

Pass 1 left you with an MP4 and no latent. Now you want a second pass, and the checkpoint node has nothing to load. This is the fallback for that exact situation: take the finished clip, run it back through the VAE to reconstruct an H3 audiovisual latent, and hand that to the refine pass.

It's a genuinely useful escape hatch, and it's worse than the checkpoint in a way you should understand before you build around it.

What it does

Five required inputs:

  • images (IMAGE) - the decoded clip. Must match expected_frames exactly; if it doesn't, the node refuses and tells you the shot's duration needs to match the original pass-1 file, which is a nice way of saying "don't hand me a trimmed clip".
  • base_latent (LATENT) - the target latent for this segment. It's not copy-encoded wholesale: the node takes the audio stream from it as the default when no audio is supplied. That's the reason the input exists.
  • video_vae (VAE) and audio_vae (VAE) - both required. H3's private audio VAE is a separate model from the video VAE, and this node needs both.
  • expected_frames (INT, default 125).

Optional audio (AUDIO) - the clip's soundtrack. If you wire it, the node resamples it to the audio VAE's native sample rate and encodes it. If you don't, the audio latent comes from base_latent instead. So a silent clip still gets an audio stream; it just doesn't get one derived from the video file.

Output: samples (LATENT) - a nested tensor with the encoded video latent and the audio latent, shaped like a normal H3 AV latent so the second pass can't tell the difference.

The catch, stated plainly

This is a VAE round trip on already-decoded pixels. Your picture gets encoded, and H3's video VAE is lossy in the ways VAEs are lossy - softness in fine detail, small colour shifts. For a low-denoise refine pass that's survivable, because the second pass is going to re-synthesise a lot of that back. For a low denoise it's marginal, because you're asking the model to fix a small amount of damage you introduced.

The path you want, if you have any choice, is the checkpoint: save pass 1's latent to disk the first time and skip this entirely. The pack's own architecture treats the encode route as the fallback and the checkpoint as the good route, and that ordering is correct.

There's a second floor on quality: if pass 1's output was already through a pixel-space upscale rather than a latent-space one, this node's encode is a second lossy step on top of an interpolation. The pack's separate H3PixelUpscale exists in part because that VAE round trip is what eats a crisp RTX VSR or Lanczos result. Well - this node is the round trip, deliberately taken.

Why it exists anyway

Because workflows get shared without their intermediate files, and someone will always have the video and not the latent. Because older renders predate the checkpoint nodes. Because sometimes the pass-1 latent is on a machine you don't have any more.

It's the difference between "I can refine this old clip" and "I have to regenerate it from scratch", and at H3's scale that's a large amount of GPU time.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/civilcoco/ComfyUI-MiniMaxH3-Myang

Restart ComfyUI and hard-refresh; the node is under 沐阳 H3/内部. The pack itself declares no Python dependencies, so nothing to pip install.

One practical note: the resample path imports torchaudio inside the function, which is present in a normal ComfyUI environment but is worth knowing about if you've built a trimmed-down venv. If audio encoding fails and everything else works, that's the first thing to check.

And a general caution that this pack repeats often and is right to: troubleshoot against a plain two-segment baseline before you add refinement. Both the encode and the refine change the picture; if you've changed both at once you won't know which one hurt. Upscaling has the wider version of the two-pass trade-off.

Category沐阳 H3/内部

Inputs (6)

NameTypeDefaultDescription
imagesIMAGE
base_latentLATENT
video_vaeVAE
audio_vaeVAE
expected_framesINT125
audiooptAUDIO

Outputs (1)

NameTypeDescription
samplesLATENT