ComfyUI Node: Text Switch

Class Name

Text_Switch

Category
Text Translation
Author
TFL-TFL (Account age: 2213days)
Extension
ComfyUI_Text_Translation
Latest Updated
2025-05-25
Github Stars
0.12K

How to Install ComfyUI_Text_Translation

Install this extension via the ComfyUI Manager by searching for ComfyUI_Text_Translation
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI_Text_Translation 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
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Text Switch Description

Text_Switch enables conditional text flow control in node systems using a boolean toggle.

Text Switch:

The Text_Switch node is designed to provide a simple yet effective mechanism for conditionally controlling the flow of text data within a node-based system. Its primary purpose is to allow users to toggle the output of a given text string based on a boolean switch. This node is particularly useful in scenarios where you need to dynamically decide whether to pass a text string forward in a workflow or to suppress it based on certain conditions. By integrating this node, you can streamline processes that require conditional text handling, enhancing the flexibility and efficiency of your text processing tasks.

Text Switch Input Parameters:

switch

The switch parameter is a boolean input that determines whether the text string should be passed through or not. When set to True, the text is output as is; when set to False, the output is an empty string. This parameter is crucial for controlling the flow of text data based on dynamic conditions. The default value is True, with options labeled as "on" for True and "off" for False.

text

The text parameter is a string input that represents the text data you wish to conditionally output. This parameter requires input, meaning you must provide a text string for the node to function. The content of this parameter is what will be conditionally passed through based on the state of the switch parameter.

Text Switch Output Parameters:

string

The string output parameter provides the result of the conditional operation. If the switch is True, this output will be the same as the input text. If the switch is False, this output will be an empty string. This output is essential for determining the flow of text data in your node-based workflow, allowing for dynamic text processing based on conditional logic.

Text Switch Usage Tips:

  • Use the switch parameter to control the flow of text data dynamically, enabling or disabling text output based on specific conditions in your workflow.
  • Consider using the Text_Switch node in conjunction with other nodes that generate or modify text to create complex, conditional text processing pipelines.

Text Switch Common Errors and Solutions:

Missing text input

  • Explanation: The text parameter requires input, and if it is not provided, the node cannot function correctly.
  • Solution: Ensure that you provide a valid text string to the text parameter before executing the node.

Invalid switch value

  • Explanation: The switch parameter must be a boolean value (True or False). Providing a non-boolean value can cause unexpected behavior.
  • Solution: Verify that the switch parameter is set to either True or False to ensure proper node operation.

Text Switch Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI_Text_Translation
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.