Nodes/ComfyUI-Minimax-H3-Reference-Library/SKEBA H3 Motion Context Save Latent
ComfyUI Node

SKEBA H3 Motion Context Save Latent

Save H3's video-and-audio latent so the next clip can continue from it

By nikaskeba·Created 13 days ago·Updated a day ago· 2
SKEBA H3 Motion Context Save Latent
  • latent
  • latent_path
filename_prefixh3_context/clip
clip_index0

The context_latent input on SKEBA H3 Motion Context wants the previous clip's sampler output latent - picture and sound in one bundle. The problem is you can't wire a sampler straight into it: that latent belongs to the previous run, not this one, and ComfyUI correctly calls the direct connection circular. Something has to carry the latent across runs, through a file, the same way your frames and audio already cross. That something is this node's Save half, paired with SKEBA H3 Motion Context Load Latent.

It's part of the ComfyUI-H3-Reference-Library pack (a.k.a. ComfyUI-Minimax-H3-Reference-Library), under Skeba AI Nodes - Motion Context.

How it works

You feed it the same latent you already wire into your decode nodes - latent is literally "the sampler's output latent." It saves that whole AV latent to disk as a .safetensors file and reports latent_path so you can see (and reuse) where it landed. There's nothing else to it, and that's the point: H3's latent carries both video and audio streams, and stock Save Latent can't handle that paired shape. This one can.

The two settings decide how the file gets named, and they matter more than they look:

  • filename_prefix - defaults to h3_context/clip, saved under the ComfyUI output directory. Keeping the whole chain in one folder is deliberate: the Load node's "newest file" mode only works if everything's in one place.
  • clip_index - which clip of the chain this one is. Set 2 when generating clip 2. It saves to that clip's fixed slot (clip_00002.safetensors), so a re-roll overwrites its own reject instead of stacking a new file every run. 0 is the old behavior - a new numbered file every run, where the numbers count runs, not clips. If you retry with 0, you're littering.

The workflow

this run:   SamplerCustomAdvanced -> H3 Motion Context Save Latent
next run:   H3 Motion Context Load Latent -> context_latent

Both nodes have a clip_index, and the numbers mean what they say. On Save, it's the clip this one IS. On Load, it's the clip you're continuing FROM. Making clip 2 from clip 1: Load 1, Save 2. Don't like the result? Queue again, change nothing - the retry reloads clip 1 and overwrites clip 2. Happy? Bump both numbers and move on. The fixed-slot naming is the whole trick, and it's why re-rolling a chain doesn't turn into a pile of orphan files.

Installing it

ComfyUI Manager - search "Skeba" or "H3-Reference-Library" - or:

cd ComfyUI/custom_nodes
git clone https://github.com/nikaskeba/ComfyUI-H3-Reference-Library

Restart ComfyUI. No extra dependencies, no model files.

The traps

  • This output is only for context_latent. The README is explicit: don't wire it into a decode node. It's a stored generation latent, not a displayable video.
  • Use the Save/Load pair, not stock nodes. Stock Save/Load Latent can't handle H3's paired video/audio latent - this pair exists precisely because those break.
  • clip_index 0 on the Save side is run-numbered, not clip-numbered. Fine for experiments, wrong for a chain you'll retry. Give each clip a real index and the retry story stops being a mess.
  • Resolution is locked per chain while using the latent path - a latent can't be resized, so changing resolution mid-chain requires regenerating the previous clip or starting fresh. The Motion Context node will refuse rather than quietly downshift.
CategorySkeba AI Nodes - Motion Context

Inputs (3)

NameTypeDefaultDescription
latentLATENTThe sampler's output latent (the same one you wire into the decode nodes).
filename_prefixSTRINGh3_context/clipSaved under the ComfyUI output folder. The default keeps all chain latents in one folder so the Load node can always pick the newest.
clip_indexINT00–9999Which clip of the chain THIS is. Saves to that clip's fixed slot, so a re-roll overwrites its own reject instead of stacking new files. Generating clip 2: set 2 here and 1 on the Load node. 0 = old behaviour, a new numbered file every run (numbers count runs, not clips).

Outputs (1)

NameTypeDescription
latent_pathSTRING