Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > Sage Utils > Text Random Line

ComfyUI Node: Text Random Line

Class Name

Sage_TextRandomLine

Category
Sage Utils/text
Author
arcum42 (Account age: 6442days)
Extension
Sage Utils
Latest Updated
2026-05-17
Github Stars
0.03K

How to Install Sage Utils

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

Text Random Line Description

Selects a random line from text using a seed for reproducible randomness in text projects.

Text Random Line:

The Sage_TextRandomLine node is designed to enhance your text processing capabilities by selecting a random line from a given block of text. This node is particularly useful when you want to introduce an element of randomness or surprise into your text-based projects, such as generating random quotes, selecting random prompts, or creating dynamic content. By leveraging a seed value, it ensures that the randomness can be controlled and reproduced, making it a versatile tool for both creative and practical applications. Its primary function is to parse the input text, identify individual lines, and then randomly select one of these lines to output, providing a simple yet powerful way to add variability to your text processing tasks.

Text Random Line Input Parameters:

text

The text parameter is a multiline string input that serves as the source from which a random line will be selected. It is crucial for the node's operation as it provides the content to be processed. The input should be formatted with each line separated by a newline character. There are no explicit minimum or maximum values for this parameter, but it should contain at least one line of text to function effectively.

seed

The seed parameter is an integer input that determines the randomness of the line selection process. By setting a specific seed value, you can ensure that the same line is selected each time the node is executed with the same input text, allowing for reproducibility in your results. The default value is 0, and while there are no strict minimum or maximum values, using different seed values will yield different random lines from the text.

Text Random Line Output Parameters:

random_line

The random_line output is a string that represents the randomly selected line from the input text. This output is the core result of the node's operation, providing a single line that can be used in subsequent processes or displayed as needed. The randomness of the selection is influenced by the seed parameter, allowing for both variability and consistency depending on your requirements.

Text Random Line Usage Tips:

  • To ensure consistent results across multiple executions, use the same seed value when you want to reproduce the same random line selection.
  • If you want to introduce more variability, experiment with different seed values to see how the output changes.

Text Random Line Common Errors and Solutions:

No lines available for selection

  • Explanation: This error occurs when the input text does not contain any valid lines, possibly due to being empty or consisting solely of whitespace.
  • Solution: Ensure that the input text contains at least one non-empty line. Remove any unnecessary whitespace or empty lines.

Invalid seed value

  • Explanation: Although the seed parameter accepts any integer, using non-integer values or extremely large numbers might cause unexpected behavior.
  • Solution: Always provide a valid integer for the seed parameter to ensure predictable and stable operation.

Text Random Line Related Nodes

Go back to the extension to check out more related nodes.
Sage Utils
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.

Text Random Line