LTX Flow - Extract Frame
Grab any frame out of an LTX clip — it's smarter than it looks
- video_frames
- frame
- resolved_index
One frame out of a finished clip. That's all this node does, and it's the thing that makes LTX 2.3's "Frames to Video" trick possible. Every time you see a workflow that ends one shot and starts another with the same last frame, an Extract Frame node is sitting in the middle doing the handoff.
Here's why you need it specifically for LTX. The 2.3 model is a first-frame/last-frame model - give it a start image, an end image, and a prompt, and it invents the motion in between. The whole continuation style this pack is built around depends on pulling that end image out of the previous clip and feeding it forward. index = -1 grabs the last frame for exactly that job; index = 0 grabs the first.
How it works
Under the hood it's one line of tensor slicing with a wrapper: it takes the frame count of your IMAGE batch, resolves your index with index % frame_count, and slices out that single frame. The modulo is the clever bit - it means negative indices wrap cleanly instead of erroring, so -1 is always "the last frame" no matter how long the clip is, and even something like -200000 on a short clip won't throw, it'll just land somewhere sensible. There's no VAE round trip, no resampling, no decoding - it's free.
The inputs that matter
Only two, and you'll only touch one:
video_frames- any IMAGE batch, typically straight out of an LTX video decode or a VHS loader.index--1for the last frame,0for the first, or any positive/negative value. That's the whole widget.
You get two outputs: frame (the single image) and resolved_index, an INT telling you which actual frame you landed on. The second one is easy to ignore and worth wiring up once - when you're debugging why a weird index produced a weird frame, it tells you the truth instead of making you count.
Install
Search "comfyui-extend" in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/balarooty/comfyui-extend
Restart ComfyUI. This pack has no extra Python dependencies - its requirements.txt is deliberately empty, and the nodes only touch tensors through the host ComfyUI/PyTorch install. Extract Frame in particular loads no models at all; it works on any clip you already have.
Common issues
- Empty batch error. Feed it zero frames and you get a
ValueErrorabout an empty frame batch. Usually means a video loader upstream produced nothing - check the loader, not this node. - "I expected the last frame but got something else." Check
resolved_index. If you setindexto something like-100000it wraps to a real position; the output tells you which. - It's a still, not a re-render. The frame you pull is exactly as good as the clip you pulled it from. If the clip's last frame is a smeared mess (LTX is prone to it on fast motion), the frame you feed forward is a smeared mess too - grab an earlier frame instead.
The pack's workflows/01_extract_frame.json shows the standalone version, and 04_ltxflow_first_last_wdc_ltx23.json shows the real use: two Extract Frame nodes (index 0 and -1) feeding the First/Last Guide. That second workflow is the one the README recommends as your first real test.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| video_frames | IMAGE | — | |
| index | INT | -1-100000–100000 | -1 returns the last frame, 0 returns the first frame. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| frame | IMAGE | — |
| resolved_index | INT | — |