ComfyUI Node

H3 Context

Pin a run of consecutive frames from a previous clip as never-denoised conditioning rows, so the model reads real motion instead of guessing it from a single still.

By Adudeguyman·Created 16 days ago·Updated 6 days ago· 15
H3 Context
  • conditioning
  • latent
  • vae
  • context_frames
  • context_latent
  • audio_vae
  • context_audio
  • conditioning
  • trim_frames
  • latent
context_length22
encode_modevideo
anchor_modehead
cropdisabled
audio_context_length22
audio_modetimeline
video_sourcelatent
seed_headtrue
head_hold1.00
enabled
Categoryconditioning/minimax

Inputs (17)

NameTypeDefaultDescription
conditioningCONDITIONING
latentLATENT
context_lengthCOMBO22Frames of the previous clip to carry over. Only these land on the VAE grid, so the pinned run always ends exactly at the clip's last frame. Bigger = smoother join, less new content: 56 spends ~2.3s of the new clip re-treading the old one. 1 is effectively last-frame chaining, useful as a baseline.
encode_modeCOMBOvideovideo: one VAE call, motion lives inside the latent, fewer rows. frames: one call per frame, each pinned as a separate still.
anchor_modeCOMBOheadhead: pinned frames occupy the first indices and come back in the output, so trim them. before: negative indices, nothing wasted, but the coordinates overlap the text rows.
cropCOMBOdisabled2 options: disabled, center
audio_context_lengthINT220–240Frames of tail audio to pin, independent of the video window. 0 follows context_length. In timeline mode the window is END-aligned with the pinned video, so 22 with a 22-frame video window overlays it exactly; longer windows extend backwards into vacated coordinate space (untested).
audio_modeCOMBOtimelinetimeline: pinned audio gets coordinates on this clip's own timeline, end-aligned with the pinned video, so the model reads it as this clip's sound so far and continues it. ref: stock placement in a span before the clip, which the model imitates (similar music, not phase-locked) rather than continues.
video_sourceCOMBOlatentframes: pin decoded frames from context_frames (one VAE encode; each link adds a decode/encode round trip, which drifts color slightly down a chain). latent: EXPERIMENTAL - slice the pinned video straight from context_latent's tail, no VAE round trip at all, matching what the audio already does. Needs context_latent wired and the same resolution as the new clip; context_frames and encode_mode are ignored.
seed_headBOOLEANtrueLatent path only. Also writes the pinned steps INTO the clip's starting latent and hold them there while sampling (temporal inpainting), so the sampler's trajectory starts from the previous clip's actual state instead of noise that is merely conditioned toward it. Wire this node's latent OUTPUT into the sampler for this to take effect.
head_holdFLOAT1.000–1How firmly the seeded head is held. 1.0 keeps it exactly; lower values let the model repaint it slightly, which can ease the release at the boundary. On stock ComfyUI this grades the pixels only; with upstream PR #15375 applied it also grades how the held rows are conditioned.
vaeoptVAEVideo VAE, used ONLY to encode context_frames when video_source is 'frames'. The latent path never encodes anything, so leave this unwired there.
enabledoptBOOLEANWire the Project Hub's chain_active here. False makes this node (and, via trim_frames=0, the Trim node) pass everything through untouched, so clip 1 of an empty project renders with no manual bypassing at all.
context_framesoptIMAGEDecoded frames of the previous clip. Required when video_source is 'frames'; ignored on the latent path.
context_latentoptLATENTPrevious clip's SAMPLER OUTPUT latent (the same one you wire into the decode nodes). When supplied, the pinned audio is sliced straight from it, skipping the decode/re-encode round trip that dulls sound a little more at every link of a chain. Takes priority over context_audio; audio_vae is not needed on this path.
audio_vaeoptVAEH3 audio VAE. Supply with context_audio to carry the previous clip's tail sound across the join. Not needed when context_latent is wired.
context_audiooptAUDIOAudio of the previous clip. The tail matching the pinned frames is encoded and pinned alongside them. Ignored when context_latent is wired.

Outputs (3)

NameTypeDescription
conditioningCONDITIONINGconditioning with the pinned context applied
trim_framesINTframes of re-tread for H3 Context Trim
latentLATENTthe clip's latent, passed through - or, with seed_head on, seeded at its head with the pinned steps and carrying a noise mask that holds them during sampling. Wire THIS into the sampler when seeding; otherwise it is identical to the input.