ComfyUI-Universal-Timer
A professional, mechanical-style monitoring and execution timer node for ComfyUI with dynamic unit mapping and error state handling.
🎛️ ComfyUI Universal Timer
Version: v0.1.0
A professional, industrial-grade monitoring and execution timer node for ComfyUI. Designed with dynamic unit mapping, real-time status reporting, and robust workflow categorization, Universal Timer provides a unified time-tracking and performance analysis framework for any type of ComfyUI generation pipeline.
📌 Where to Find It in ComfyUI
After installation, you can find this node by right-clicking on the canvas, navigating to utils (or using the search bar and typing Universal Timer).
✨ Features
- 🏭 Mechanical-Style Industrial UI: Sleek, retro-digital LED appearance featuring all-caps status indicators (
[ READY ],[ PAUSE ],[ ERROR ]) for a geek-friendly, clean aesthetic. - 🔄 Dynamic Unit Mapping: Automatically adapts measurement units and counter labels based on your selected workflow type:
Image➔IMAGESVideo➔FRAMESAudio➔CLIPSPrompt➔STEPSTraining➔EPOCHSCustom➔ITEMS
- 🎨 Theme Persistence: Click-to-change color palette (White, Blue, Green, Yellow, Pink). Your visual preferences automatically persist inside the Workflow JSON.
- 📊 Live Progress & State Tracking: Monitors real-time progress (
[ Current / Total ]) alongside precise lifecycle management. - ⏸️ Interactive Pause & Resume: Hover over the lower counter region to toggle
[ PAUSE ]/[ RESUME ]to exclude away-time from performance metrics. - 🛡️ Robust Error Handling: Automatically switches to an alert-red
[ ERROR ]state when upstream execution failures or workflow exceptions occur.
<p align="center"> <img src="assets/uni_timer.gif" alt="Universal Timer Interaction Demo"><br> <sub>*Industrial aesthetic with dynamic unit mapping, live status monitoring, and interactive controls.*</sub> </p>
📦 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-Universal-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-Universal-Timer - Restart your ComfyUI instance.
🎯 Conceptual Framework & Design Principles
To maintain absolute clarity and maintainability across complex pipelines, Universal Timer enforces strict architectural boundaries regarding workflow typing and batch execution.
1. The workflow_type Definition Rule (Output Asset Type Principle)
The classification of a workflow is governed strictly by its Final Output Asset Type, regardless of the intermediate processing steps, auxiliary models, control networks, or prompt enhancements involved:
Image: Any pipeline whose terminal output is an image format (covers standard Text-to-Image, Image-to-Image, Upscaling pipelines, etc.).Video: Pipelines whose terminal delivery consists of video sequences or animation files.Audio: Pipelines terminating in sound or music synthesis.Prompt: Workflows dedicated to LLM-driven text prompt engineering, optimization, or structured generation.Training: Workflows focused on model fine-tuning, embedding, or LoRA generation (EPOCHS).Custom: Any alternative or experimental output type falling outside the standard categories (ITEMS).
2. Total Count Principles: Tensor Batching vs. Sequential Loops
Universal Timer distinguishes between ComfyUI’s native tensor processing and iterative loop execution:
- Native Tensor Batching (
batch_size = Nin KSampler / Latent):- Behavior: Processed in parallel during a single prompt execution cycle.
- Setting Rule: Keep
total = 1. The timer records the monolithic execution duration of the tensor bundle as 1 unit.
- Sequential / Iterative Batching (e.g., Loop nodes, Batch Loaders):
- Behavior: Processed iteratively across multiple execution rounds.
- Setting Rule: Set
total = Nto track accurate real-time loop progress ([ Current / Total ]).
🚀 How to Use & Interactive Controls
- Add Universal Timer to your ComfyUI workspace graph.
- Select your pipeline category under
workflow_type(the node instantly maps the corresponding unit label). - Connect your item count to
totalif running sequential loops, then click Queue Prompt.
🖱️ Canvas Interactions
- Pause / Resume: Hover over the bottom counter area while running. Click
[ PAUSE ]to freeze the elapsed timer, and[ RESUME ]to resume. - Manual Reset: Click directly on the 7-segment LED time display digits at any time to reset the clock to
00:00:00. - Theme Swatches: Click any color indicator swatch to change the LED glow color instantly.
📋 Changelog
v0.1.0
- Initial release of Universal Timer.
- Introduced dynamic unit mapping across 6 core output categories (
Image,Video,Audio,Prompt,Training,Custom). - Added industrial ALL-CAPS status state machines (
[ READY ],[ CANCEL ],[ PAUSE ],[ RESUME ],[ ERROR ]). - Implemented workflow-scoped theme color persistence and hover-to-pause controls.
📜 License
This project is licensed under the MIT License.