Nodes/H3 Motion Context Auto-Chain Addon/H3 Auto Chain Frame Reference
ComfyUI Node

H3 Auto Chain Frame Reference

The character-identity node (and why last_frame wins)

By Ltamann·Created 23 days ago·Updated 14 days ago· 39
H3 Auto Chain Frame Reference
  • chain_config
  • initial_image
  • reference_image
reference_modelast_frame

Keeping a character looking like the same person across clips is the classic video-generation nightmare, and this node is the pack's answer to the image side of it. H3 can take a reference image, so H3 Auto Chain Frame Reference hands the current clip a picture to hold onto: your original character image for clip 1, then - if you want - the previous clip's final frame for every clip after. Motion Context carries the motion and voice across the seam; this carries the face, the outfit, the scene.

The interesting part is that it's three policies in one little node, and one of them is usually wrong for you.

The three reference modes

  • last_frame (default, and the one you want) - your initial_image for clip 1, then the previous clip's extracted final frame for everything after. The character is always looking at its own recent past, which is the strongest identity anchor there is. This is the recommended mode for character and scene continuity.
  • original - the same initial_image on every clip. Use it when you want a fixed identity anchor no matter how the story drifts, or when the scene itself should stay pinned to the starting image. The downside: if the previous clip ended somewhere visually far from the original, you're yanking the character back.
  • off - the initial_image only on clip 1, then nothing. Pure Motion Context afterwards. If your Motion Context window is doing its job this can look fine and it's the cheapest option, but it leans hardest on the latent continuity and leaves you the most exposed to identity drift.

Inputs and output

Three inputs, one output - it's a small node:

  • chain_config - the H3_CHAIN output from H3 Auto Chain Audio. It tells the node which clip this is and where the previous clip's saved final frame lives (<chain>_clip_00N_last.png, extracted by the stitch node each run).
  • initial_image - the first image your H3 workflow uses as its reference. For clip 1, and for any clip where no previous final frame exists yet, this is what comes out.
  • reference_mode - the policy above.

The single reference_image output feeds the H3 reference-image input in your workflow, usually labeled something like ref_image_0. On a missing previous frame it falls back to the initial_image rather than erroring - a nice touch that keeps a partially-rendered chain runnable.

When it fights you

  • The character changes between clips anyway - the reference image is only one lever. Set reference_mode to last_frame, use a stronger shared style_prompt in the Audio node (character description, wardrobe, lighting), keep the same resolution and model settings, and make sure the previous latent is flowing through Motion Context. Reference images pin identity, but they don't fix a weak prompt.
  • Stuck on the original look mid-story - you left reference_mode on original. If the character is supposed to change costume or the scene is supposed to move, last_frame is what tracks that.
  • Reference looks wrong on clip 2 specifically - check that H3 Auto Chain + Stitch actually saved the _last.png for clip 1; no saved frame means the fallback to initial_image kicks in.

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 Pillow and numpy, both of which your H3 workflow already has, and it expects the rest of the auto-chain (Audio, Stitch, Load/Save Latent) to be present - it's not useful on its own.

Categoryconditioning/minimax

Inputs (3)

NameTypeDefaultDescription
chain_configH3_CHAINSelects the saved final frame from the previous clip. Clip 1 uses the initial image.
initial_imageIMAGEReference image used for the first clip.
reference_modeCOMBOlast_frameoriginal: use the initial image on every clip; last_frame: use the previous clip final frame; off: use the image only on clip 1, then rely on Motion Context.

Outputs (1)

NameTypeDescription
reference_imageIMAGE