ComfyUI Node Runs on cloud

Write to GIF

Build an animation one generated frame at a time

By WASasquatch·Created 3 years ago·Updated about a year ago· 1,812
Write to GIF

      Most GIF nodes want the whole batch of frames at once, then assemble the file at the end. Write to GIF works the other way: it appends frames to a GIF as you generate them, one at a time, and can interpolate extra in-between frames so the motion looks smoother than your actual frame count. The WAS README calls it writing "a new frame to an existing GIF (or create new one) with interpolation between frames." That incremental design is the whole reason to reach for it.

      Where it shines is long or memory-heavy sequences. If you're looping a generation and don't want to hold hundreds of image tensors in VRAM to hand off to a batch encoder at the end, this streams each frame straight to disk and moves on. It's the animated-GIF cousin of WAS's Write to Video node.

      How it works

      You run it inside a loop or a batch, and each execution tacks the current frame onto the GIF file it's building. The interpolation step blends between the previous frame and the new one, inventing intermediate frames so a small number of real generations turns into a fluid little animation instead of a choppy slideshow. Because it's writing progressively, the file grows on disk as you go rather than materializing all at once.

      The inputs and outputs that matter

      The core idea is simple even without a formal schema in front of me:

      • An image in - the current frame you want appended.
      • A file path / name - where the GIF lives so repeated runs know to keep appending to the same file instead of starting fresh.
      • Interpolation amount - how many blended frames to synthesize between the last frame and this one. More smoothing, longer GIF, bigger file.

      The exact widget labels aren't something I can pull from a schema for this node, so treat those as the shape of what you'll see, not literal field names. This is an output-style node - its job is the file it writes, so you generally don't wire its result onward the way you would a normal image.

      How to install it

      It comes with the WAS Node Suite:

      • ComfyUI Manager: search was-node-suite-comfyui, install, restart.
      • Manually: cd ComfyUI/custom_nodes && git clone https://github.com/WASasquatch/was-node-suite-comfyui/, then pip install -r requirements.txt against your ComfyUI Python (use python_embeded\python.exe -s -m pip ... on the portable build), and restart.

      Common issues

      Read the fine print in the WAS README before you get attached to this one. The author states the video/animation side was only ever tested and supported on Windows - they didn't have Mac or standalone Linux to verify it, and asked for PRs to fill the gap. It was never under active development after December 2023, so that caveat still stands. On Linux or Mac it may work, may not; you're on the frontier.

      The sibling Write to Video node needs FFMPEG installed and pointed at in the config, and the README warns that re-compressing frames run-to-run "will start exponentially ruining the starting frames" unless you use a lossless codec. The GIF path avoids the codec mess but shares the same spirit: it's an experimental node from a retired pack, so keep a copy of your source frames and don't build a fragile pipeline on top of it.

      And the usual WAS gotcha applies to the whole pack - if a ComfyUI update makes every WAS node vanish with an "Import Failed", that's dependency drift, not this node. Re-run requirements.txt against the right Python environment (or run the bundled install.bat), restart, and they come back.

      Categoryx

      Inputs (0)

      No inputs

      Outputs (0)

      No outputs