ComfyUI Node: Text Condition

Class Name

Zuellni Text Condition

Category
Zuellni/Text
Author
m957ymj75urz (Account age: 577days)
Extension
m957ymj75urz/ComfyUI-Custom-Nodes
Latest Updated
2023-09-19
Github Stars
0.04K

How to Install m957ymj75urz/ComfyUI-Custom-Nodes

Install this extension via the ComfyUI Manager by searching for m957ymj75urz/ComfyUI-Custom-Nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter m957ymj75urz/ComfyUI-Custom-Nodes in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Text Condition Description

Evaluate conditions between variables to control AI art workflow logic with dynamic comparisons for decision-making in projects.

Text Condition:

The Zuellni Text Condition node is designed to evaluate conditions between two variables and return specific outputs based on the result of the evaluation. This node is particularly useful for creating conditional logic within your AI art workflows, allowing you to control the flow of operations based on dynamic comparisons. By leveraging this node, you can introduce sophisticated decision-making capabilities into your projects, enhancing the flexibility and responsiveness of your AI-generated art. The node supports a variety of comparison operations, including equality, inequality, and string-specific checks, making it a versatile tool for a wide range of applications.

Text Condition Input Parameters:

var_1

This parameter represents the first variable to be compared. It accepts a string input, which can be converted to a float if necessary. The value of var_1 is crucial as it serves as one of the operands in the comparison operation. The default value is an empty string.

condition

This parameter specifies the type of comparison to be performed between var_1 and var_2. The available options are ==, !=, <, <=, >, >=, contains, starts with, and ends with. The default condition is ==. This parameter determines the logic that will be applied to evaluate the relationship between the two variables.

var_2

This parameter represents the second variable to be compared against var_1. Similar to var_1, it accepts a string input that can be converted to a float if necessary. The value of var_2 is essential as it serves as the other operand in the comparison operation. The default value is an empty string.

interrupt

This boolean parameter indicates whether the process should be interrupted if the condition is not met. The available options are True and False, with the default being False. If set to True, an InterruptProcessingException will be raised when the condition is not satisfied, halting further execution.

images

This optional parameter allows you to pass image data that will be returned if the condition is met. It is useful for workflows that involve image processing based on conditional logic.

latents

This optional parameter allows you to pass latent data that will be returned if the condition is met. It is useful for workflows that involve latent space manipulations based on conditional logic.

masks

This optional parameter allows you to pass mask data that will be returned if the condition is met. It is useful for workflows that involve mask operations based on conditional logic.

Text Condition Output Parameters:

IMAGES

This output parameter returns the image data passed through the images input parameter if the condition is met. If the condition is not met, it returns None.

LATENTS

This output parameter returns the latent data passed through the latents input parameter if the condition is met. If the condition is not met, it returns None.

MASKS

This output parameter returns the mask data passed through the masks input parameter if the condition is met. If the condition is not met, it returns None.

RESULT

This output parameter returns a string indicating the result of the condition evaluation. It returns "true" if the condition is met and "false" if it is not. This output is useful for further decision-making processes in your workflow.

Text Condition Usage Tips:

  • Ensure that var_1 and var_2 are in compatible formats for the chosen condition to avoid unexpected results.
  • Use the interrupt parameter to control the flow of your workflow, especially in complex pipelines where certain conditions must be met to proceed.
  • Leverage the optional images, latents, and masks parameters to pass through relevant data only when specific conditions are satisfied, optimizing your workflow's efficiency.

Text Condition Common Errors and Solutions:

Invalid condition key

  • Explanation: The specified condition is not one of the supported options.
  • Solution: Ensure that the condition parameter is set to one of the following: ==, !=, <, <=, >, >=, contains, starts with, ends with.

TypeError: 'float' object is not iterable

  • Explanation: The contains, starts with, or ends with condition was used with numeric values.
  • Solution: Ensure that var_1 and var_2 are strings when using string-specific conditions like contains, starts with, or ends with.

InterruptProcessingException

  • Explanation: The interrupt parameter is set to True, and the condition was not met, causing the process to halt.
  • Solution: Review the logic of your condition and ensure that it is expected to be met under the given circumstances, or set interrupt to False if interruption is not desired.

Text Condition Related Nodes

Go back to the extension to check out more related nodes.
m957ymj75urz/ComfyUI-Custom-Nodes
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.