Last Frame Extract (FXI)
Pull the exact frame your clip died on
- images
- video
- last_frame
- frame_count
Last Frame Extract (FXI) is the small, boring, unreasonably handy one of the three. One clip in, one frame out. No chain, no state, no opinions.
You want it whenever you need the last frame as an image rather than as a step in a chain: grabbing clip 1's final frame to seed clip 2's image-to-video generation, pulling a still off an upscaled or interpolated clip instead of the raw one, or just saving a thumbnail. If you only ever chain two clips, this node plus a Load-Image-style input on the second generation is the whole technique - you don't need the Frame Chain Step machinery.
How it works
ComfyUI passes images as float tensors shaped [batch, height, width, channels] with values in 0-1, and a generated clip is one of those where the batch axis is time. The node normalises whatever you hand it into that shape (a lone [H, W, C] frame gets promoted to a batch of one), then grabs index frame_count - 1 - offset_from_end and returns it as a one-image batch. Offsets past the start of the clip clamp to frame 0 instead of raising, so a too-short clip won't kill your queue.
frame_count is returned before the offset is applied - it's the length of what came in, not of what went out.
The inputs and outputs
offset_from_end (INT) is the only required input, and it's the one you'll actually touch. 0 is the final frame; raise it to skip a soft or blurred one. In practice you'll raise it more than you'd expect - Wan clips tend to brighten or bloom over their last handful of frames, and seeding the next generation with a washed-out frame bakes that drift into the next clip. Try 2 or 3 when your seams glow.
Then you get a choice of source, both optional:
images(IMAGE) - a clip as an IMAGE batch, e.g. straight off VAE Decode. This one wins if you connect both.video(VIDEO) - a native ComfyUI VIDEO object, e.g. from Load Video. Used only whenimagesis empty.
Outputs are last_frame (IMAGE, a one-image batch that goes anywhere an image goes - start image, Save Image, Image Scale) and frame_count (INT). Don't sleep on frame_count: it's a free sanity check that your clip is the length you think it is. If you asked for a frame count that isn't a valid size for the model's VAE time compression, the decode can hand back a couple of frames fewer than you requested, and this tells you without squinting at a preview.
Install
ComfyUI Manager → Custom Nodes Manager → search FXI Frame Chain → install → restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/fueledximagination/comfyui-fxi-frame-chain.git
# restart ComfyUI
No dependencies to install: the pack uses only torch, which ComfyUI already provides. The node shows up under FXI/frame chain. The repo's examples/frame-chain-smoke-test.api.json needs no models at all if you want to confirm it's loaded and wired correctly before a real render.
Common issues
"video input does not expose get_components()" - you fed it a VIDEO object from a third-party node that isn't ComfyUI's native video type. The node pulls frames via the core video interface; for anything else, connect the IMAGE batch (the decoded frames) to images instead.
"connect either images or video" - you connected neither. Easy one.
Both connected, video updates ignored. images takes priority, silently. If you're editing a Load Video upstream and nothing changes, that's why.
A batch of stills isn't a clip. images is treated as one clip whose frames are the batch, so feeding it four unrelated images gives you the last image, not four last frames. That's correct behaviour, just not what people sometimes expect.
Resolution creep. Whatever frame comes out is at the resolution of the clip you fed it. If you extract from an upscaled clip and later stitch that generation next to the originals, you now have mismatched sizes to deal with - decide up front whether you're chaining before or after the upscale.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| offset_from_end | INT | 00–4096 | 0 = the last frame. Raise it to skip a soft or blurred final frame. |
| imagesopt | IMAGE | A clip as an IMAGE batch, e.g. the output of VAE Decode. | |
| videoopt | VIDEO | Or a VIDEO, e.g. from Load Video. Used when images is not connected. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| last_frame | IMAGE | The selected frame as a one-image batch. |
| frame_count | INT | Number of frames in the input clip. |