ComfyUI > Nodes > ComfyUI_XISER_Nodes > Image Switch

ComfyUI Node: Image Switch

Class Name

XIS_ImageSwitch

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

Image Switch Description

XIS_ImageSwitch controls image flow in workflows by toggling output based on a boolean condition.

Image Switch:

The XIS_ImageSwitch node is designed to function as a conditional gate for image data within a node-based workflow. Its primary purpose is to control the flow of image data based on a boolean condition, effectively acting as an on/off switch for images. This node is particularly useful in scenarios where you need to dynamically decide whether to pass an image forward in a processing pipeline or to halt its progression based on certain conditions. By providing a simple yet powerful mechanism to enable or disable image output, the XIS_ImageSwitch node enhances the flexibility and control within your creative workflows, allowing for more dynamic and responsive image processing setups.

Image Switch Input Parameters:

enable

The enable parameter is a boolean input that determines whether the image input should be passed through the node. When set to True, the node will output the provided image; when set to False, the node will output None, effectively blocking the image from proceeding further in the workflow. This parameter is crucial for controlling the conditional flow of images and can be used to implement logic-based decisions in your node setup. The default value is True, meaning the switch is enabled by default.

image_input

The image_input parameter is an optional input that accepts an image. This is the image that will be conditionally passed through the node based on the state of the enable parameter. If no image is provided, the node will simply output None regardless of the enable state. This parameter allows for flexibility in handling image data, as it can be left unconnected if the image is not always required.

Image Switch Output Parameters:

image_output

The image_output parameter is the result of the node's execution. It outputs the image provided to the image_input if the enable parameter is set to True. If enable is False, the output will be None, effectively stopping the image from being passed on. This output is essential for controlling the flow of images in a node-based environment, allowing for conditional processing and decision-making.

Image Switch Usage Tips:

  • Use the enable parameter to create conditional branches in your workflow, allowing for dynamic image processing based on external conditions or user input.
  • Combine the XIS_ImageSwitch node with other logic nodes to build complex decision trees that can adapt to different scenarios and requirements.

Image Switch Common Errors and Solutions:

Image not passing through

  • Explanation: This error occurs when the enable parameter is set to False, preventing the image from being output.
  • Solution: Ensure that the enable parameter is set to True if you want the image to pass through the node.

No image output when expected

  • Explanation: This can happen if no image is connected to the image_input parameter, resulting in a None output.
  • Solution: Verify that an image is correctly connected to the image_input parameter and that the enable parameter is set to True.

Image 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.