β Frame Counter Info
Peel the numbers out of a frame counter to drive logic, timers, and progress
- 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 numbertotal_frames(INT) - animation lengthfirst_frame(BOOLEAN) - true on frame 0last_frame(BOOLEAN) - true when this is the final frameelapsed_seconds(FLOAT),remaining_seconds(FLOAT),total_seconds(FLOAT) - time arithmetic from fpscompletion(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_frameinto a switch. "Only run the post-processing on the last frame" - that'slast_frame. These are the two outputs you'll use most, because frame-by-frame workflows are full of "do this once" moments. - Progress feedback.
completioninto 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_secondsis 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.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| frame_counter | FRAME_COUNTER | β |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| frames_completed | INT | β |
| total_frames | INT | β |
| first_frame | BOOLEAN | β |
| last_frame | BOOLEAN | β |
| elapsed_seconds | FLOAT | β |
| remaining_seconds | FLOAT | β |
| total_seconds | FLOAT | β |
| completion | FLOAT | β |