H3RelaySourceHistory
The fixed 18-frame memory that holds a removal together
- conditioning
- vae
- latent
- previous_frames
- previous_audio
- audio_vae
- CONDITIONING
- LATENT
Ask any video model to hold a shot together past its native window and you find the same wall: it has no memory of the previous chunk. H3's answer is sliding history - regenerate a boundary frame, carry past frames as context, and the continuation lands on the same shot instead of a new one.
H3RelaySourceHistory is where H3 Relay applies that to person removal. Internal node, created per continuation window by H3 Relay Person Remover. If you're here from a graph or an exception, this is the piece that makes window two look like a continuation of window one instead of a fresh scene with the same background.
What it does
It takes the window's Ref2VA conditioning and empty latent and extends them to carry generated video and audio history - the frames the model already produced for the previous window - then hands back conditioning and latent shaped so the sampler denoises the new target only. The history is prepended, the boundary frame is repeated, and the sampled target is shortened back to the window size, which is exactly why the removal wrapper asks native H3 for window_frames + 17 frames and still delivers window_frames.
Two deliberate design decisions stand out:
The history is hardwired to 18 frames. There's no history_frames input, unlike the character-swap sibling. Eighteen frames at 24 fps is the validated removal window's worth of past, and the author pinned it rather than exposing another number to get wrong. The state it builds declares the continuation mode sliding_history, context length 18, crop disabled and generated_audio mode - meaning the carried audio is the model's own, not your source soundtrack.
It fails closed. After computing the contraction it asserts that exactly one frame is trimmed and that the audio contract holds; if either check moves, it raises H3 Relay history contract changed; refusing to sample instead of rendering. That's an unusually good instinct for this ecosystem. A silently misaligned history doesn't crash - it gives you a video that's a frame or two off, audio that creeps out of sync, or a visible double-hit at every seam, and you find out after the render.
Inputs and outputs
Required, all wired by the parent node: conditioning (the Ref2VA conditioning for this window), vae, latent (the window's empty latent), previous_frames (generated video history from H3RelayRemovalWindow's history_frames), previous_audio (matching generated audio) and audio_vae.
Outputs are CONDITIONING and LATENT - they replace the raw encode inside the sampler chain. That's it. No model loading, no decode, nothing you'd want to bypass.
Distinguishing the two history nodes
Worth bookmarking if you're reading a graph: H3RelayEditHistory is the same idea for character swap and does take a history_frames value (0, 1 or 17k+1), because the edit workflow lets you choose between independent windows, boundary-only, and full sliding history. H3RelaySourceHistory is the removal flavour with the 18-frame contract baked in. Same mechanism underneath, different contract on top.
Install
In the pack, nothing extra:
cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/akatz-ai/h3-relay.git
or Manager → H3 Relay. ComfyUI 0.32.0+ (0.37.0 is what removal was validated on), FFmpeg on PATH, MiniMax H3 weights per the pack's MODELS.md. No pip dependencies; the pack's pyproject.toml lists an empty dependency set, which is why installing it doesn't risk your environment the way most 2026 video packs do.
When it goes wrong
H3 Relay history contract changed; refusing to sample.The upstream H3 history implementation returned a shape this node doesn't recognise - a ComfyUI build or H3 node version that has moved. Update the pack; don't try to patch around it, because the check exists to stop a subtly-wrong render.- Long continuations need native history anchors. H3 Relay ships a guarded compatibility layer for ComfyUI builds that predate native H3 history support. It self-tests before activating, leaves ordinary layouts alone, and fails closed if another extension owns the same hook. If you see it refuse, you're on a build whose H3 layout it can't safely patch - update ComfyUI.
- History is memory. Eighteen frames of video plus audio across two VAEs is not free on the conditioning side; this is one reason a 22-frame removal window is the default rather than something bigger.
- Seams that still move. If the reconstruction is stable but the background shifts slightly at each boundary, the history contract isn't the problem - that's a whole-frame edit re-inventing pixels, which is intrinsic to the method. See the person remover page for the mitigation list.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| conditioning | CONDITIONING | — | |
| vae | VAE | — | |
| latent | LATENT | — | |
| previous_frames | IMAGE | — | |
| previous_audio | AUDIO | — | |
| audio_vae | VAE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | — |
| LATENT | LATENT | — |