ComfyUI > Nodes > ComfyUI-RvTools_v2 > Image Switch v2

ComfyUI Node: Image Switch v2

Class Name

Image Switch v2 [RvTools]

Category
🫦 RvTools II/ Switches
Author
r-vage (Account age: 317days)
Extension
ComfyUI-RvTools_v2
Latest Updated
2026-03-27
Github Stars
0.02K

How to Install ComfyUI-RvTools_v2

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

Dynamic image selection node for toggling between inputs with VRAM management for efficiency.

Image Switch v2 [RvTools]:

The Image Switch v2 [RvTools] node is designed to facilitate the dynamic selection between two image inputs based on a specified condition. This node is particularly useful in workflows where you need to toggle between different image sources, allowing for flexible and efficient image processing. One of its key features is the ability to manage GPU memory usage through an optional parameter that purges VRAM, ensuring optimal performance and resource management. By providing a straightforward mechanism to switch between images, this node enhances the versatility and adaptability of your image processing tasks, making it an essential tool for AI artists looking to streamline their creative processes.

Image Switch v2 [RvTools] Input Parameters:

Input

The Input parameter determines which image input will be selected for output. It accepts integer values, with a minimum of 1 and a maximum of 2. The default value is 1, which means that if no other value is specified, the first image input will be chosen. This parameter is crucial for directing the node to output the desired image based on your workflow requirements.

Purge_VRAM

The Purge_VRAM parameter is a boolean option that, when set to True, triggers the clearing of GPU memory. This is particularly beneficial in scenarios where memory management is critical, such as when working with large images or complex models. By default, this parameter is set to False, meaning that VRAM will not be purged unless explicitly specified. Utilizing this option can help prevent memory overflow and improve the overall efficiency of your image processing tasks.

input1

The input1 parameter is an optional image input that serves as one of the potential sources for the node's output. It is required to be provided if you intend to use it as a selectable image. This parameter allows you to input an image that can be chosen based on the Input parameter's value.

input2

Similar to input1, the input2 parameter is an optional image input that can be selected as the output image. It must be provided if you wish to use it as an alternative image source. This parameter works in conjunction with the Input parameter to determine which image is outputted by the node.

Image Switch v2 [RvTools] Output Parameters:

image

The image output parameter represents the selected image based on the Input parameter's value. This output is crucial as it provides the image that will be used in subsequent nodes or processes within your workflow. The ability to dynamically switch between images allows for greater flexibility and adaptability in your image processing tasks.

Image Switch v2 [RvTools] Usage Tips:

  • To optimize performance, especially when working with large images or limited GPU resources, consider enabling the Purge_VRAM option to clear unused memory.
  • Use the Input parameter to dynamically switch between different image sources, allowing for flexible and adaptive workflows that can respond to varying conditions or requirements.

Image Switch v2 [RvTools] Common Errors and Solutions:

Missing Input: Multi Image Switch has no active Input.

  • Explanation: This error occurs when none of the image inputs (input1 or input2) are provided to the node.
  • Solution: Ensure that at least one of the image inputs is connected to the node to avoid this error.

CUDA out of memory

  • Explanation: This error indicates that the GPU does not have enough memory to process the images.
  • Solution: Enable the Purge_VRAM option to clear unused memory, or reduce the size of the images being processed to fit within the available GPU memory.

Image Switch v2 Related Nodes

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