Nodes/KJNodes for ComfyUI/Preview Animation
ComfyUI Node Runs on cloud

Preview Animation

Play a frame batch in the graph without saving a file

By kijai·Created 3 years ago·Updated about 4 hours ago· 2,930
Preview Animation
  • images
  • masks
    fps8.00

    When you're building a video or animation workflow, you don't want to encode an MP4 and open it in a player every time you tweak a setting. You want to see the frames move, right there in the graph, now. PreviewAnimation is that: a preview node that plays your batch of images back as an animation inside ComfyUI at whatever frame rate you set. It's the animated cousin of the ordinary Preview Image node.

    It's a small quality-of-life thing, which is exactly what most of Kijai's KJNodes pack is. But it's the kind of small thing that saves you a hundred round trips to a video encoder over the course of a session.

    How it works

    You feed it a batch of frames and an fps, and it shows them playing in the node body. It's an output node - the terminal end of a branch, like a Save or Preview - so it doesn't pass anything downstream. Its whole purpose is to render something for you to look at. Nothing gets written to disk; it's a look-see, not a deliverable.

    That "no file" part is the point. A quick preview at the top of your graph lets you judge motion, timing, and glitches before you commit to the (slower) step of actually combining and encoding the video.

    The inputs and outputs that matter

    • fps (FLOAT, default 8) - the playback rate for the preview. This is the one control. Set it to match the fps your final video will run at, so the preview's timing reflects reality. 8 is a common default for AnimateDiff-era clips; bump it to 16, 24, or 30 for smoother footage.
    • images (IMAGE, optional) - the frame batch to play.
    • masks (MASK, optional) - you can preview a mask batch animated too, handy for checking that an animated mask does what you expect over time.

    There are no outputs - it's an output node, so it's an endpoint. If you need the frames to continue somewhere, tap them off before this node; PreviewAnimation is a dead end by design.

    How to install it

    ComfyUI Manager: search KJNodes for ComfyUI, install, restart. Or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/kijai/ComfyUI-KJNodes
    pip install -r ComfyUI-KJNodes/requirements.txt
    

    Restart and it's under KJNodes/image. No model downloads, no heavy dependencies.

    Common issues & troubleshooting

    The preview looks faster or slower than the final video. Your fps here doesn't match the fps of your actual encode node. They're independent - set them the same if you want the preview to represent the finished timing.

    Nothing shows / it's blank. Both image inputs are optional, so if neither images nor masks is connected, there's nothing to play. Make sure a batch is actually reaching the node.

    It doesn't produce a video file. Correct - it isn't supposed to. This is a preview. To get an actual saved animation (GIF, WebP, MP4), send your frames to a video-combine/save node instead. Use PreviewAnimation to check the work, then the save node to ship it.

    Big batches feel sluggish. It's holding and animating every frame in the browser. A few hundred high-res frames can get heavy. If it's bogging down, preview a subset - pull a slice of frames first - rather than the entire clip.

    CategoryKJNodes/image

    Inputs (3)

    NameTypeDefaultDescription
    fpsFLOAT8.000.01–1000
    imagesoptIMAGE
    masksoptMASK

    Outputs (0)

    No outputs