ComfyUI > Nodes > Dapao-Toolbox > 多图片开关节点 🔢@炮老师的小课堂

ComfyUI Node: 多图片开关节点 🔢@炮老师的小课堂

Class Name

DapaoImageMultiSwitchNode

Category
🤖Dapao-Toolbox
Author
paolaoshi (Account age: 0days)
Extension
Dapao-Toolbox
Latest Updated
2026-03-18
Github Stars
0.04K

How to Install Dapao-Toolbox

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

多图片开关节点 🔢@炮老师的小课堂 Description

DapaoImageMultiSwitchNode enables dynamic selection and switching of multiple image inputs.

多图片开关节点 🔢@炮老师的小课堂:

The DapaoImageMultiSwitchNode, also known as the "多图片开关节点," is a versatile tool designed to handle multiple image inputs and intelligently select one based on specified criteria. This node is particularly beneficial for workflows that require dynamic image selection from a set of inputs, allowing you to streamline processes that involve multiple image sources. By providing a mechanism to switch between images, it enhances flexibility and control over image processing tasks. The node supports a range of functionalities, including looping through images and skipping empty inputs, making it a powerful component for managing complex image workflows efficiently.

多图片开关节点 🔢@炮老师的小课堂 Input Parameters:

image0, image1, ..., imageN

These parameters represent the multiple image inputs that the node can handle. The node is designed to accept a default of 2 images but can manage up to 20 images, allowing for extensive flexibility in image selection. Each image input can be specified independently, and the node will intelligently choose one based on the selection criteria provided. The ability to handle multiple images makes it ideal for scenarios where you need to dynamically switch between different image sources.

select_index

This parameter determines which image from the input set should be selected. It is an integer value that specifies the index of the image to be output. The index is zero-based, meaning that an index of 0 corresponds to the first image, 1 to the second, and so on. This parameter is crucial for directing the node to output the desired image from the available inputs.

loop_mode

This boolean parameter enables or disables looping through the images. When set to true, the node will cycle through the images continuously, allowing for repeated selection beyond the last image. This is particularly useful in scenarios where you want to create a continuous loop of images for animations or presentations.

skip_empty

This boolean parameter, when enabled, instructs the node to skip any empty or null image inputs. This ensures that only valid images are considered for selection, preventing errors or interruptions in the workflow due to missing images. It is especially useful in dynamic environments where the availability of images may vary.

多图片开关节点 🔢@炮老师的小课堂 Output Parameters:

selected_image

This output parameter provides the image that has been selected based on the input criteria. It is the primary output of the node and represents the image that will be used in subsequent processing steps. The selected image is determined by the select_index and other input parameters, ensuring that the correct image is chosen from the available inputs.

info_text

This output provides a textual summary of the node's operation, including details such as the selected image index, total number of images, and any active modes like looping or skipping empty inputs. This information is useful for debugging and understanding the node's behavior in the context of the overall workflow.

selected_idx

This output indicates the index of the selected image, providing a numerical reference to the chosen image within the input set. It is useful for tracking which image was selected, especially in complex workflows with multiple image inputs.

total_images

This output provides the total number of images available in the input set. It is useful for understanding the scope of the input data and for making decisions about image selection and processing.

多图片开关节点 🔢@炮老师的小课堂 Usage Tips:

  • Use the select_index parameter to dynamically choose images based on external conditions or user input, allowing for flexible image selection in your workflow.
  • Enable loop_mode for applications that require continuous cycling through images, such as creating animations or slideshows.

多图片开关节点 🔢@炮老师的小课堂 Common Errors and Solutions:

"Index out of range"

  • Explanation: This error occurs when the select_index parameter is set to a value that exceeds the number of available images.
  • Solution: Ensure that the select_index is within the range of the total number of images provided as input.

"Empty image input"

  • Explanation: This error arises when an image input is expected but not provided, and skip_empty is not enabled.
  • Solution: Either provide valid images for all inputs or enable skip_empty to bypass empty inputs.

多图片开关节点 🔢@炮老师的小课堂 Related Nodes

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

多图片开关节点 🔢@炮老师的小课堂