Nodes/Nynxz H3/H3 Decode Frames
ComfyUI Node

H3 Decode Frames

Pull one frame out of a video latent without decoding the whole clip

By Nynxz·Created about a month ago·Updated 26 days ago· 4
H3 Decode Frames
  • samples
  • vae
  • IMAGE
  • total_frames
index-1
count1
stride1

Decoding a whole video latent to look at one frame is absurd - you burn a full VAE pass to see a single picture. H3 Decode Frames is the node that decodes exactly the frames you ask for, reproducing the VAE's temporal chunking and cross-fade so the result is exact, not an approximation. Pulling the last frame of a 124-frame clip costs about a seventh of a full decode. Its stated purpose is the interesting part: using a video model as an edit model.

How it works

H3's VAE works in overlapping 17-frame chunks with a cross-fade between them. A naive "slice and decode" would hand you a frame with the wrong neighbours and the wrong fade. This node reproduces that chunking faithfully, so one frame costs at most two chunk decodes.

The inputs: samples (an H3 latent - the audio stream of an AV latent is ignored), vae (the MiniMax H3 video VAE), and then:

  • index (default -1) - the pixel frame to decode. Negative counts from the end: -1 is the last frame, 0 the first. The two an edit workflow usually wants.
  • count (default 1) - how many frames to take. Each costs its own chunk decode unless it shares one with a neighbour, so consecutive frames are much cheaper than spread-out ones.
  • stride (default 1) - the gap between them. count=8 stride=1 gives eight consecutive frames out of one or two chunks; count=6 stride=20 samples a clip at six points.

Outputs are IMAGE (the decoded frames) and total_frames - the count a full decode would produce, handy for arithmetic on your latent without running it.

The workflow this enables

Think of it as an edit-preview loop: sample a clip, decode just the last frame, feed it back through H3 Image as a last_frame keyframe on the next pass, and you're iterating on an ending without paying full decode every time. That's the "video model as an edit model" pitch, and it's genuinely the right tool for it. The sibling caveat: for a single frame as an image, use this rather than H3 Latent Slice - a lone latent token doesn't decode to the frame it was inside a clip.

Install

Pack install: ComfyUI Manager → "Nynxz H3", or:

cd ComfyUI/custom_nodes
git clone https://github.com/Nynxz/ComfyUI-NynxzH3

Restart. Pure Python, no dependencies, ComfyUI 0.30.0+.

The one-liner

index -1 to see how a clip ends, or count + stride to preview a spread of frames before committing to a full decode. It's exact, it's fast, and it turns the VAE decode from a cost you pay every iteration into one you only pay when you want it.

CategoryNynxz/H3/Latent

Inputs (5)

NameTypeDefaultDescription
samplesLATENTAn H3 latent. The audio stream of an AV latent is ignored.
vaeVAEThe MiniMax H3 video VAE.
indexINT-1-4096–4096Pixel frame to decode. Negative counts from the end, so -1 is the last frame and 0 the first — the two an edit workflow usually wants.
countINT11–256How many frames to take. Each costs its own chunk decode unless it shares one with a neighbour, so consecutive frames are much cheaper than spread-out ones.
strideINT11–1024Gap between them. count=6 stride=20 samples a clip at six points; count=8 stride=1 gives eight consecutive frames out of one or two chunks.

Outputs (2)

NameTypeDescription
IMAGEIMAGE
total_framesINTFrames a full decode of this latent would produce.