No-Repeat Picker
A Random Picker That Actually Remembers What It Picked
- item
Random prompt pickers are everywhere, and they all share a flaw: every queue run is a fresh coin flip, so you get the same item three times in a row and wait forever for the one you actually wanted to test. The No-Repeat Picker fixes the actual complaint - it picks from a list, but remembers what it already picked, so consecutive runs cycle through your options without repeats. It's a small node from the babydjacNODES pack, and it's one of those "why didn't the core node do this" utilities.
How it works
You paste a list (one item per line) into items_text. Each run, the node:
- Loads a JSON state file it keeps in its own folder (
.apk_no_repeat_state.json). - Hashes your item list. If the list changed since the last run, it resets the "used" history - so editing the list doesn't carry stale state.
- Picks a random item among the unused ones. When everything's been picked, the history clears and the cycle restarts.
The state is keyed by persist_key, so one node can maintain several independent rotation lists, and the history survives restarts - it's on disk, not in RAM. There's also randomize (turn it off to just index into the list via item_index), reuse_last (hand back the previous pick instead of a new one), and reset_history (clear the used set now).
The inputs that matter
- items_text - required, one item per line. This is your rotation list.
- randomize - true by default; set false and it becomes an indexer using
item_index. - persist_key - default "default". Change it to run a second independent rotation on the same node.
- reuse_last - false by default. Handy for "same again" cases.
- reset_history - false by default; flip to true to force the cycle to restart.
Output is a single STRING, item - the chosen line, wired into whatever consumes your prompt/LoRA name/text.
Install
ComfyUI Manager → babydjacNODES, or git clone https://github.com/babydjac/babydjacNODES into ComfyUI/custom_nodes, restart, hard-refresh. No extra pip deps.
Gotchas
- The state file lives inside the node's own directory.
.apk_no_repeat_state.jsonis written next toNoRepeatPickerNode.pyin yourcustom_nodes/babydjacNODES/Utils/folder. That means it's part of your ComfyUI install - back it up if you move machines, and don't be surprised to see it in the repo folder. - List changes reset the history. The node hashes the full item text; adding or editing one line invalidates the whole "used" set and the cycle restarts fresh. Usually that's what you want.
item_indexis a modulo, not a clamp - withrandomizeoff, index 5 on a 3-item list wraps to item 2. Fine if you know, confusing if you don't.
Where this shines: rotating character names across a seed study, cycling through test prompts so every run shows you something new, or walking through a list of LoRAs without repeats. It's the small utility that makes a "queue 20 runs" workflow actually useful.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| items_text | STRING | — | |
| randomizeopt | BOOLEAN | true | — |
| item_indexopt | INT | 00–1000000 | — |
| persist_keyopt | STRING | default | — |
| reuse_lastopt | BOOLEAN | false | — |
| reset_historyopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| item | STRING | — |