ComfyUI > Nodes > ComfyUI-JDCN > JDCN_SwapInputs

ComfyUI Node: JDCN_SwapInputs

Class Name

JDCN_SwapInputs

Category
🔵 JDCN 🔵
Author
daxcay (Account age: 93days)
Extension
ComfyUI-JDCN
Latest Updated
2024-06-13
Github Stars
0.06K

How to Install ComfyUI-JDCN

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

Run ComfyUI Online

JDCN_SwapInputs Description

Facilitates dynamic input swapping based on boolean condition for workflow efficiency in AI art generation tasks.

JDCN_SwapInputs:

The JDCN_SwapInputs node is designed to facilitate the swapping of two input values based on a boolean condition. This node is particularly useful in scenarios where you need to dynamically interchange the positions of two inputs during the execution of a workflow. By leveraging this node, you can streamline processes that require conditional swapping, thereby enhancing the flexibility and efficiency of your AI art generation tasks. The primary function of this node is to check the boolean parameter and swap the inputs if the condition is met, otherwise, it retains the original order of the inputs.

JDCN_SwapInputs Input Parameters:

inputA

inputA is the first input value that you want to potentially swap with inputB. This parameter can accept any type of data, making it versatile for various use cases. The value of inputA will be swapped with inputB if the SwapIT condition is true.

inputB

inputB is the second input value that you want to potentially swap with inputA. Similar to inputA, this parameter can accept any type of data. The value of inputB will be swapped with inputA if the SwapIT condition is true.

SwapIT

SwapIT is a boolean parameter that determines whether the inputs should be swapped. If SwapIT is set to true, inputA and inputB will be swapped. If it is set to false, the inputs will remain in their original order. The default value for SwapIT is false.

JDCN_SwapInputs Output Parameters:

outputA

outputA is the first output value after the potential swap. If SwapIT is true, outputA will contain the value of inputB. If SwapIT is false, outputA will retain the value of inputA.

outputB

outputB is the second output value after the potential swap. If SwapIT is true, outputB will contain the value of inputA. If SwapIT is false, outputB will retain the value of inputB.

JDCN_SwapInputs Usage Tips:

  • Use the SwapIT parameter to control the swapping dynamically based on conditions in your workflow.
  • Ensure that both inputA and inputB are of compatible types to avoid unexpected behavior during the swap.
  • Utilize this node in scenarios where conditional swapping can simplify your workflow logic and improve efficiency.

JDCN_SwapInputs Common Errors and Solutions:

Incompatible input types

  • Explanation: If inputA and inputB are of incompatible types, the node may not function as expected.
  • Solution: Ensure that both inputs are of compatible types before using the node.

Missing input values

  • Explanation: If either inputA or inputB is not provided, the node will not be able to perform the swap.
  • Solution: Make sure to provide valid values for both inputA and inputB before executing the node.

Invalid boolean value for SwapIT

  • Explanation: If SwapIT is not a boolean value, the node will not be able to determine whether to swap the inputs.
  • Solution: Ensure that SwapIT is set to either true or false.

JDCN_SwapInputs Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-JDCN
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.