Nodes/Dream Project Animation Nodes/πŸ’Ύ Image Sequence Saver
ComfyUI Node

πŸ’Ύ Image Sequence Saver

The node that collects your animation into a video-ready pile

By alt-key-projectΒ·Created 3 years agoΒ·Updated 2 years agoΒ· 114
πŸ’Ύ Image Sequence Saver
  • frame_counter
  • image
  • sequence
  • log_entry
β—„directory_path/tmp/ComfyUI/outputβ–Ί
β—„prefixframeβ–Ί
β—„digits5β–Ί
β—„at_endβ–Ύβ–Ί
β—„filetypeβ–Ύβ–Ί

Every frame-by-frame animation needs a place to land, and Image Sequence Saver [Dream] is the landing pad. It's the node that takes each rendered frame, writes it to disk with a padded filename (frame_00012.png), and - on the final frame - packages the whole folder up into a sequence object that the pack's Video Encoder (FFMPEG) node can turn into an mp4. If Image Motion is the engine of a Dream Project workflow, this is the clutch.

How it works

On every execution it saves the incoming image to directory_path using a prefix and a zero-padded frame number (digits controls the padding, so 5 digits gives frame_00001.png). If it's mid-animation it just returns the frame counter for the next pass. On the final frame it scans the folder, collects every matching PNG (or JPG) into an AnimationSequence alongside the frame counter, and passes that onward. That sequence is what the encoder eats.

It also emits a log_entry each save, which you can route to Log File [Dream] if you want a written record.

The inputs that matter

  • image - the frame to save.
  • directory_path - where frames go. Defaults to ComfyUI's output folder; set it to a dedicated animation folder so the encoder (and your brain) can find things.
  • prefix - default frame. Change it per project or you'll be untangling two animations saved to the same folder.
  • digits - zero-padding width. Keep it consistent, or frames sort wrong lexically.
  • at_end - what happens when the counter is past the last frame: stop output (the default, just don't save), raise error (hard stop the workflow), or keep going (save anyway).
  • filetype - png with embedded workflow (default, keeps your graph in the metadata), plain png, or jpg (quality set by encoding.jpeg_quality in the pack's config.json).

Outputs

sequence (ANIMATION_SEQUENCE) - the full set of saved frames + timing, ready for Video Encoder (FFMPEG) or the pack's sequence post-processing nodes. log_entry - a running log of what was saved.

Installing it

Ships with Dream Project Animation Nodes - ComfyUI Manager (search Dream Project Animation) or clone https://github.com/alt-key-project/comfyui-dream-project into custom_nodes, pip install -r requirements.txt, restart. No model downloads.

Common issues

The pack's README has one loud warning for this node: never put sequence nodes in parallel. The sequence collection logic assumes one linear chain - run two savers side by side and the frame lists get corrupted and the encoder produces garbage. If you need multiple outputs, serialize them.

The other classic mistake is the at_end behavior. With the default stop output, once the counter passes the final frame the node silently stops saving - which confuses people who re-run the graph mid-animation expecting it to pick up where it left off. And that digits field: if you bump it from 5 to 6 between runs, the encoder will collect both frame_00001.png and frame_000001.png and you'll get a video with duplicate frames. Pick your padding once and leave it.

Category✨ Dream/πŸŒ„ image/πŸŽ₯ animation

Inputs (7)

NameTypeDefaultDescription
frame_counterFRAME_COUNTERβ€”
imageIMAGEβ€”
directory_pathSTRING/tmp/ComfyUI/outputβ€”
prefixSTRINGframeβ€”
digitsINT5β€”
at_endCOMBO3 options: stop output, raise error, keep going
filetypeCOMBO3 options: png with embedded workflow, png, jpg

Outputs (2)

NameTypeDescription
sequenceANIMATION_SEQUENCEβ€”
log_entryLOG_ENTRYβ€”