ComfyUI > Nodes > Bjornulf_custom_nodes > ♻📝 Loop Sequential (input Lines)

ComfyUI Node: ♻📝 Loop Sequential (input Lines)

Class Name

Bjornulf_LoopLinesSequential

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 (input Lines) Description

Facilitates sequential processing of text lines for controlled operations, maintaining line order and session persistence.

♻📝 Loop Sequential (input Lines):

The Bjornulf_LoopLinesSequential node is designed to facilitate the sequential processing of lines from a given text input. Its primary function is to iterate through each line of text, allowing you to perform operations on each line in a controlled and orderly manner. This node is particularly useful when you need to handle text data line-by-line, ensuring that each line is processed in sequence without skipping or repeating. It maintains a counter to track the current line being processed, which is stored in a file to persist across sessions. This feature is beneficial for tasks that require consistent and repeatable processing of text data, such as generating outputs based on specific lines or managing large text datasets in a structured way.

♻📝 Loop Sequential (input Lines) Input Parameters:

text

The text parameter is the main input for the node, where you provide the text data that you want to process line-by-line. This parameter expects a string input, which can be a multi-line text block. Each line in the text will be treated as a separate entity for processing. The node will strip any leading or trailing whitespace from each line and ignore empty lines, ensuring that only meaningful content is processed. There are no specific minimum or maximum values for this parameter, but the text should be formatted in a way that each line represents a distinct unit of data you wish to process.

jump

The jump parameter determines the step size for line iteration. It specifies how many lines to skip after processing a line, allowing you to control the pace of line processing. For example, a jump value of 1 means the node will process every line sequentially, while a value of 2 will process every other line. This parameter is crucial for scenarios where you need to sample lines at specific intervals or when you want to process lines in a non-continuous manner. The default value is typically 1, but it can be adjusted based on your specific requirements.

♻📝 Loop Sequential (input Lines) Output Parameters:

next_line

The next_line output provides the content of the next line to be processed based on the current position and the jump parameter. This output is essential for accessing the specific line of text that the node is currently handling, allowing you to perform further operations or transformations on it.

remaining_cycles

The remaining_cycles output indicates the number of remaining cycles or iterations that can be performed before reaching the end of the text. This output helps you understand how many more lines can be processed given the current position and jump value, which is useful for planning subsequent operations or managing resources.

line_number

The line_number output provides the 1-based index of the current line being processed. This output is helpful for tracking progress through the text and can be used for logging or debugging purposes to ensure that the correct lines are being processed in the expected order.

♻📝 Loop Sequential (input Lines) Usage Tips:

  • Ensure that your input text is well-formatted, with each line representing a distinct piece of data you want to process. This will help the node function more effectively and avoid unnecessary errors.
  • Adjust the jump parameter to control the pace of line processing. A smaller jump value will process lines more frequently, while a larger value will skip more lines, which can be useful for sampling or reducing processing load.

♻📝 Loop Sequential (input Lines) Common Errors and Solutions:

No valid lines found in input text

  • Explanation: This error occurs when the input text does not contain any valid lines after stripping whitespace and removing empty lines.
  • Solution: Ensure that your input text contains meaningful content on each line and is not entirely empty or composed of whitespace.

Counter has reached the last line (total lines: X). Reset Counter to continue.

  • Explanation: This error indicates that the line counter has reached the end of the text, and there are no more lines to process.
  • Solution: Reset the counter by modifying or deleting the counter_lines.txt file, or adjust the input text to include more lines if needed.

♻📝 Loop Sequential (input Lines) 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.