Nodes/comfyui-extend/LTX Flow - Extract Tail
ComfyUI Node

LTX Flow - Extract Tail

The last 17 frames of your clip are the secret to seamless LTX continuation

By balarooty·Created 4 months ago·Updated 4 months ago· 0
LTX Flow - Extract Tail
  • video_frames
  • tail_frames
  • actual_frame_count
tail_length17

LTX 2.3 will happily keep a story going - it just needs to remember where it was. That's what Extract Tail is for: it cuts the last few frames off a finished clip so the next generation can be told "start from here." It's the continuation workhorse of this pack, and it sits at the start of every Flow-style extension pipeline.

The move you're setting up is: generate clip one, grab its tail, feed that tail into the next generation as conditioning, generate clip two, trim the overlap, stitch. One clip's ending becomes the next clip's context, and you can chain that indefinitely. It's the same idea behind Google Flow's "Extend" button, and this pack exists to give ComfyUI the plumbing for it.

Why 9, 17, and 25?

The widget's tooltip says "Use 9, 17, or 25 for LTX-style continuation segments," and those aren't random. LTX 2.3 requires frame counts divisible by 8 plus 1 - 9, 17, 25, 33 - because of how the model's temporal compression packs frames. Ask for a tail that fits that cadence and the continuation math stays clean. The default is 17, which is the sweet spot for most clips: long enough to carry real motion context, short enough that the overlap you'll later trim isn't huge.

How it works

It slices the last min(tail_length, frame_count) frames off the batch and hands you back the count it actually took. The actual_frame_count output is the honest part: if your clip is only 12 frames and you asked for 17, you get 12, no error, and the output tells you so. The widget steps by 8 to keep you on the LTX-friendly cadence.

Output tail_frames is a normal IMAGE batch, so it can feed either of this pack's guide nodes, a VHS loader, or anything else that eats frames.

Install

Search "comfyui-extend" in ComfyUI Manager, or:

cd ComfyUI/custom_nodes
git clone https://github.com/balarooty/comfyui-extend

Restart ComfyUI. No extra Python dependencies - the requirements.txt is intentionally empty, and this node is pure tensor slicing, so it doesn't load models or need the LTX stack at all.

Common issues

  • Asking for more than the clip has. You get the whole clip and actual_frame_count reflects it. Not a bug, but if you wire that count downstream without looking, your overlap math goes wrong.
  • The tail is only as good as the clip's ending. If the last frames are chaotic (fast motion, a hard cut the model invented), those frames condition the next generation into chaos. When in doubt, shorten the tail or trim the clip's bad ending first.
  • Don't skip the trim step. The whole reason you extract a tail is that the next clip will re-render it. If you stitch without trimming, every join shows the previous clip's ending twice. The README's pipeline is explicit about it: Extract Tail → guide the next generation → Trim Frames → Scene Builder.

workflows/02_extract_tail.json is the standalone demo. The full recommended pipeline in the README chains this node with Tail Guide, Trim Frames, and Scene Builder - that's the pattern that turns short LTX clips into long ones.

CategoryLTXFlow/Frame Tools

Inputs (2)

NameTypeDefaultDescription
video_framesIMAGE
tail_lengthINT171–257Use 9, 17, or 25 for LTX-style continuation segments.

Outputs (2)

NameTypeDescription
tail_framesIMAGE
actual_frame_countINT