Item List
A named list of prompt ideas that feeds random variation
- var
The Item List node is the input half of this pack's little prompt-template system, and once you see what it does you'll understand the whole pack in one go. You give it a name and a list of values, and it hands that off so something else can pick one of those values at random and drop it into your prompt. It's the structured, "define the options once" cousin of the A1111 {a|b|c} bracket trick that people still use to build character reference libraries - batch thirty-two images and get the same person in different moods, weather, or lighting.
It's a small node, so let's just say what's on it.
The two inputs that matter
name- the variable's placeholder name, defaultadjective. It should match the{name}placeholder in your template, so if you set it toweather, your template should contain{weather}.items- a multiline text box, one option per line, defaultsunny\ncloudy\nrainy. Blank lines are ignored and whitespace is stripped, so pasting a messy list still works.
Under the hood it's doing exactly what it looks like: splitting the text on newlines, cleaning each line, and wrapping it into a small dictionary {"name": "adjective", "items": ["sunny", "cloudy", "rainy"]}.
The output
var - a LIST output containing that one variable definition. That type matters: this isn't a string, so you can't plug it into a CLIP encoder or a combine-text node. Its only natural destination is the vars input on this pack's Template Processor node, which reads the list, picks a random item, and substitutes it into the template. That's the whole intended flow:
Item List (var) ──► Template Processor (vars)
Template Input (template) ──► Template Processor (template)
Template Processor (result) ──► CLIP Text Encode
The vars input on the Processor accepts a single LIST, so one Item List node gives you one randomized slot. Want two or three independent slots? You'll need to merge the LIST outputs upstream with a list-combine node before the Processor - the pack doesn't ship one.
Installing it
This pack is tiny and dependency-free: five Python files, stdlib only (json and random), no requirements.txt, no model downloads. The zero-hassle install is ComfyUI Manager - search for i-zygion-util-nodes (the pack's display title) or "zygion" and click install, then restart ComfyUI. Or do it by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/zygion/comfyui-zygion-util-nodes
then restart ComfyUI. It'll show up under Zygion Custom Nodes in the node menu.
Troubleshooting
There's honestly not much to break here. The one thing that bites people: an empty or all-blank items list doesn't error - the node still emits a variable entry, the Processor just skips it, and the {name} placeholder comes through your prompt literally. Which is your first clue whenever you see braces in a finished prompt: the name in the Item List and the placeholder in the template don't match. Fix the name, not the node.
Honest verdict: it's not doing anything you couldn't hardcode, but if you're building a workflow that randomizes prompts, separating "the options" from "the template" is the right instinct - and this node is how this pack wants you to do it.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| name | STRING | adjective | — |
| items | STRING | sunny cloudy rainy | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| var | LIST | — |