Visit ComfyUI Online for ready-to-use ComfyUI environment
Facilitates search and replace in prompts for AI artists, enhancing prompt manipulation efficiency and effectiveness.
The XY Input: Prompt S_R node is designed to facilitate the search and replace functionality within prompts, specifically targeting positive and negative prompts. This node is particularly useful for AI artists who need to dynamically modify prompts during the generation process, allowing for more flexible and efficient experimentation with different prompt variations. By automating the search and replace process, this node helps streamline the workflow, making it easier to test and refine prompts without manual intervention. The main goal of this node is to enhance the efficiency and effectiveness of prompt manipulation, ensuring that artists can quickly iterate and achieve the desired results in their AI-generated art.
This parameter specifies whether the target prompt is positive or negative. It accepts two options: "positive" or "negative". The choice of target prompt determines the type of search and replace operation that will be performed, either on the positive or negative prompt. This parameter is crucial as it directs the node to the correct prompt type for manipulation.
This parameter is a string that represents the text to be searched within the target prompt. It is the initial text that the node will look for in the prompt to replace. The default value is an empty string, and it is not multiline. This parameter is essential as it defines the specific text segment that will be targeted for replacement.
This integer parameter determines the number of replacements to be made. It has a default value defined by XYPLOT_DEF
, with a minimum value of 0 and a maximum value of XYPLOT_LIM-1
. This parameter controls how many times the search text will be replaced within the prompt, allowing for multiple variations to be tested.
These parameters are dynamically added based on the replace_count
value. Each replace_i
parameter is a string that specifies the replacement text for the corresponding search text. The default value is an empty string, and it is not multiline. These parameters enable the node to perform multiple replacements, each with a different replacement text, thereby creating various prompt variations.
This output parameter is a tuple that contains the type of prompt (either "Positive Prompt S/R" or "Negative Prompt S/R") and a list of tuples representing the search and replace values. The list includes the initial search text and the corresponding replacement texts. This output is crucial as it provides the modified prompt values that can be used in subsequent nodes or processes, enabling the dynamic manipulation of prompts based on the specified search and replace criteria.
search_txt
parameter is not left empty, as this will result in no replacements being made. Always specify the text you want to search for within the prompt.replace_count
parameter to control the number of variations you want to create. Setting this parameter to a higher value allows for more extensive experimentation with different prompt replacements.search_txt
parameter is left empty, which means there is no text specified for the node to search and replace.search_txt
parameter. This string should be the text you want to search for within the target prompt.{plot_value}
' is not a valid batch count.plot_value
array is not equal to 1 while using the "Seeds++ Batch" plot type.plot_value
array contains exactly one element when using the "Seeds++ Batch" plot type. Adjust the array length accordingly to resolve this error.© Copyright 2024 RunComfy. All Rights Reserved.