ComfyUI Node: List Selector

Class Name

ListSelector

Category
Santodan/Prompt
Author
Santodan (Account age: 3353days)
Extension
Santodan Random LoRA Node
Latest Updated
2026-02-24
Github Stars
0.03K

How to Install Santodan Random LoRA Node

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

List Selector Description

The `ListSelector` node efficiently manages and iterates lists for dynamic data processing in workflows.

List Selector:

The ListSelector node is designed to manage and manipulate lists of prompts or data efficiently within a node-based workflow. Its primary purpose is to allow you to select, iterate, and manage lists dynamically, providing flexibility in how data is processed. The node can operate in different modes, such as selecting all items, a specific item, or incrementally iterating through the list. This functionality is particularly beneficial for AI artists who need to automate the selection and processing of multiple prompts or data entries, ensuring a streamlined workflow. By maintaining state across node instances, ListSelector ensures that each node can independently track its position within a list, making it a powerful tool for managing complex data flows in creative projects.

List Selector Input Parameters:

mode

The mode parameter determines how the ListSelector node interacts with the list of prompts. It can be set to "all_run" to process the entire list, "selected" to choose a specific item based on an index, or "increment" to iterate through the list one item at a time. This parameter is crucial as it defines the node's behavior and the scope of data it processes. There are no explicit minimum or maximum values, but the options are limited to the predefined modes.

index

The index parameter is used when the mode is set to "selected." It specifies the position of the item in the list that you want to select. The index must be a non-negative integer and should be within the bounds of the list size. If the index is out of range, the node will return an empty result for that selection.

reset_counter

The reset_counter parameter is a boolean toggle that, when set to True, resets the current index of the list to zero. This is useful for restarting the iteration process from the beginning of the list, especially in scenarios where you want to repeat the list processing from scratch.

stop_at_end

The stop_at_end parameter is a boolean that determines the behavior of the node when it reaches the end of the list in "increment" mode. If set to True, the node will halt processing when the end of the list is reached, requiring manual intervention to restart. If False, the node will loop back to the start of the list, allowing continuous processing.

List Selector Output Parameters:

prompt_list

The prompt_list output parameter provides the list of prompts or data items that have been selected or processed based on the current mode and index. In "all_run" mode, it returns the entire list, while in "selected" mode, it returns the item at the specified index. In "increment" mode, it returns the current item and updates the index for the next iteration.

current_index

The current_index output parameter indicates the current position within the list. This is particularly useful for tracking progress when iterating through a list in "increment" mode. It helps you understand which item is currently being processed and can be used to resume processing from the correct position if needed.

List Selector Usage Tips:

  • Use the "increment" mode for sequential processing of list items, which is ideal for tasks that require step-by-step iteration through data.
  • Set reset_counter to True when you need to restart the list processing from the beginning, ensuring that no items are skipped.
  • Utilize the stop_at_end parameter to control whether the list processing should loop or halt at the end, depending on your workflow requirements.

List Selector Common Errors and Solutions:

Index out of range

  • Explanation: This error occurs when the specified index is outside the bounds of the list size.
  • Solution: Ensure that the index is a valid non-negative integer within the range of the list size.

Empty list processing

  • Explanation: This error happens when the node attempts to process an empty list.
  • Solution: Verify that the list is populated with data before processing, or handle the empty list scenario gracefully in your workflow.

List Selector Related Nodes

Go back to the extension to check out more related nodes.
Santodan Random LoRA Node
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.