Nodes/AnimateDiff/Animate Diff Combine
ComfyUI Node

Animate Diff Combine

Turn your frame batch into an actual GIF or video file

By SipherAGI·Created 3 years ago·Updated 2 years ago· 754
Animate Diff Combine
  • images
    frame_rate8
    loop_count0
    save_imagetrue
    filename_prefixanimate_diff
    format
    pingpongfalse

    Everything upstream of this node - AnimateDiffLoader, AnimateDiffSampler, your VAEDecode - produces a batch of individual frame images. AnimateDiffCombine is the step that actually stitches those frames into a GIF or video file you can open and share. Skip it and you'll be staring at a folder of numbered PNGs wondering where your animation went.

    It's an output node - it writes to disk and there's nothing to wire out of it, so it belongs at the very end of the chain, right after your decoded frames come out of VAEDecode.

    The inputs and outputs that matter

    • images (IMAGE) - the decoded frame batch. This is what actually gets combined; everything else is formatting.
    • frame_rate (default 8, range 1–24) - frames per second. AnimateDiff's native module was trained assuming something in this ballpark, which is also why the schema caps it at 24: push much higher and you're not getting smoother motion, you're just playing back the same limited frame count faster.
    • loop_count (default 0, range 0–100) - how many times the output repeats before stopping. 0 means loop forever, which is the sane default for a GIF.
    • save_image (default true) - whether the file actually gets written to disk. Turn it off if you only want a preview in the UI.
    • filename_prefix (default "animate_diff") - the output filename prefix.
    • format - a dropdown covering image/gif, image/webp, video/av1-webm, video/h264-mp4, video/webm, and video/h265-mp4. GIF is the classic choice and works everywhere with zero setup; WebP gets you noticeably better compression at similar quality; the video/* options need ffmpeg installed and available on your system PATH - that's a real dependency, not optional, so if you pick one of the video formats and haven't set up ffmpeg, that's the first thing to check.
    • pingpong (default false) - plays the clip forward then immediately in reverse, which fakes a loop without any actual generation work. It's a cheap trick and it shows: the motion visibly reverses rather than continuing, so it reads more as "bounce" than "seamless loop." Fine for quick previews, less convincing for anything you're sharing as a finished clip.

    No outputs - this is the end of the graph.

    How to install it

    Comes bundled with the pack, no separate step needed.

    Via ComfyUI Manager: search "comfyui-animatediff" and install.

    Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ArtVentureX/comfyui-animatediff
    

    Restart ComfyUI. If you want the video/* output formats, also install ffmpeg and confirm it's reachable from wherever ComfyUI's process runs - a working ComfyUI install with this pack cloned in isn't enough on its own for those formats.

    Common issues & troubleshooting

    Video format output fails or won't produce a file. Almost always ffmpeg - either it's not installed, or it's installed but not on the PATH that ComfyUI's process sees (common if you installed it in a different shell environment than the one ComfyUI runs in). Stick to image/gif or image/webp if you just want something that works with zero extra setup.

    GIF looks blocky or the colors are off compared to the video formats. That's GIF's limited color palette, not a bug - it's a real quality ceiling of the format itself. If color banding bothers you, image/webp gets meaningfully better quality at a similar file size, or go to a video format if ffmpeg is available.

    The animation looks like it "resets" or jumps into a different scene partway through. This is a known AnimateDiff behavior rather than something specific to this node - it happens more on longer generations and busier prompts. Shortening your prompt and negative prompt, and sticking closer to the 512x512 resolution the base model was trained on, are the two things that reliably help.

    pingpong doesn't look like a real loop. It isn't, really - it's forward-then-reverse, so the direction change is visible rather than seamless. Treat it as a fast preview trick, not a substitute for content that actually loops on its own.

    CategoryAnimate Diff

    Inputs (7)

    NameTypeDefaultDescription
    imagesIMAGE
    frame_rateINT81–24
    loop_countINT00–100
    save_imageBOOLEANtrue
    filename_prefixSTRINGanimate_diff
    formatCOMBO6 options: image/gif, image/webp, video/av1-webm, video/h264-mp4, video/webm, video/h265-mp4
    pingpongBOOLEANfalse

    Outputs (0)

    No outputs