ComfyUI > Nodes > ComfyUI-YCNodes > Image Selector

ComfyUI Node: Image Selector

Class Name

ImageSelector

Category
YCNode/Image
Author
yichengup (Account age: 473days)
Extension
ComfyUI-YCNodes
Latest Updated
2025-06-03
Github Stars
0.02K

How to Install ComfyUI-YCNodes

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

Image Selector Description

Facilitates dynamic image selection based on custom names for further processing or display.

Image Selector:

The ImageSelector node is designed to facilitate the selection of a specific image from a set of images based on user-defined names. This node is particularly useful in scenarios where you have multiple images and need to dynamically choose one for further processing or display. By allowing you to assign custom names to each image, the ImageSelector provides a flexible and intuitive way to manage and access images. Its primary function is to map images to their respective names and retrieve the desired image based on the selected name. This capability is essential for workflows that require precise image selection without manually handling image indices or complex data structures.

Image Selector Input Parameters:

selected_name

The selected_name parameter allows you to specify the name of the image you wish to select from the available set. This parameter can be directly inputted or connected through an input port. It is crucial for determining which image is retrieved by the node. If not provided, the node defaults to selecting the first valid image name. The default value is "image1", and it should match one of the names assigned to the images.

image1, image2, ..., image10

These parameters represent the images you can input into the node. Each image parameter corresponds to a specific name parameter (e.g., image1 corresponds to name1). You can input up to ten images, and each image should be associated with a unique name to facilitate selection.

name1, name2, ..., name10

These parameters are the names assigned to each corresponding image input. They allow you to label your images with meaningful identifiers, making it easier to select the desired image using the selected_name parameter. The default values are "image1", "image2", ..., "image10", respectively.

Image Selector Output Parameters:

IMAGE

The output of the ImageSelector node is the selected image, returned as a tensor. This output is crucial for subsequent processing steps, as it provides the specific image chosen based on the selected_name parameter. The node ensures that the output is in a format suitable for further operations, such as image transformations or analysis.

Image Selector Usage Tips:

  • Ensure that each image input is paired with a unique and descriptive name to make the selection process intuitive and error-free.
  • If you frequently switch between different images, consider using a dynamic input for selected_name to automate the selection process based on external conditions or user input.
  • Use the VALIDATE_INPUTS method to verify that your input names and selected name are correctly configured before executing the node, preventing runtime errors.

Image Selector Common Errors and Solutions:

未找到名称: <selected_name>

  • Explanation: This error occurs when the selected_name provided does not match any of the names assigned to the input images.
  • Solution: Double-check the selected_name to ensure it matches one of the names you have assigned to the images. Verify that there are no leading or trailing spaces in the name.

没有有效的图像输入

  • Explanation: This error indicates that no valid images were provided to the node.
  • Solution: Ensure that at least one image is inputted into the node and that it is associated with a valid name.

名称列表不能为空

  • Explanation: This error arises when the list of names for the images is empty.
  • Solution: Provide a list of names corresponding to each image input, ensuring that the list is not empty and matches the number of images provided.

图像数量与名称数量不匹配

  • Explanation: This error occurs when the number of images does not match the number of names provided.
  • Solution: Ensure that each image has a corresponding name and that the total number of images matches the total number of names.

Image Selector Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-YCNodes
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 Playground, enabling artists to harness the latest AI tools to create incredible art.