ComfyUI Node: Random List Picker

Class Name

Random List Picker

Category
utils
Author
Expo (Account age: 5215days)
Extension
LM Studio Image to Text Node for ComfyUI
Latest Updated
2026-03-11
Github Stars
0.05K

How to Install LM Studio Image to Text Node for ComfyUI

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

Random List Picker Description

Random List Picker node randomly selects items from a list with options for weighting, shuffling, and customization.

Random List Picker:

The Random List Picker node is a versatile tool designed for ComfyUI that allows you to randomly select items from a list with various customization options. Its primary purpose is to facilitate the random selection of one or more items from a user-provided list, which can be particularly useful in creative applications where randomness is desired. The node supports weighted picking, allowing you to assign different probabilities to each item by appending a weight to them. Additionally, it offers a shuffle mode to return the entire list in a random order. You can also customize the output by injecting selected items into a template string, or by adding prefixes and suffixes. The node provides case control to transform the text case of the selected items and allows you to specify a separator for joining multiple picks. It includes an exclude list to prevent certain items from being chosen and a fallback value for when no items are available for selection. The node can draw a specified number of unique items in one pass and provides the index of the first chosen item. With the ability to set a seed, you can achieve reproducible results or fresh randomness with each run.

Random List Picker Input Parameters:

items

This parameter is a newline-separated list of items from which the node will randomly select. Each item can optionally have a weight appended using the format item::weight to influence its selection probability. There is no explicit minimum or maximum value, but the list should be formatted correctly for optimal results.

template

A string that allows you to inject the selected item(s) into a custom format. Use {item} within the template to specify where the selected item should be placed. The default is an empty string, meaning no template is applied.

prefix

A string that will be added before each selected item if no template is used. The default is an empty string.

suffix

A string that will be added after each selected item if no template is used. The default is an empty string.

exclude

A multiline string where each line represents an item that should never be selected. Matching is case-insensitive. The default is an empty string.

fallback

A string value that is returned when no items remain after applying exclusions. The default is an empty string.

count

An integer specifying the number of unique items to pick in one pass. It is automatically capped at the size of the list. The default is 1, with a minimum of 1 and a maximum of 100.

separator

A string used to join multiple picked items. Common examples include ", ", " | ", or a newline character. The default is ", ".

case

Specifies the case transformation applied to each picked item. Options include original, uppercase, lowercase, title, and sentence. The default is original.

mode

Determines the operation mode of the node. Options are pick for selecting random items and shuffle for returning the entire list in a random order. The default is pick.

seed

An integer used to initialize the random number generator. Use -1 for a new random result each run, or any other value for reproducible results. The default is -1, with a minimum of -1 and a maximum of 0x7FFFFFFF.

Random List Picker Output Parameters:

joined

This output is a string containing the selected item(s), joined by the specified separator. It reflects the final result of the random selection process.

prompt

A string that represents the final output after applying the template, prefix, and suffix to the selected item(s). It provides a formatted version of the selection.

total

An integer indicating the total number of items available for selection after applying exclusions. It helps you understand the size of the usable list.

chosen_index

An integer representing the zero-based index of the first chosen item in the original list. It is useful for identifying the position of the selected item.

Random List Picker Usage Tips:

  • Use the weight feature to influence the likelihood of certain items being picked, which can be useful for creating more balanced random selections.
  • Utilize the template, prefix, and suffix options to customize the output format, making it easier to integrate the selected items into larger projects or workflows.
  • Experiment with the case parameter to ensure the selected items match the desired text style, which can be important for maintaining consistency in your outputs.

Random List Picker Common Errors and Solutions:

No items remain after exclusions

  • Explanation: This error occurs when all items in the list are excluded, leaving no items available for selection.
  • Solution: Review the exclude list to ensure it does not inadvertently block all items. Adjust the list or provide a suitable fallback value.

Invalid weight format

  • Explanation: This error arises when an item in the list has an improperly formatted weight, such as missing the :: separator.
  • Solution: Check the list for correct weight formatting, ensuring each item with a weight follows the item::weight structure.

Seed value out of range

  • Explanation: This error occurs when the seed value is set outside the allowable range.
  • Solution: Ensure the seed value is within the range of -1 to 0x7FFFFFFF. Adjust the value accordingly.

Random List Picker Related Nodes

Go back to the extension to check out more related nodes.
LM Studio Image to Text Node for ComfyUI
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.