Visit ComfyUI Online for ready-to-use ComfyUI environment
Facilitates dynamic mask selection based on text comparison for conditional logic in AI art projects.
The YC Mask Condition Switch node is designed to facilitate decision-making processes in your AI art projects by allowing you to dynamically select between two mask outputs based on a text comparison. This node is particularly useful when you need to apply different masks depending on whether a specific condition is met, such as matching input text with a preset text. By providing a straightforward mechanism to switch between two masks, this node enhances the flexibility and adaptability of your workflow, enabling you to create more complex and responsive art pieces. Its primary function is to compare an input text with a preset text and, based on whether they match, output one of two masks, thus offering a conditional logic layer to your creative process.
This parameter represents the text input that you want to compare against a preset text. It is a string value and serves as the basis for determining which mask to output. The comparison can be case-sensitive or case-insensitive, depending on the configuration of the case_sensitive
parameter.
The preset_text parameter is the reference text against which the input_text is compared. It is also a string value and is used to define the condition for switching between the two masks. The comparison outcome determines whether mask_a or mask_b is selected as the output.
This boolean parameter specifies whether the text comparison should be case-sensitive. If set to true, the comparison will consider the case of the characters in both input_text and preset_text. If false, the comparison will ignore case differences, treating uppercase and lowercase characters as equivalent. The default value is true.
This optional parameter is the mask that will be output if the input_text matches the preset_text. It is a mask type and is used to define the visual output when the condition is met.
Similar to mask_a, this optional parameter is the mask that will be output if the input_text does not match the preset_text. It provides an alternative visual output when the condition is not met.
The mask output is the result of the condition switch, providing either mask_a or mask_b based on the text comparison. This output is crucial for determining the visual representation in your project, allowing for dynamic changes based on textual conditions.
This boolean output indicates whether the input_text matched the preset_text. It provides a simple true or false value, which can be used for further logic processing or decision-making in your workflow.
case_sensitive
parameter to control the strictness of your text comparisons, especially when dealing with user inputs that may vary in case.mask_a
and mask_b
to ensure that your node outputs a valid mask even if the input conditions are not met.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.