Nodes/Dream Project Animation Nodes/βš‹ Frame Counter Info
ComfyUI Node

βš‹ Frame Counter Info

Peel the numbers out of a frame counter to drive logic, timers, and progress

By alt-key-projectΒ·Created 3 years agoΒ·Updated 2 years agoΒ· 114
βš‹ Frame Counter Info
  • frame_counter
  • frames_completed
  • total_frames
  • first_frame
  • last_frame
  • elapsed_seconds
  • remaining_seconds
  • total_seconds
  • completion

The FRAME_COUNTER type in the Dream Project Animation Nodes pack is a bundle of information - current frame, total frames, fps - but a lot of ComfyUI nodes want plain numbers and booleans. Frame Counter Info [Dream] is the node that unpacks it. Feed it a frame counter and you get eight individual outputs you can wire into switches, math, or the logging system.

It's a utility from the 2023 Deforum-style animation pack by alt-key-project. Not actively maintained, but it's a getter - nothing to maintain.

What you get out

One input (frame_counter), eight outputs:

  • frames_completed (INT) - current frame number
  • total_frames (INT) - animation length
  • first_frame (BOOLEAN) - true on frame 0
  • last_frame (BOOLEAN) - true when this is the final frame
  • elapsed_seconds (FLOAT), remaining_seconds (FLOAT), total_seconds (FLOAT) - time arithmetic from fps
  • completion (FLOAT) - elapsed / total, i.e. 0.0 β†’ 1.0 progress

The booleans come straight from the counter's definitions: first_frame is current == 0, last_frame is current + 1 == total. Nothing surprising, which is the point of a node like this.

The moves that matter

  • Conditional one-time actions. "Only save the preview on the first frame" - that's first_frame into a switch. "Only run the post-processing on the last frame" - that's last_frame. These are the two outputs you'll use most, because frame-by-frame workflows are full of "do this once" moments.
  • Progress feedback. completion into a log entry or a text node gives you a live 0.0–1.0 readout while a long render grinds. Combined with the pack's Log File node, you can see progress in the log instead of guessing.
  • Time estimates. remaining_seconds is real data: wire it into the logging chain to see "estimated 14 minutes left" in your log file.

Installing

cd ComfyUI/custom_nodes
git clone https://github.com/alt-key-project/comfyui-dream-project.git

Or via ComfyUI Manager under "Dream Project Animation". No model downloads; the pack pulls imageio, scipy, torchvision, pilgram, and evalidate. Mind the numpy<2.0 pin. Find it under Dream β†’ animation.

Category✨ Dream/πŸŽ₯ animation

Inputs (1)

NameTypeDefaultDescription
frame_counterFRAME_COUNTERβ€”

Outputs (8)

NameTypeDescription
frames_completedINTβ€”
total_framesINTβ€”
first_frameBOOLEANβ€”
last_frameBOOLEANβ€”
elapsed_secondsFLOATβ€”
remaining_secondsFLOATβ€”
total_secondsFLOATβ€”
completionFLOATβ€”