ComfyUI Extension: Timer-Node-Comfyui

Authored by Fablestarexpanse

Created

Updated

0 stars

A custom ComfyUI node that displays live processing time in a red digital countdown clock format, perfect for monitoring image generation times and tracking performance between workflow nodes.

Custom Nodes (0)

    README

    ⏱️ PromptWaffle Timer Node

    A custom ComfyUI node that displays live processing time in a red digital countdown clock format. Perfect for monitoring image generation times and tracking performance between workflow nodes.

    Part of the PromptWaffle suite of ComfyUI nodes - All PromptWaffle nodes are organized under the promptwaffle/ category for easy access.

    Timer Node Demo PromptWaffle License

    🌟 Features

    • Live Timer Display: Shows real-time processing duration with millisecond precision
    • Red Digital Clock: Eye-catching red LED-style digital clock display with glowing effects
    • Passthrough Design: Can be inserted anywhere in your workflow without breaking connections
    • Multiple Time Formats: Display with or without milliseconds
    • Custom Labels: Add descriptive labels to different timer nodes
    • Performance Tracking: Measure processing time between any nodes in your workflow

    📦 Installation

    Method 1: ComfyUI Manager (Recommended)

    1. Open ComfyUI Manager
    2. Search for "PromptWaffle Timer"
    3. Click Install

    Method 2: Manual Installation

    1. Navigate to your ComfyUI custom nodes directory:

      cd ComfyUI/custom_nodes/
      
    2. Clone this repository:

      git clone https://github.com/yourusername/Timer-Node-Comfyui.git
      
    3. Restart ComfyUI

    🚀 Usage

    Basic Usage

    1. Add Timer Node: Right-click in ComfyUI → Add Nodepromptwaffle/timing⏱️ PromptWaffle Timer

    2. Connect to Workflow: Connect any output to the timer node's input, and connect the timer's passthrough output to the next node

    3. Run Workflow: The timer will display the processing time in real-time with a red digital clock

    Example Workflows

    Measure Image Generation Time

    Load Image → Timer Node → Image Processing → Save Image
    

    Track Processing Steps

    Prompt → CLIP → Timer Node → KSampler → Timer Node → VAE Decode → Save
    

    Multiple Timers

    Start → Timer (Total) → Process A → Timer (Step 1) → Process B → Timer (Step 2) → End
    

    Node Inputs

    | Input | Type | Required | Description | |-------|------|----------|-------------| | input | Any (*) | Optional | Connect any output - will be passed through | | label | String | Optional | Custom label for the timer (default: "Processing Time") | | show_milliseconds | Boolean | Optional | Show milliseconds in display (default: true) |

    Node Outputs

    | Output | Type | Description | |--------|------|-------------| | passthrough | Any (*) | Original input passed through unchanged | | formatted_time | String | Formatted time string (e.g., "00:12.345") | | elapsed_seconds | Float | Total elapsed time in seconds | | timestamp | String | Completion timestamp |

    🎨 Display Features

    Red Digital Clock Display

    The timer features a stunning red LED-style digital clock with:

    • Glowing red numbers with pulsing animation
    • Dark background with red border
    • Shadow effects for depth and realism
    • Status indicator (Ready/Running/Completed)
    • Millisecond precision (optional)

    Display States

    • Ready: Initial state before execution
    • Running...: Active processing with fast-pulsing glow
    • Completed: Final time display after processing

    💡 Use Cases

    1. Performance Monitoring: Track how long each step of your workflow takes
    2. Optimization: Identify bottlenecks in complex workflows
    3. Benchmarking: Compare processing times between different models or settings
    4. Time Tracking: Monitor total generation time for billing or reporting
    5. Debugging: Detect slow or stuck nodes in your workflow

    🔧 Configuration

    Custom Labels

    Set descriptive labels for different stages:

    Timer 1: label = "Image Loading"
    Timer 2: label = "Model Inference"
    Timer 3: label = "Post Processing"
    Timer 4: label = "Total Time"
    

    Time Format

    Toggle milliseconds based on your needs:

    • With milliseconds: 00:12.345 - Precise timing for optimization
    • Without milliseconds: 00:12 - Cleaner display for long processes

    📊 Technical Details

    Time Measurement

    • Uses Python's time.time() for precise timing
    • Measures actual node execution time
    • Updates live during processing (50ms refresh rate)
    • Continues to display final time after completion

    Performance Impact

    • Minimal overhead: ~1-5ms per node execution
    • Efficient updates: JavaScript updates only during execution
    • No background processes: Clean shutdown after completion

    🤝 Contributing

    Contributions are welcome! Please feel free to submit a Pull Request.

    Development Setup

    1. Clone the repository
    2. Make your changes
    3. Test in ComfyUI
    4. Submit a PR with description of changes

    📝 License

    MIT License - feel free to use in your projects!

    🐛 Troubleshooting

    Timer Not Displaying

    • Ensure ComfyUI is restarted after installation
    • Check browser console for JavaScript errors
    • Verify node appears in promptwaffle/timing category

    Incorrect Timing

    • Timer measures node execution only, not queue time
    • Network delays are not included in measurement
    • Multiple executions show cumulative time

    Visual Issues

    • Clear browser cache and reload
    • Check for CSS conflicts with other custom nodes
    • Ensure you're using a modern browser (Chrome/Firefox/Edge)

    📞 Support

    For issues, questions, or feature requests:

    • Open an issue on GitHub
    • Check existing issues for solutions
    • Join the ComfyUI Discord community

    🙏 Acknowledgments

    • ComfyUI team for the amazing framework
    • Community contributors and testers
    • Digital clock design inspired by classic LED displays

    Enjoy tracking your workflow performance with style! ⏱️✨