ComfyUI > Nodes > ComfyUI_XISER_Nodes > String Switch

ComfyUI Node: String Switch

Class Name

XIS_StringSwitch

Category
XISER_Nodes/Logic
Author
grinlau18 (Account age: 944days)
Extension
ComfyUI_XISER_Nodes
Latest Updated
2026-03-20
Github Stars
0.03K

How to Install ComfyUI_XISER_Nodes

Install this extension via the ComfyUI Manager by searching for ComfyUI_XISER_Nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI_XISER_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
  • 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

String Switch Description

XIS_StringSwitch controls string data flow in workflows using a boolean switch for conditional routing.

String Switch:

The XIS_StringSwitch node is designed to provide a flexible mechanism for controlling the flow of string data based on a boolean switch. This node is particularly useful in scenarios where you need to conditionally pass a string value through a workflow, depending on whether a certain condition is met. By toggling the switch, you can either allow the string to proceed or block it, effectively managing the data flow in your creative projects. This capability is essential for AI artists who want to create dynamic and responsive workflows without delving into complex programming logic. The node's primary goal is to simplify decision-making processes by offering a straightforward interface to control string data flow, enhancing the efficiency and creativity of your projects.

String Switch Input Parameters:

enable

The enable parameter is a boolean input that acts as the switch for the node. When set to True, the node allows the string input to pass through to the output. Conversely, when set to False, the node blocks the string input, resulting in a None output. This parameter is crucial for determining whether the string data should be processed or ignored, providing a simple yet powerful control mechanism. The default value is True, meaning the switch is enabled by default, allowing the string to pass unless explicitly disabled.

string_input

The string_input parameter is an optional string input that represents the data you wish to conditionally pass through the node. If the enable parameter is set to True, this string will be outputted; otherwise, the output will be None. This parameter allows you to specify the string data that is subject to the node's conditional logic, making it a versatile tool for managing text-based data in your workflows.

String Switch Output Parameters:

string_output

The string_output parameter is the result of the node's execution, determined by the state of the enable parameter. If enable is True, the string_output will be the same as the string_input. If enable is False, the string_output will be None. This output is essential for understanding the flow of string data in your project, as it reflects the conditional logic applied by the node.

String Switch Usage Tips:

  • Use the enable parameter to dynamically control the flow of string data in your project, allowing for more responsive and adaptable workflows.
  • Consider using this node in conjunction with other logic nodes to create complex decision-making processes without writing code.

String Switch Common Errors and Solutions:

Missing string_input

  • Explanation: The string_input parameter is not provided, resulting in a None output even if enable is True.
  • Solution: Ensure that a valid string is supplied to the string_input parameter when the node is expected to output a string.

Incorrect enable value

  • Explanation: The enable parameter is set incorrectly, causing unexpected behavior in the node's output.
  • Solution: Verify that the enable parameter is set to True when you want the string to pass through and False when you want to block it.

String Switch Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI_XISER_Nodes
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.

String Switch