ComfyUI Batch Image Timer
A custom node for ComfyUI that provides a real-time 7-segment LED display timer to track execution duration and progress during batch image generation.
⏱️ ComfyUI Batch Image Timer
A specialized custom node for ComfyUI focused on batch image processing workflows, providing a real-time 7-segment LED timer to track total execution duration across sequential loops and bulk image pipelines.
💡 Timing other workflows (Video, Audio, Training)? See the universal counterpart: ComfyUI Universal Timer.
📌 Where to Find It
Right-click the canvas → utils/timer, or search Batch Image Timer.
✨ Features
- 🎯 Batch Image Focus: Built for sequential loaders (e.g. Sequential Image Loader) and image-to-image batch pipelines.
- 🕒 Triple Timing Modes:
- COMPUTE — Pure execution time (excludes queue wait). Supports Pause/Resume.
- TOTAL — Wall-clock time from start to finish, including all waits.
- ETA — Forecast of remaining batch time based on completed iterations.
- 📺 7-Segment LED UI: Retro digital display rendered directly on the canvas.
- 🎨 Interactive Palette & Persistence: Click a swatch to change color; the choice is saved in the Workflow JSON.
- ⏱️ Batch-Level Timing (Sequential Mode): Measures the whole batch without resetting between iterations. For native tensor batches (
total_images = 1), it tracks that single execution. - 🚦 Color-Coded Status Counter
[ X / Y ]:- ⚪ Gray
[ READY ]— Idle. - 🔵 Blue
[ X / Y ]— Running. - 🟢 Green
[ Y / Y ]— Completed. - 🟡 Yellow
[ X / Y ]— Interrupted (retains exact count). - 🔴 Red
[ X / Y ]— Error (retains exact count). - Edge case: if interrupted/errored before the first image finishes (
current = 0), the counter shows literal[ INTERRUPT ]/[ ERROR ]— there is no progress to retain.
- ⚪ Gray
- ⏸️ Timer / Counter Independence: Pausing or resetting the timer never affects the counter, and vice versa.
- 🔗 Auto Batch Count Sync: Connect
total_imagesdirectly to batch loaders. - 🛡️ Multi-Workflow Display Isolation: Only the workflow that initiated the current execution shows live timer data; other open workflows' timer nodes stay at
[ READY ], preventing visual cross-contamination. - ⏳ 10-Minute Deadlock Fallback: Safety net if a third-party node stops sending signals.
📦 Installation
Note: This node relies strictly on native web standard components and ComfyUI API events. No external Python dependencies or
requirements.txtare required.
Method 1: Via ComfyUI-Manager (Recommended)
- Open ComfyUI and click on Manager in the menu.
- Select Custom Nodes Manager.
- Search for
ComfyUI-Batch-Image-Timer. - Click Install and restart your ComfyUI.
Method 2: Manual Installation (Git Clone)
- Navigate to your ComfyUI
custom_nodesdirectory:cd ComfyUI/custom_nodes - Clone this repository:
git clone https://github.com/hermankwan/ComfyUI-Batch-Image-Timer - Restart your ComfyUI instance.
🚀 Usage & Interactions
- Add Batch Image Timer to your graph.
- Link your image count to
total_images(default1for native tensor batches; set/connectNfor sequential loaders). - Click Queue Prompt.
The node UI has four zones — each responds only within its own area:
| Zone | Interaction |
|---|---|
| 1. Mode tabs (ETA / COMPUTE / TOTAL) | Click to switch mode. Active tab is highlighted blue. |
| 2. LED timer digits | COMPUTE: single-click = Pause/Resume, double-click = reset (continues if running, stays at 00:00:00 if idle).<br>TOTAL: single-click = brief flash (only while running); double-click = reset.<br>ETA: single/double-click = brief flash (only while running, no pause/reset). |
| 3. Color swatches (5 blocks) | Click to change LED color. Saved with the workflow. |
| 4. Progress counter [ X / Y ] | Display only — no interaction. |
💡 Use only one Batch Image Timer per workflow. With multiple timers, only the first-executed node tracks the active run; the others remain display-isolated.
💡 How It Works
Timing Modes
- COMPUTE — Pure execution time, from first image start to last image end. Pausable to exclude away-time.
- TOTAL — Absolute wall-clock time. Keeps ticking even if COMPUTE is paused.
- ETA — Estimated remaining time using a smoothed blend of the global average per-image cost and the latest iteration cost (30% / 70% weighting). It adapts quickly to speed changes while staying stable. Shows
99:99:99until the first image completes (currentreaches 2), then counts down; only zeroes out when the workflow finishes.
⚠️ ETA is for sequential loops (
total_images > 1). For single-image workflows (total_images = 1), ETA stays at99:99:99— use COMPUTE or TOTAL instead.
total_images Principles
- Native tensor batch (
batch_size = N): keeptotal_images = 1. Tracks the batch as one unit. - Sequential loader: set or connect
total_images = N. Aggregates time without resetting.
⚠️ Known Limitations
- Interrupt/error before first image completes: Counter shows literal
[ INTERRUPT ]/[ ERROR ](no progress to retain). - Multiple timers with different
total_images: Only the first-executed node becomes the counting master. If two timers are connected to different totals, counting may reset unexpectedly — use identicaltotal_images. - Rapid consecutive Queue clicks: The previous run may not have fully reset; ETA may briefly show stale values until
currentreaches 1 again (v0.2.3 force-restarts clocks whencurrent === 1). - ETA in single-image workflows: Stays at
99:99:99(no history). Use COMPUTE or TOTAL.
🛡️ Deadlock Fallback (10-Minute Timeout)
If a third-party node (e.g. Sequential Image Loader) enters a deadlock and stops sending signals, the timer queries the backend after 10 minutes of silence. If the backend confirms it is idle, the timer stops and displays a yellow [ X / Y ] counter.
Don't want to wait 10 minutes? Double-click the LED digits to reset manually.
📋 Changelog
v0.2.3
- Triple Timing Modes: Added
ETAandTOTALalongsideCOMPUTE. - Smart ETA: 30/70 blend of global average and latest iteration cost; excludes initial model-load overhead.
- Color-Coded Counter: Text
[ INTERRUPT ]/[ ERROR ]removed in favor of colored[ X / Y ](see edge case above). - UI & Interaction Polish: Panel-only cursor logic for smooth node drag/resize; enhanced LED glow.
- Refined Display Isolation: Each workflow canvas strictly isolates its own live timer display.
- Force-restart on
current === 1: Handles rapid Queue clicks more gracefully.
v0.2.2
- Added Neon Glow Effect: The 7-segment LED digits now have a subtle, theme-matched glow, making the batch monitoring visually clearer.
- Fixed Node Resizing Conflict: Improved UI interaction so node corners can be easily dragged to resize without cursor interference.
v0.2.1
- Added 10-Minute Safety Deadlock Fallback: Prevents the timer from running infinitely when third-party nodes (e.g., Sequential Loaders) enter a ghost/deadlock state. Queries backend
executingstatus before stopping. - Improved Status Handling:
[ INTERRUPT ]now properly covers both user-initiated interruptions and fallback-triggered stops.
v0.2.0 (Major Architecture Refactor)
- Complete Codebase Rewrite: Refactored into a modular ES Modules architecture.
- Batch Tracking Logic: Fixed counting/resetting issues with Sequential Loaders. Added robust termination fallbacks for interrupted queues.
- UI/UX Overhaul: Redesigned node layout, fixed window resizing conflicts, and introduced dynamic color feedback for statuses (Ready/Running/Complete/Error/Interrupt).
- State Isolation: Timer interactions (Pause/Reset) are now fully decoupled from the progress counter. Added multi-workflow isolation.
v0.1.1
- Added interactive hover-to-pause functionality.
- Fixed multi-batch time jumping / rebound bugs.
- Implemented workflow-scoped theme color persistence.
v0.1.0
- Initial release focused on batch image workflow timing.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.