Visit ComfyUI Online for ready-to-use ComfyUI environment
Facilitates text-based decision-making and conditional image selection in AI art workflows.
The YC Text Condition Switch node is designed to facilitate decision-making processes based on text comparison. It allows you to compare an input text against a preset text and determine whether they match. This node is particularly useful in scenarios where you need to conditionally select between two images based on the result of the text comparison. By providing a straightforward mechanism to handle text-based conditions, it enhances the flexibility and control within your AI art workflows, enabling you to automate decisions and streamline processes based on textual data.
This parameter represents the text input that you want to compare against a preset text. It is a string value and serves as the primary input for the condition check. The comparison's outcome will depend on this text, making it crucial for determining the node's behavior. There are no specific minimum or maximum values, but it defaults to an empty string.
The preset_text parameter is the reference text against which the input_text is compared. It is also a string value and acts as the benchmark for the comparison. The node uses this text to decide whether the input_text matches, influencing the output image selection. Like input_text, it defaults to an empty string.
This boolean parameter determines whether the text comparison should be case-sensitive. If set to true, the comparison will consider the case of the characters, meaning "Text" and "text" would be considered different. If false, the comparison ignores case differences, treating "Text" and "text" as identical. The default value is true, which means the comparison is case-sensitive by default.
This optional parameter is an image that will be output if the input_text matches the preset_text. It allows you to specify the image to be used when the condition is met, providing a visual representation of a successful match. There is no default image, and it is only used if provided.
Similar to image_a, this optional parameter is an image that will be output if the input_text does not match the preset_text. It serves as the alternative visual output when the condition is not met, allowing you to handle mismatches effectively. Like image_a, there is no default image, and it is only used if provided.
This output parameter is the image selected based on the text comparison result. If the input_text matches the preset_text, image_a is returned; otherwise, image_b is returned. This output provides a visual indication of the comparison result, making it a crucial part of the node's functionality.
The is_matched output is a boolean value indicating whether the input_text matched the preset_text. It returns true if the texts match and false otherwise. This output is essential for understanding the result of the text comparison and can be used to trigger further actions or decisions in your workflow.
RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.