🐧随机提示词行组合@炮老师的小课堂:
The DapaoRandomPromptLineCombineNode is a versatile tool designed to assist AI artists in generating creative text prompts by randomly combining lines from multiple input texts. This node is particularly useful for those looking to inject randomness and variety into their text-based projects, such as generating unique prompts for AI art generation. By allowing users to specify multiple lines of text and then randomly selecting and combining these lines, the node provides a powerful way to explore different combinations and permutations of text. This can lead to unexpected and inspiring results, making it an invaluable tool for creative exploration. The node also offers various preprocessing options to tailor the output to specific needs, such as removing punctuation or converting text to uppercase, further enhancing its utility in diverse creative workflows.
🐧随机提示词行组合@炮老师的小课堂 Input Parameters:
🧰 字符串预处理
This parameter allows you to specify how the input text should be preprocessed before being combined. 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), "去格式" (remove formatting), and "统计字数" (count characters). The default option is "不改变". This parameter impacts the final appearance and content of the combined text, allowing for customization based on the desired output.
🔢 提取行数
This integer parameter determines the number of lines to extract and combine from the input texts. It accepts values from 1 to 9999, with a default value of 1. The number of lines specified here directly affects the length and complexity of the generated prompt, providing control over the amount of content included in the output.
🎲 随机种子
The random seed parameter is an integer that influences the randomness of the line selection process. It ranges from 0 to 0x7FFFFFFF, with a default value of 0. By setting a specific seed, you can ensure reproducibility of the random selection process, which is useful for generating consistent results across different runs.
📝 提示词行1 to 📝 提示词行10
These optional string parameters allow you to input up to ten different lines of text, each of which can be multiline. These lines serve as the source material from which the node will randomly select and combine lines to generate the final prompt. Providing multiple lines increases the variety and potential combinations available for the output.
🐧随机提示词行组合@炮老师的小课堂 Output Parameters:
📝 提示词
This output parameter provides the combined text prompt generated by the node. It is a list of strings, each representing a unique combination of lines based on the input parameters and preprocessing options. This output is the primary result of the node's operation, offering a creative and potentially unexpected text prompt for further use.
🔢 字数
This integer output represents the total number of non-space characters in the combined text prompt. It provides a quantitative measure of the prompt's length, which can be useful for ensuring the output meets specific length requirements or constraints.
🐧随机提示词行组合@炮老师的小课堂 Usage Tips:
- Experiment with different preprocessing options to see how they affect the final output. For example, removing punctuation or converting text to uppercase can dramatically change the tone and readability of the prompt.
- Use the random seed parameter to generate consistent results when needed, especially if you find a particular combination that you want to replicate in future projects.
🐧随机提示词行组合@炮老师的小课堂 Common Errors and Solutions:
No active inputs found
- Explanation: This error occurs when no valid input lines are provided to the node.
- Solution: Ensure that at least one of the
📝 提示词行parameters contains valid, non-empty text.
Invalid pick count
- Explanation: This error arises when the
🔢 提取行数parameter is set to a value greater than the number of available lines. - Solution: Adjust the
🔢 提取行数to be less than or equal to the number of lines provided in the input parameters.
