H3 Latent Slice
Cut a latent down to the frames you actually want
- samples
- LATENT
- latent_frames
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 Decodewants. - 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+.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| samples | LATENT | An H3 latent, nested (video+audio) or bare. | |
| start | INT | 0-4096–4096 | First latent frame to keep. Negative counts from the end. |
| count | INT | 00–4096 | How many latent frames to keep. 0 means everything from start on. |
| audio | COMBO | drop | '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)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |
| latent_frames | INT | Latent frames in the result. |