Nodes/ComfyUI Silver Nodes/Silver Random From List
ComfyUI Node

Silver Random From List

The Six-Line Node That Picks a Random Item From Any List

By SilverAndJade·Created about a year ago·Updated 23 days ago· 0
Silver Random From List
  • input_list
  • random_item
  • first_item

This is the smallest node in the pack and it does exactly what the name says: you feed it a list, it hands back a random item - plus the first item in the list, for reasons explained below. That's the whole job. Sometimes a utility this tiny is still the right tool, because ComfyUI's stock nodes don't have a "give me a random element of this list" anywhere.

How it works

input_list is typed as a wildcard (*), so it accepts whatever list you can produce: strings, images, latents, conditioning, you name it. On each run it does random.choice(input_list) for the random item and grabs index 0 for the first item. Empty list? You get None for both, so guard against it upstream.

Why the first_item output? The practical pattern is prompt variation: build a list of prompt fragments in another pack's list node, then use the random pick for variety while keeping first_item as a deterministic reference - for example, to know what the "base" of the list was, or to drive a workflow that needs both a random and a fixed option. It's a small convenience, but it costs nothing.

Inputs and outputs

One input, input_list (any type). Two outputs:

  • random_item - the random pick, same type as what you put in.
  • first_item - the list's first element, always.

Gotchas

The honest limitation: ComfyUI has no stock list nodes, so you need another pack upstream to build the list in the first place (WAS, Impact Pack, rgthree, or the like all produce string lists; image and latent lists come from other places). If you're using this because you want random text, a dynamic-prompt or wildcard pack is usually the more ergonomic answer - this node shines when you already have the list and just need the draw. One more quirk: there's no seed input, so the pick isn't reproducible. That's fine for "random," but don't expect to lock in a specific draw for testing. Also note the node's dropdown area may show LoRA names at construction - a leftover from the sibling Lora loader - but it doesn't affect what the node does.

Install

ComfyUI Manager → search "ComfyUI Silver Nodes", or:

cd ComfyUI/custom_nodes
git clone https://github.com/SilverAndJade/comfyui-silver-nodes

Restart after cloning. No dependencies beyond stock ComfyUI, which is fitting for the pack's simplest node.

Categorysilver

Inputs (1)

NameTypeDefaultDescription
input_list*

Outputs (2)

NameTypeDescription
random_item*
first_item*