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 > 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.

🐧随机提示词行提取@炮老师的小课堂