Select ITEM By Amount Generated
Let a folder's own contents decide what to generate next
- item_png_filepath
- item_folder
- item_name
- item_names_list
Most batch-generation setups pick randomly, which means the item you've already made forty images of keeps getting picked while the one with zero outputs waits forever. Select ITEM By Amount Generated, from the illumorae pack (CorvaeOboro's variation-exploration toolkit), inverts that logic: it looks at a project folder structure, counts how many generated and ranked images each item has, and picks the item with the least coverage. You wire its output into a loader, generate, save - and the graph slowly balances your whole project without you babysitting it.
This is a niche tool built for a specific house style, so before you get invested, check whether your folder layout matches. The author's structure puts ranked outputs in Upscale/ITEM/gen/01 (best) and gen/02 (second), with unranked ones loose in gen/. The node has two discovery modes: the default simple structure, and use_nestedupscale_structure for that deeper layout. If your files live in a flat folder, this node is aimed past you.
How it works
It scans base_dir for items, then scores each one by a coverage priority ladder, straight from the source docstring:
- primary: few unranked generations in
gen/(lowgen_count) - most important - secondary: few ranked images in
gen/01- surfaces unreviewed items - quaternary: few ranked images in
gen/02
Then it builds a balanced round-robin schedule (seeded by seed) so low-coverage items appear more often in a batch, but you don't get stuck on a single item. The require_prompt_sdxl / require_prompt_flux / require_prompt_sd15 / require_prompt_video toggles add filters: an item is only eligible if the matching prompt file exists and actually contains text. Turn on debug and the node will print its whole decision trail to the console - which is how you'll want to learn what it's doing.
Inputs and outputs
- base_dir - the project root. Oddly, the default points at the pack's own folder, so change it to your real project directory.
- max_images_target - how many images per item you consider "covered" (default 5).
- seed - makes the round-robin schedule reproducible.
Outputs, all strings: item_png_filepath (a PNG path for that item), item_folder, item_name, and item_names_list (the full ordered list of candidates). Wire the filepath into a loader, or the name into filename prefixes downstream - this node is designed to feed the pack's own external-path save/load nodes.
Installing it
ComfyUI Manager → search "illumorae" → install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/CorvaeOboro/ComfyUI_illumorae
Restart. No models, no extra downloads - pure filesystem logic.
Troubleshooting
The realistic failure is a mismatch between your folder layout and its expectations: if nothing is ever selected, or it always selects the same thing, enable debug and read the console - the node will show you how it counted each folder. Remember the default base_dir is wrong for almost everyone, and the prompt-requirement toggles silently shrink your candidate pool if you turn them on without the matching prompt files. It's a clever little scheduler, but it only works inside the project structure it was written to understand.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| base_dir | STRING | /tmp/ComfyUI/custom_nodes/ComfyUI_illumorae | — |
| use_nestedupscale_structure | BOOLEAN | false | — |
| png_in_item_root | BOOLEAN | false | — |
| require_prompt_sdxl | BOOLEAN | false | — |
| require_prompt_flux | BOOLEAN | false | — |
| require_prompt_sd15 | BOOLEAN | false | — |
| require_prompt_video | BOOLEAN | false | — |
| max_images_target | INT | 51–1000 | — |
| seed | INT | 00–18446744073709550000 | — |
| debugopt | BOOLEAN | false | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| item_png_filepath | STRING | — |
| item_folder | STRING | — |
| item_name | STRING | — |
| item_names_list | STRING | — |