ComfyUI > Nodes > ComfyUI-RvTools_v2 > Latent Switch v2

ComfyUI Node: Latent Switch v2

Class Name

Latent 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

Latent Switch v2 Description

Facilitates dynamic selection between latent inputs, optimizing AI art generation and VRAM usage.

Latent Switch v2 [RvTools]:

The Latent Switch v2 [RvTools] node is designed to facilitate the dynamic selection between two latent inputs based on a specified condition, enhancing the flexibility and control within your AI art generation workflow. This node is particularly beneficial when you need to toggle between different latent representations, allowing you to experiment with various inputs without manually adjusting your setup each time. Additionally, it includes an option to manage your system's VRAM usage efficiently by purging unused memory, which can be crucial for maintaining optimal performance during intensive tasks. By integrating this node into your workflow, you can streamline the process of switching between latent inputs, thereby improving efficiency and enabling more creative exploration.

Latent Switch v2 [RvTools] Input Parameters:

Input

The Input parameter determines which latent input will be selected and passed through the node. It accepts integer values, with a default of 1, and can be set to either 1 or 2. When set to 1, the node outputs the first latent input (input1), and when set to 2, it outputs the second latent input (input2). This parameter is essential for controlling the flow of data through the node, allowing you to switch between different latent representations as needed.

Purge_VRAM

The Purge_VRAM parameter is a boolean option that, when enabled, triggers the clearing of VRAM to free up memory resources. This can be particularly useful in scenarios where memory management is critical, such as when working with large models or datasets. By default, this parameter is set to False, meaning VRAM purging is not performed unless explicitly activated. Enabling this option can help prevent memory-related issues and ensure smoother operation of your AI art generation tasks.

input1

The input1 parameter is an optional latent input that serves as one of the potential sources for the node's output. It is required to be provided if the Input parameter is set to 1. This parameter allows you to specify the first latent representation that the node can switch to, providing flexibility in choosing between different inputs.

input2

The input2 parameter is another optional latent input, similar to input1, and is required if the Input parameter is set to 2. It allows you to specify the second latent representation that the node can switch to, enabling you to alternate between different inputs based on your creative needs.

Latent Switch v2 [RvTools] Output Parameters:

latent

The latent output parameter represents the selected latent input that is passed through the node based on the Input parameter's value. This output is crucial as it determines the latent representation that will be used in subsequent nodes or processes within your workflow. By providing a flexible mechanism to switch between different latent inputs, this output facilitates experimentation and creative exploration in AI art generation.

Latent Switch v2 [RvTools] Usage Tips:

  • To optimize memory usage, consider enabling the Purge_VRAM option when working with large models or datasets, as this can help prevent memory-related issues and ensure smoother operation.
  • Use the Input parameter to dynamically switch between different latent inputs during your workflow, allowing for quick experimentation and comparison of different representations without manual reconfiguration.

Latent Switch v2 [RvTools] Common Errors and Solutions:

Missing Input: Multi Latent Switch has no active Input

  • Explanation: This error occurs when neither input1 nor input2 is provided, or the Input parameter is set to a value that does not correspond to an available input.
  • Solution: Ensure that the Input parameter is set correctly to either 1 or 2, and that the corresponding latent input (input1 or input2) is provided. If using input1, set Input to 1 and provide a valid latent input for input1. Similarly, if using input2, set Input to 2 and provide a valid latent input for input2.

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

Latent Switch v2