Nodes/comfyui_AcademiaSD/Academia SD Keyframe Video ๐ŸŽž๏ธ
ComfyUI Node

Academia SD Keyframe Video ๐ŸŽž๏ธ

First frame, last frame, and the loop in between โ€” keyframe-driven video without the cable spaghetti

By AcademiaSDยทCreated about a year agoยทUpdated 4 days agoยท 76
Academia SD Keyframe Video ๐ŸŽž๏ธ
    • FF Image
    • LF Image
    • FPS
    • Duration
    • Path
    โ—„output_prefixtest/rosarojaโ–บ
    โ—„fps24.0โ–บ
    โ—„index1โ–บ
    โ—„kf_data[]โ–บ

    If you've ever tried to make a long video with LTX Video, Wan, or SVD, you know the pain: these are first-frame/last-frame models, and the moment you need more than two keyframes you're manually swapping Load Image nodes, retyping frame counts, and hoping the next clip lines up with the last. This node is a keyframe manager for exactly that job. You drop a stack of images into the node's own drag-and-drop UI, tell it how many frames each transition should run, and it hands you the right pair of images for each step - plus the FPS, the frame count, and the save path the rest of your video workflow needs. It turns "animate these five keyframes" into one run loop instead of an afternoon of rewiring.

    How it works. The node keeps its keyframe list - each entry an image plus a frames duration - as JSON in a hidden kf_data widget. You never type that by hand; the frontend fills it as you add and drop images. On each execution, index selects which transition you're on. At index 1 it outputs keyframes 0 and 1 as the first frame (FF Image) and last frame (LF Image). Here's the clever part: from index 2 onward it scans your output folder for the last frame it already rendered that matches your output_prefix, and feeds that back in as the new first frame. Your previous video's last frame becomes the next video's first frame.

    That chaining is the whole point, and it's not a gimmick - it's the community's actual trick for long, consistent animation. Wan users landed on generating clips from keyframe images specifically because it keeps every frame only one step removed from the original source, avoiding the quality decay of re-rendering a video's own output over and over. LTX has supported start-and-end-frame conditioning since 0.9.5 for the same reason: give the model both bookends and it only has to guess what's between.

    The inputs that matter (there are only four, and one is hidden):

    • output_prefix - where rendered frames land, e.g. test/rosaroja writes into your output folder. Keep it constant across the loop, because the node matches it with a regex to find your last rendered frame.
    • fps - 0.1 to 240, default 24. Passed straight through so your video saver and sampler agree.
    • index - which keyframe pair to work on. This is your loop variable; increment it each queue.
    • kf_data - the hidden JSON keyframe list, maintained by the UI.

    Outputs and where they go: FF Image and LF Image feed your video model's first/last-frame conditioning (an LTX I2V node, Wan, whatever you run). Duration is the target keyframe's frame count - drive your sampler's length with it. FPS feeds the video combine/save node. Path is the string to reuse as the save prefix, which is how the frame that becomes your next first frame gets written where the node expects it.

    Install. ComfyUI Manager โ†’ search comfyui_AcademiaSD โ†’ install โ†’ restart. Or manually: cd ComfyUI/custom_nodes && git clone https://github.com/AcademiaSD/comfyui_AcademiaSD and restart. No extra Python dependencies for this node - it's frontend plus stdlib. One thing to know about the pack: it's a single creator's set (the Academia SD YouTube channel), and there's no big community behind it, so don't expect a lively troubleshooting forum - the GitHub issues page is your best bet if something's off.

    Gotchas. You need at least two keyframes; if the JSON is missing or malformed the node just returns blank 64ร—64 tensors, which in practice means black video - so if output goes dark, check your keyframe list. The whole node is frontend-heavy: if the pack's JS doesn't load you get a stub that does nothing useful, and in headless/automation runs there's no drag-and-drop UI, so you'd have to write the JSON into kf_data yourself. And remember the node renders nothing - it's a controller. The actual frames exist only because your video workflow saves them under output_prefix, which is what makes the next loop step possible.

    CategoryAcademia SD

    Inputs (4)

    NameTypeDefaultDescription
    output_prefixSTRINGtest/rosarojaโ€”
    fpsFLOAT24.00.1โ€“240โ€”
    indexINT11โ€“1000โ€”
    kf_dataSTRING[]โ€”

    Outputs (5)

    NameTypeDescription
    FF ImageIMAGEโ€”
    LF ImageIMAGEโ€”
    FPSFLOATโ€”
    DurationINTโ€”
    PathSTRINGโ€”