ComfyUI > Nodes > Crystools > 🪛 Switch mask

ComfyUI Node: 🪛 Switch mask

Class Name

Switch mask [Crystools]

Category
crystools 🪛/Switch
Author
Crystian (Account age: 4118days)
Extension
Crystools
Latest Updated
2024-06-20
Github Stars
0.49K

How to Install Crystools

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

🪛 Switch mask Description

Dynamically select between mask inputs based on boolean condition for flexible AI art workflows.

Switch mask [Crystools]:

The Switch mask [Crystools] node is designed to dynamically select between two different mask inputs based on a boolean condition. This node is particularly useful in scenarios where you need to apply different masks depending on a specific condition, allowing for more flexible and adaptive workflows in your AI art projects. By leveraging this node, you can streamline your process and ensure that the appropriate mask is applied automatically, enhancing the efficiency and effectiveness of your creative endeavors.

Switch mask [Crystools] Input Parameters:

on_true

This parameter accepts a mask that will be used if the boolean condition is true. The mask should be in the format expected by the node, typically a binary or grayscale image where the mask is applied.

on_false

This parameter accepts a mask that will be used if the boolean condition is false. Similar to the on_true parameter, this mask should be in the appropriate format for the node to process.

boolean

This parameter is a boolean value that determines which mask to use. If set to true, the on_true mask will be selected; if set to false, the on_false mask will be selected. The default value is true.

Switch mask [Crystools] Output Parameters:

mask

The output parameter mask is the selected mask based on the boolean condition. This output will be either the on_true or on_false mask, depending on the value of the boolean parameter. The output mask can then be used in subsequent nodes or processes within your workflow.

Switch mask [Crystools] Usage Tips:

  • Use the Switch mask [Crystools] node to automate the selection of masks based on specific conditions, reducing manual intervention and streamlining your workflow.
  • Ensure that both on_true and on_false masks are pre-processed and in the correct format to avoid any issues during execution.
  • Combine this node with other conditional nodes to create complex, adaptive workflows that respond to various inputs and conditions dynamically.

Switch mask [Crystools] Common Errors and Solutions:

Invalid mask format

  • Explanation: The provided mask is not in the expected format.
  • Solution: Ensure that the mask is a binary or grayscale image and conforms to the expected input specifications.

Boolean parameter missing

  • Explanation: The boolean parameter is not provided.
  • Solution: Make sure to include the boolean parameter in the node configuration, as it is required to determine which mask to select.

Mask not found

  • Explanation: One of the mask inputs (on_true or on_false) is missing or not properly connected.
  • Solution: Verify that both on_true and on_false masks are correctly connected and available for the node to process.

🪛 Switch mask Related Nodes

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