Nodes/FXI Frame Chain/Frame Chain Step (FXI)
ComfyUI Node

Frame Chain Step (FXI)

Make clip 2 start on clip 1's real last frame

By fueledximagination·Created 22 days ago·Updated 19 days ago· 1
Frame Chain Step (FXI)
  • clip
  • chain
  • chain
  • next_start_image
  • clip_count
◄offset_from_end0►

If you've used Wan 2.2, LTX or any other image-to-video model in ComfyUI, you already know the punchline: you get about five seconds, and then it stops. That's not a settings mistake - the native context is 81 frames, roughly 5s at 16fps, and no sampler trick moves it. Everyone's workaround is the same: take the last frame of clip 1, feed it in as the start image of clip 2, and keep going. People have built 30-second clips this way, brute force, one generation at a time.

Frame Chain Step (FXI) is the node that turns that ritual into a wire. It does two jobs: it files the clip into a growing chain, and it hands out that clip's last frame as the start image for the next generation.

Why bother instead of just eyeballing it

Doing it manually isn't hard for two clips. It gets ugly at five. You end up copy-pasting a decode → image-select → resize cluster per shot, and every clip you also have to park somewhere so you can join them at the end.

The Step collapses that into one node per clip: clip in, next_start_image out for the next model call, chain out for the join at the end. Add a shot by adding one node.

How it works

ComfyUI hands images around as float tensors shaped [batch, height, width, channels], and a video clip is exactly that - one entry per frame. The node does two things with that:

  1. It appends the batch to the chain, which is just a tuple of these batches in order.
  2. It picks frame n - 1 - offset_from_end (clamped so short clips never explode) and returns that single frame as a [1, H, W, C] copy.

It's stateless: the chain you feed in is never modified, a new tuple comes out. That matters because ComfyUI caches node outputs - mutate an input and you poison the cache downstream. It's also why the node survives being dropped inside loop nodes from other packs.

Inputs and outputs that matter

  • clip (IMAGE) - the freshly decoded clip. In a Wan graph that's the output of VAE Decode.
  • chain (optional, FXI_FRAME_CHAIN) - the previous Step's chain. Leave it empty on the first clip; that's what starts a new chain.
  • offset_from_end (INT) - 0 is the literal last frame. Raise it when the final frame is soft, blurred, or blown out (Wan has a habit of washing the brightness in the last few frames of a clip; 2 or 3 often gives you a cleaner seam).

Outputs: chain (goes into the next Step, or into Stitch Clips at the end), next_start_image (goes into your next generation's start image input), and clip_count (how many clips are in the chain - surprisingly useful when you're wiring six of these).

Two things that trip people up: chain is a custom type, so only FXI nodes accept it - you can't plug it into core Image Batch; route it through Stitch Clips to get back to plain IMAGE. And the node doesn't resize anything. Keep every clip at the same resolution or Stitch Clips will stop on you.

Install

ComfyUI Manager is the easy road: open it, search FXI Frame Chain, install, restart.

# or by hand
cd ComfyUI/custom_nodes
git clone https://github.com/fueledximagination/comfyui-fxi-frame-chain.git
# restart ComfyUI

There is genuinely nothing to pip install - the pack's pyproject.toml lists no dependencies and the code only touches torch, which ComfyUI already ships. All three nodes live under FXI/frame chain in the node menu.

Want to check the install before burning GPU time? The repo ships examples/frame-chain-smoke-test.api.json - two fake clips from ComfyUI's bundled example.png, no models loaded, done in seconds.

Where people get burned

Forgetting the chain wire on the second Step. Nothing errors. The second Step just starts a brand-new chain holding only clip 2, so clip 1 quietly disappears and you find out at stitch time. Watch clip_count.

Chaining doesn't fix motion, only the cut. The model has no memory of the momentum from the previous clip - it gets one still frame. If clip 1's subject is running right, clip 2 starting from that pose will happily amble left. Write each clip's prompt as a continuation with one clear camera move, and expect brightness/grade drift to accumulate down a long chain.

An offset bigger than the clip. offset_from_end = 4096 on an 81-frame clip doesn't error, it hands you frame 1. If your seam suddenly looks like the wrong era of the shot, check that number.

CategoryFXI/frame chain

Inputs (3)

NameTypeDefaultDescription
clipIMAGEThe clip just generated, as an IMAGE batch.
offset_from_endINT00–4096Which frame to hand on. 0 = the last frame.
chainoptFXI_FRAME_CHAINThe chain from the previous Step. Leave empty on the first clip.

Outputs (3)

NameTypeDescription
chainFXI_FRAME_CHAINThe chain so far, including this clip. Connect to the next Step or to Stitch Clips.
next_start_imageIMAGELast frame of this clip. Connect to the start image of the next generation.
clip_countINTNumber of clips in the chain.