efficiency-nodes-comfyui
Run ComfyUI Easily with InstaSD
Skip the complex setup. InstaSD helps creative professionals build workflows and deploy them to the world:
- One-click deployment
- Any model, any node
- Powerful GPUs for rapid iteration
Available Nodes
XY Input: Prompt S/R
Documentation for "XY Input: Prompt S/R" Node
Overview
The "XY Input: Prompt S/R" node is a part of the Efficiency Nodes collection designed for ComfyUI, a customizable user interface that enables complex workflows. This specific node enables users to create variations of both positive and negative text prompts by performing a search and replace (S/R) operation, facilitating the exploration of different textual input scenarios.
Functionality
What This Node Does
The "XY Input: Prompt S/R" node performs search and replace operations on text prompts, allowing users to specify a portion of text to be searched in a prompt and then replace it with specified variants. This functionality aids in experimenting with different wording or phrasing in the prompts to analyze variations in output results.
Inputs
-
target_prompt:
- This input allows the user to specify which type of prompt (either "positive" or "negative") is targeted for the search and replace operation.
-
search_txt:
- This is the text string that the node will search for within the specified prompt type. It's a required input that identifies the portion of the text that will be replaced.
-
replace_count:
- An integer input that specifies how many different replacement strings will be provided. This count determines how many variations of the original prompt will be created.
-
replace_n:
- These inputs are dynamically added based on the replace_count and allow the user to specify each replacement string. For each count determined by replace_count, a corresponding replace_n input is available starting from
replace_1toreplace_n.
- These inputs are dynamically added based on the replace_count and allow the user to specify each replacement string. For each count determined by replace_count, a corresponding replace_n input is available starting from
Outputs
- X or Y:
- This output serves as an XY input that can be plugged into other nodes that support XY plotting. The output will be in the format of a tuple containing the type of operation ("Positive Prompt S/R" or "Negative Prompt S/R") and the list of prompt versions with the search text replaced by each of the specified replacements.
Usage in ComfyUI Workflows
The "XY Input: Prompt S/R" node is particularly useful in workflows where users are analyzing the effect of different prompt wordings on the generated output. By allowing for batch processing of multiple prompt variations, this node streamlines the experimentation phase and can be used in conjunction with nodes that support XY plotting, enabling users to visualize and compare different results side by side.
Special Features or Considerations
-
Dynamic Inputs: The node dynamically adjusts the inputs based on the replace_count, making it flexible and efficient for varying workflows.
-
Prompt Exploration: By automating the creation of prompt variations, the node enhances workflow efficiency, particularly beneficial for NLP-based applications or image generation tasks where prompt fine-tuning is crucial.
-
Integration with XY Plotting: Outputs are engineered to integrate seamlessly into workflows utilizing XY plotting, supporting advanced visualization of variations and results.
For further details and use-case examples, users can visit the Efficiency Nodes Wiki on the GitHub repository.