ComfyUI > Nodes > ComfyUI-LogicUtils > Counter Integer

ComfyUI Node: Counter Integer

Class Name

CounterInteger

Category
Logic Gates
Author
aria1th (Account age: 3016days)
Extension
ComfyUI-LogicUtils
Latest Updated
2026-01-21
Github Stars
0.1K

How to Install ComfyUI-LogicUtils

Install this extension via the ComfyUI Manager by searching for ComfyUI-LogicUtils
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-LogicUtils in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Counter Integer Description

Generates an integer counter incrementing by one per execution for tracking iterations.

Counter Integer:

The CounterInteger node is designed to generate a simple integer counter that increments by one each time it is executed. This node is particularly useful in scenarios where you need to keep track of iterations or generate a sequence of numbers in a logical and predictable manner. By providing a straightforward mechanism to increment a counter, it helps streamline processes that require sequential numbering or counting, making it an essential tool for tasks that involve loops or repeated actions. The node's primary function is to maintain and update a counter, ensuring that each execution results in a consistent and expected increment, which can be particularly beneficial in automation workflows or when managing iterations in creative projects.

Counter Integer Input Parameters:

start

The start parameter defines the initial value from which the counter begins. It is a floating-point number, allowing you to specify any starting point within the range of -(2^63-1) to (2^63-1). The default value is 0.0, which means that if no specific starting point is provided, the counter will begin at zero. This parameter is crucial as it sets the baseline for the counter, and any subsequent increments will be based on this initial value.

reset

The reset parameter is a boolean option that determines whether the counter should be reset to zero. By default, this parameter is set to False, meaning the counter will continue incrementing from its current value. If set to True, the counter will be reset to zero, effectively restarting the counting process. This parameter is useful when you need to restart the counter at specific intervals or conditions, ensuring that the sequence begins anew.

Counter Integer Output Parameters:

INT

The output of the CounterInteger node is an integer value that represents the current count after the node's execution. This integer is the result of incrementing the counter by one from its previous state. The output is crucial for tracking the sequence of numbers generated by the node, allowing you to use this information in subsequent processes or calculations. The integer output provides a clear and concise representation of the current count, making it easy to integrate into various workflows.

Counter Integer Usage Tips:

  • To maintain a continuous sequence, ensure the reset parameter is set to False unless you specifically need to restart the counter.
  • Use the start parameter to set a custom initial value if you need the counter to begin from a number other than zero.

Counter Integer Common Errors and Solutions:

Counter not incrementing

  • Explanation: This issue may occur if the reset parameter is unintentionally set to True, causing the counter to restart at zero each time.
  • Solution: Check the reset parameter and ensure it is set to False if you want the counter to continue incrementing from its current value.

Unexpected starting value

  • Explanation: If the counter does not start from the expected value, it might be due to an incorrect start parameter setting.
  • Solution: Verify that the start parameter is set to the desired initial value before executing the node.

Counter Integer Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-LogicUtils
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

Counter Integer