ComfyUI > Nodes > Bjornulf_custom_nodes > ♻📝 Loop Sequential (Integer)

ComfyUI Node: ♻📝 Loop Sequential (Integer)

Class Name

Bjornulf_LoopIntegerSequential

Category
Bjornulf
Author
justUmen (Account age: 3046days)
Extension
Bjornulf_custom_nodes
Latest Updated
2025-02-28
Github Stars
0.2K

How to Install Bjornulf_custom_nodes

Install this extension via the ComfyUI Manager by searching for Bjornulf_custom_nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Bjornulf_custom_nodes 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

♻📝 Loop Sequential (Integer) Description

Facilitates sequential iteration of integer values within a specified range for controlled numeric sequences.

♻📝 Loop Sequential (Integer):

The Bjornulf_LoopIntegerSequential node is designed to facilitate the sequential iteration of integer values within a specified range, making it a valuable tool for tasks that require controlled and repeatable numeric sequences. This node is particularly useful in scenarios where you need to generate a series of numbers that increment by a defined step, starting from a given point and stopping at a specified limit. By managing the progression of these numbers, the node helps automate processes that depend on numeric iteration, such as batch processing or parameter tuning in AI art generation. The node ensures that the sequence does not exceed the defined upper limit, providing a safeguard against unintended overflows. This functionality is achieved through the get_next_value method, which reads and updates a counter stored in a file, allowing the sequence to persist across multiple executions.

♻📝 Loop Sequential (Integer) Input Parameters:

from_this

The from_this parameter specifies the starting point of the integer sequence. It defines the initial value from which the sequence begins. The minimum value for this parameter is 1, the maximum is 50,000, and the default is set to 1. This parameter is crucial as it determines the base value of your sequence, and adjusting it allows you to control where the iteration starts.

to_that

The to_that parameter sets the upper limit of the integer sequence. It defines the maximum value that the sequence can reach before the node halts further execution. The minimum value for this parameter is 1, the maximum is 50,000, and the default is 10. This parameter is essential for ensuring that the sequence does not exceed a certain threshold, which is particularly useful for preventing overflows or excessive iterations.

jump

The jump parameter determines the increment step between consecutive values in the sequence. It specifies how much the current value should increase with each iteration. The minimum value for this parameter is 1, the maximum is 1,000, and the default is 1. This parameter is important for controlling the granularity of the sequence, allowing you to adjust how quickly the sequence progresses from the starting point to the upper limit.

♻📝 Loop Sequential (Integer) Output Parameters:

int_value

The int_value output represents the next integer in the sequence based on the current state of the counter. This value is crucial as it provides the actual number that can be used in subsequent operations or processes. It reflects the current position in the sequence and is updated with each execution of the node.

remaining_cycles

The remaining_cycles output indicates the number of iterations left before the sequence reaches the upper limit defined by the to_that parameter. This value is important for understanding how many more times the sequence can be executed before it needs to be reset. It helps in planning and managing the iteration process, ensuring that you are aware of the sequence's progression and remaining capacity.

♻📝 Loop Sequential (Integer) Usage Tips:

  • To ensure smooth operation, always set the from_this and to_that parameters according to the range you need for your task, and adjust the jump parameter to control the step size between iterations.
  • Regularly check the remaining_cycles output to monitor how many iterations are left, which can help you decide when to reset the counter or adjust parameters for continued operation.

♻📝 Loop Sequential (Integer) Common Errors and Solutions:

Counter has reached its limit of <to_that>, Reset Counter to continue.

  • Explanation: This error occurs when the sequence has reached or exceeded the upper limit specified by the to_that parameter.
  • Solution: To resolve this, you need to reset the counter by either deleting the counter_integer.txt file or manually setting its value to a number less than to_that. Alternatively, you can adjust the to_that parameter to a higher value if a larger range is needed.

FileNotFoundError or ValueError when reading counter file

  • Explanation: This error indicates that the counter file does not exist or contains invalid data, preventing the node from reading the current counter value.
  • Solution: Ensure that the counter_integer.txt file is present in the correct directory and contains a valid integer. If the file is missing, the node will automatically create it on the next run, starting from the from_this value minus the jump.

♻📝 Loop Sequential (Integer) Related Nodes

Go back to the extension to check out more related nodes.
Bjornulf_custom_nodes
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 Playground, enabling artists to harness the latest AI tools to create incredible art.