Visit ComfyUI Online for ready-to-use ComfyUI environment
Automate prompt selection for AI artists, switch between text prompts based on line number, streamline workflow efficiency.
The SwitchPrompt node is designed to streamline the process of selecting and switching between different text prompts within a workflow. This node is particularly useful for AI artists who need to manage multiple prompts efficiently, allowing them to dynamically choose a specific prompt based on a given line number. By automating the selection process, SwitchPrompt helps in maintaining a smooth workflow, reducing manual intervention, and ensuring that the correct prompt is used at the right time. This can be especially beneficial in complex projects where multiple prompts are used to generate varied outputs.
The line
parameter specifies the line number of the prompt you want to select from the provided list of prompts. It is a string that represents an integer value, with the default being '1'. This parameter is crucial as it determines which prompt will be chosen from the list. The value should be a positive integer, and it is important to ensure that it corresponds to a valid line number within the provided prompts.
The prompts
parameter is a string containing multiple prompts separated by newline characters. Each line represents a different prompt that can be selected based on the line
parameter. This parameter allows you to input a list of prompts in a single string, making it easier to manage and switch between them. The prompts should be formatted correctly, with each prompt on a new line to ensure accurate selection.
The prompt
output parameter returns the selected prompt based on the specified line number. This output is a string that contains the exact text of the chosen prompt. It is essential for ensuring that the correct prompt is used in subsequent nodes or processes within the workflow. The output helps in maintaining consistency and accuracy in the generated results.
line
parameter corresponds to a valid line number within the prompts
string to avoid errors.prompts
string correctly, with each prompt on a new line, to ensure accurate selection.line
number exceeds the number of available prompts in the prompts
string.line
parameter is within the range of the number of prompts provided. Check the total number of prompts and adjust the line
parameter accordingly.line
parameter cannot be converted to an integer, possibly due to non-numeric characters.line
parameter is a valid string representation of an integer. Ensure that it contains only numeric characters and no spaces or special characters.prompts
string is empty or does not contain any valid prompts.prompts
string with at least one prompt. Ensure that each prompt is on a new line and the string is not empty.© Copyright 2024 RunComfy. All Rights Reserved.