Visit ComfyUI Online for ready-to-use ComfyUI environment
Load images with switch for conditional loading control in workflows, enhancing flexibility and efficiency.
The LoadImageWithSwitch
node is designed to load an image from a specified directory with an optional switch to enable or disable the loading process. This node is particularly useful when you need to conditionally load images based on certain criteria or user input. By incorporating a switch, it provides flexibility and control over the image loading process, allowing you to streamline workflows and avoid unnecessary operations when the loading is not required. This can be especially beneficial in complex image processing pipelines where conditional logic is necessary.
This parameter allows you to select the image file you wish to load. The available options are dynamically populated from the input directory, ensuring you can easily choose from existing files. The image_upload
option is enabled, allowing you to upload an image directly if needed. This parameter is required for the node to function.
This optional boolean parameter controls whether the image loading process is enabled or disabled. When set to True
(default), the node will proceed to load the specified image. If set to False
, the node will skip the loading process and return None
for the image and mask outputs. This parameter is useful for conditionally controlling the node's behavior based on external factors or user input. The labels for this parameter are "enabled" for True
and "disabled" for False
.
This output provides the loaded image if the enabled
parameter is set to True
. If enabled
is False
, this output will be None
. The image output is essential for subsequent image processing tasks in your workflow.
This output provides the mask associated with the loaded image if the enabled
parameter is set to True
. If enabled
is False
, this output will be None
. The mask can be used for various image processing operations, such as segmentation or masking specific regions of the image.
This output returns the value of the enabled
parameter, indicating whether the image loading process was executed or skipped. This can be useful for debugging or conditional logic in your workflow.
enabled
parameter to conditionally control the image loading process based on specific criteria or user input, optimizing your workflow by avoiding unnecessary operations.image
parameter options are dynamically populated from this directory.<image>
image
parameter.image
parameter. If the desired image is not listed, ensure it is present in the input directory and refresh the node.enabled
parameter is set to False
.enabled
parameter is set to True
. If the loading is intentionally disabled, no action is needed.© Copyright 2024 RunComfy. All Rights Reserved.