ComfyUI > Nodes > Bjornulf_custom_nodes > ♻ Loop (All Lines from input)

ComfyUI Node: ♻ Loop (All Lines from input)

Class Name

Bjornulf_LoopAllLines

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

Iterates through text lines, extracts non-empty lines, and returns as a list for streamlined text processing.

♻ Loop (All Lines from input):

The Bjornulf_LoopAllLines node is designed to process a block of text by iterating through each line, extracting all non-empty lines, and returning them as a list. This node is particularly useful for scenarios where you need to handle multi-line text inputs and want to ensure that only meaningful content is processed, excluding any empty or whitespace-only lines. By providing a streamlined way to manage text data, this node helps in organizing and preparing text for further processing or analysis, making it an essential tool for AI artists who work with text-based inputs in their creative workflows.

♻ Loop (All Lines from input) Input Parameters:

text

The text parameter is a required input that accepts a string of text. This parameter serves as the source from which lines will be extracted. The function processes this text by splitting it into individual lines based on newline characters. It then removes any empty lines and trims whitespace from each line to ensure that only meaningful content is retained. This parameter does not have a predefined minimum or maximum length, but it is crucial to provide a well-structured text input to achieve optimal results.

♻ Loop (All Lines from input) Output Parameters:

STRING

The output of the Bjornulf_LoopAllLines node is a list of strings, where each string represents a non-empty line from the input text. This output is crucial for further processing or analysis, as it provides a clean and organized list of lines that can be used in subsequent nodes or operations. The list format allows for easy iteration and manipulation, making it a versatile output for various text-based applications.

♻ Loop (All Lines from input) Usage Tips:

  • Ensure that your input text is well-structured with clear line separations to maximize the effectiveness of the node in extracting meaningful lines.
  • Use this node as a preprocessing step to clean and organize text data before feeding it into more complex text analysis or generation nodes.

♻ Loop (All Lines from input) Common Errors and Solutions:

No valid lines found in input text

  • Explanation: This error occurs when the input text does not contain any non-empty lines after processing.
  • Solution: Check the input text to ensure it contains valid content and is not entirely empty or composed of whitespace.

Counter has reached the last line (total lines: <number>)

  • Explanation: This error indicates that the internal counter used for line processing has reached the end of the available lines.
  • Solution: Reset the counter or adjust the input text to include more lines if further processing is required.

♻ Loop (All Lines from input) 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.