EBU PromptHelper Consume List Item
Pick a list item, remove it, and never repeat yourself
- updated_prompt_text
- word_selected
- revised_list
Consume List Item is the node that gives the whole "random prompt" trick a memory. Its siblings (Randomize, List Sampler) pick random options freely - the same option can come up twice in a row. This one picks an item from a newline-separated list, swaps it into your prompt in place of a placeholder, and hands you back the remaining list with that item removed. Paste the revised list back into the input and the next run draws from what's left, which is how you get a batch of images where the same color or location never repeats until the list is exhausted. It's sampling without replacement, and it's the node the pack's example Flux workflow leans on hardest.
How it works
Three things happen in one shot. First it splits the list input on newlines, strips whitespace, and picks one entry using random.choice() seeded by seed. Then it removes that entry from the list and joins the rest back into the revised_list output. Finally it does a plain prompt_text.replace(word_to_replace, word_selected) - every occurrence of your placeholder gets swapped for the chosen item. Note the replacement is case-sensitive and doesn't support | alternatives like the Randomize node does; it's one placeholder token, one swap.
The inputs and outputs
- word_to_replace - the placeholder token in your prompt, e.g.
MY_COLOR1. - list - the newline-separated options to draw from.
- seed - 0 for non-deterministic; set it to reproduce a pick.
- prompt_text (optional) - your prompt with the placeholder in it. Leave it empty and the node becomes just "pick and remove," which is still useful.
Outputs:
- updated_prompt_text - the prompt with the placeholder replaced.
- word_selected - what you drew this run.
- revised_list - the list minus the drawn item. This is the important one.
Where it fits
The classic pattern from the pack's example workflow: a Random Color Palette node feeds its comma-separated palette into three Consume nodes (one per color placeholder), and each run draws a different color for MY_COLOR1, MY_COLOR2, MY_COLOR3 with no repeats. Do the manual step - copy revised_list back over the list widget between batches - and you can march through an entire list with zero duplicates.
The one honest gotcha: ComfyUI graphs are acyclic, so this node can't keep its own state. The "consume" only persists if you feed the revised list back in. That's a manual step, not a bug - just know that re-running with the same list value will happily re-draw an item you already used.
Install
Part of EBU PromptHelper. In ComfyUI Manager search "EBU PromptHelper", or:
cd ComfyUI/custom_nodes
git clone https://github.com/burnsbert/ComfyUI-EBU-PromptHelper
Restart ComfyUI. No models, no extra pip packages - the pack is pure Python stdlib.
Troubleshooting
If revised_list comes back unchanged, you passed an empty list (or whitespace-only lines) and the node returns empty values with your prompt untouched - check that your list actually has non-empty lines. If the placeholder isn't getting replaced, double-check you typed it identically in both prompt_text and word_to_replace; the swap is exact-match and case-sensitive. And remember the statefulness caveat above - a "duplicate" draw is almost always a stale list widget, not the node misbehaving.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| word_to_replace | STRING | — | |
| list | STRING | — | |
| seed | INT | 00–18446744073709550000 | — |
| prompt_textopt | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| updated_prompt_text | STRING | — |
| word_selected | STRING | — |
| revised_list | STRING | — |