H3 Auto Chain Save Latent
The retry-safe checkpoint that keeps a chain alive
- latent
- chain_config
- STRING
The counterpart to Load Latent, and the reason a chain can survive a crashed render. H3 Auto Chain Save Latent takes the current clip's sampler output and writes it to disk as a numbered slot, so the next clip can load it and continue. Wire the H3 sampler's LATENT output into this node, connect chain_config, and every clip automatically checkpoints itself before the workflow moves on.
How the slots work
Latents land in output/h3_context/ as numbered .safetensors files:
h3_context/<chain>_clip_00001.safetensors
h3_context/<chain>_clip_00002.safetensors
h3_context/<chain>_clip_00003.safetensors
The chain_config picks the save slot automatically - the node saves what it just rendered and the next clip loads it. The retry design is the part worth understanding: to re-render a clip, set start_clip to that clip number with reset on, and the clip's own slot gets overwritten. So a rejected render is never accidentally used as the previous context - you always get a clean take, and you can re-roll a clip without redoing the whole chain. When a chain finishes, H3 Auto Chain + Stitch can delete these files for you (delete_completed_latents); until then they're your resume-and-retry insurance.
Inputs and output
latent- the H3 sampler's output latent. This is the same latent you'd normally wire into the decode nodes; here it's intercepted for checkpointing, which is fine because this is an output node and doesn't block the decode path.chain_config(optional) - fromH3 Auto Chain Audio. Connected, it overrides bothfilename_prefixandclip_indexso the right numbered slot is chosen automatically. Leave it off and you're manually managing clip numbers, which is only worth it if you're building a custom chain by hand.filename_prefix- defaulth3_context/clip; the location prefix for the slot files.clip_index- the manual clip number, ignored whenchain_configis connected.- Output
STRING- the full path of the file it just wrote, useful for logging or for manual inspection.
The one rule that matters
The saved latent is H3's paired video/audio representation, meant only for the Motion Context node's context_latent input on the next clip. Do not connect it to a VAE decode node. Do not try to load it with the stock ComfyUI Load Latent node. If you decode it you'll get either garbage or an error, and either way you've lost the continuity the whole pack is built around.
Troubleshooting
- Chain can't find a previous latent at clip N - the save for clip N-1 failed or wrote to a different folder. Same
chain_idthroughout, and make sure the Save node'schain_configis actually connected (that's what pins the slot number). - Latent files piling up in
output/h3_context/- expected. They stay until a successful final stitch withdelete_completed_latentsenabled. Deleting them by hand mid-chain is how you get the "missing previous latent, bypassing Motion Context" warning.
Install is the pack install - Manager, search "H3 Motion Context", or git clone https://github.com/Ltamann/ComfyUI-H3-Motion-Context-Auto-Chain-addon into ComfyUI/custom_nodes/, then restart. It needs safetensors (already in your H3 stack) and nothing else. One tip: don't run multiple H3 patch packs that rewrite the same ComfyUI internals - the first compatible one wins, and the others get rejected, sometimes confusingly.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | LATENT | — | |
| chain_config | H3_CHAIN | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |