ComfyUI > Nodes > Dapao-Toolbox > ๐Ÿง้šๆœบๆ็คบ่ฏ่กŒๆๅ–@็‚ฎ่€ๅธˆ็š„ๅฐ่ฏพๅ ‚

ComfyUI Node: ๐Ÿง้šๆœบๆ็คบ่ฏ่กŒๆๅ–@็‚ฎ่€ๅธˆ็š„ๅฐ่ฏพๅ ‚

Class Name

DapaoRandomPromptLineExtractNode

Category
๐Ÿค–Dapao-Toolbox/๐Ÿ—ผๅญ—็ฌฆไธฒๅค„็†
Author
paolaoshi (Account age: 0days)
Extension
Dapao-Toolbox
Latest Updated
2026-03-18
Github Stars
0.04K

How to Install Dapao-Toolbox

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

๐Ÿง้šๆœบๆ็คบ่ฏ่กŒๆๅ–@็‚ฎ่€ๅธˆ็š„ๅฐ่ฏพๅ ‚ Description

Extracts random lines from multiline text with preprocessing options for AI art workflows.

๐Ÿง้šๆœบๆ็คบ่ฏ่กŒๆๅ–@็‚ฎ่€ๅธˆ็š„ๅฐ่ฏพๅ ‚:

The DapaoRandomPromptLineExtractNode is a versatile tool designed to extract random lines from a given multiline text input. This node is particularly useful for AI artists who work with large sets of prompt lines and need to randomly select a subset for creative purposes. The node allows you to specify the number of lines to extract and provides options for preprocessing the text, such as converting to uppercase, removing punctuation, or extracting only numeric characters. By leveraging a random seed, the node ensures reproducibility of results, making it a reliable component in workflows that require consistent outputs. Its primary goal is to streamline the process of handling and manipulating text data, offering a range of preprocessing options to tailor the output to specific needs.

๐Ÿง้šๆœบๆ็คบ่ฏ่กŒๆๅ–@็‚ฎ่€ๅธˆ็š„ๅฐ่ฏพๅ ‚ Input Parameters:

๐Ÿ“ ๅคš่กŒๆ–‡ๆœฌ

This parameter accepts a multiline string input where each line represents a candidate prompt. It serves as the source from which random lines will be extracted. The default value is an empty string, and it supports multiline input to accommodate extensive prompt lists.

๐Ÿงฐ ๅญ—็ฌฆไธฒ้ข„ๅค„็†

This parameter allows you to specify how the text should be preprocessed before extraction. Options include "ไธๆ”นๅ˜" (no change), "ๅ–ๆ•ฐๅญ—" (extract numbers), "ๅ–ๅญ—ๆฏ" (extract letters), "่ฝฌๅคงๅ†™" (convert to uppercase), "่ฝฌๅฐๅ†™" (convert to lowercase), "ๅ–ไธญๆ–‡" (extract Chinese characters), "ๅŽปๆ ‡็‚น" (remove punctuation), "ๅŽปๆข่กŒ" (remove newlines), "ๅŽป็ฉบ่กŒ" (remove empty lines), "ๅŽป็ฉบๆ ผ" (remove spaces), "ๅŽปๆ ผๅผ" (normalize formatting), and "็ปŸ่ฎกๅญ—ๆ•ฐ" (count characters). The default option is "ไธๆ”นๅ˜".

๐Ÿ”ข ๆๅ–่กŒๆ•ฐ

This integer parameter determines the number of lines to extract from the input text. It ranges from 1 to 9999, with a default value of 1. This allows you to control the volume of extracted data based on your specific requirements.

๐ŸŽฒ ้šๆœบ็งๅญ

The random seed parameter is an integer that influences the randomness of line selection. It ranges from 0 to 0x7FFFFFFF, with a default value of 0. Setting a specific seed ensures that the same lines are extracted in repeated runs, providing consistency in outputs.

๐Ÿง้šๆœบๆ็คบ่ฏ่กŒๆๅ–@็‚ฎ่€ๅธˆ็š„ๅฐ่ฏพๅ ‚ Output Parameters:

๐Ÿ“ ๆๅ–็ป“ๆžœ

This output provides the extracted lines as a list of strings. The lines are selected based on the specified number of lines to extract and any preprocessing options applied. This output is crucial for generating varied and creative prompts from a larger dataset.

๐Ÿ”ข ๅญ—ๆ•ฐ

This integer output represents the total number of non-space characters in the extracted lines. It is particularly useful when the "็ปŸ่ฎกๅญ—ๆ•ฐ" preprocessing option is selected, providing a quick count of characters for further analysis or constraints.

๐Ÿง้šๆœบๆ็คบ่ฏ่กŒๆๅ–@็‚ฎ่€ๅธˆ็š„ๅฐ่ฏพๅ ‚ Usage Tips:

  • To ensure consistent results across different runs, set a specific value for the random seed parameter.
  • Use the preprocessing options to tailor the extracted text to your needs, such as removing punctuation for cleaner outputs or converting text to uppercase for emphasis.
  • When working with large datasets, consider extracting a smaller number of lines to maintain focus and manageability.

๐Ÿง้šๆœบๆ็คบ่ฏ่กŒๆๅ–@็‚ฎ่€ๅธˆ็š„ๅฐ่ฏพๅ ‚ Common Errors and Solutions:

Empty Input Text

  • Explanation: This error occurs when the input text is empty or contains only whitespace.
  • Solution: Ensure that the input text parameter contains valid lines of text before running the node.

Invalid Pick Count

  • Explanation: This error arises when the specified number of lines to extract exceeds the number of available lines in the input.
  • Solution: Adjust the pick count to be less than or equal to the number of lines in the input text.

Unsupported Preprocessing Option

  • Explanation: This error happens if an invalid preprocessing option is selected.
  • Solution: Verify that the preprocessing option is one of the supported choices listed in the input parameters.

๐Ÿง้šๆœบๆ็คบ่ฏ่กŒๆๅ–@็‚ฎ่€ๅธˆ็š„ๅฐ่ฏพๅ ‚ Related Nodes

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

๐Ÿง้šๆœบๆ็คบ่ฏ่กŒๆๅ–@็‚ฎ่€ๅธˆ็š„ๅฐ่ฏพๅ ‚