Nodes/Nynxz H3/H3 Latent Slice
ComfyUI Node

H3 Latent Slice

Cut a latent down to the frames you actually want

By Nynxz·Created about a month ago·Updated 25 days ago· 4
H3 Latent Slice
  • samples
  • LATENT
  • latent_frames
start0
count0
audiodrop

Sometimes you don't want to re-sample the whole clip - you want to carve a piece out of a latent you already have and feed it somewhere else. H3 Latent Slice does exactly that: it slices an H3 AV latent along the latent-frame axis and drops or trims the audio stream to match.

How it works

Three inputs and a warning. samples is an H3 latent - nested (video+audio) or bare. start (default 0, negatives count from the end) is the first latent frame to keep, and count (default 0, meaning everything from start on) is how many latent frames to keep. audio decides what happens to the soundtrack:

  • drop (default) - returns video only, which is what a VAE Decode wants.
  • trim - keeps a proportionally cut audio stream so the result stays a playable AV latent.

Outputs are LATENT and latent_frames (the latent frames in the result - the number you need for any downstream math).

The warning

This node slices on the latent-frame axis - it's for cutting a clip into pieces to feed a continuation or an edit pass, not for extracting a single picture. For one frame as an image, use H3 Decode Frames: a lone latent token doesn't decode to the frame it was inside a clip, because the VAE's chunked decoding needs its temporal neighbours. They're siblings with different jobs, and grabbing the wrong one is a classic way to get a garbage decode and an hour of confused debugging.

The one-liner

Slice when you want to cut a latent short or hand a segment to another pass - remember audio: trim if you want it to stay playable, drop if you're about to decode. And when the goal is a single image, reach for Decode Frames instead.

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+.

CategoryNynxz/H3/Latent

Inputs (4)

NameTypeDefaultDescription
samplesLATENTAn H3 latent, nested (video+audio) or bare.
startINT0-4096–4096First latent frame to keep. Negative counts from the end.
countINT00–4096How many latent frames to keep. 0 means everything from start on.
audioCOMBOdrop'drop' returns video only, which is what a VAE Decode wants. 'trim' keeps a proportionally cut audio stream so the result stays a playable AV latent.

Outputs (2)

NameTypeDescription
LATENTLATENT
latent_framesINTLatent frames in the result.