abyz22_SetQueue
A batch queue rig that expects the author's folder layout
- Bool_trigger_queue
- folder_path
- prompt
- cur_prompts
- cur_batch
- debug
abyz22_SetQueue is the brain of the batch-generation rig inside image_control. It coordinates "N prompts × M images each," creates a numbered output folder per prompt, logs every prompt to an Excel history file, and tells the workflow whether there's still more to generate. In the author's own pipeline this is what turns "generate a dataset" into a mostly hands-off loop. It's also the most personal node in the pack - and the one least likely to run as-is on your machine. Fair warning up front.
How it works, from the source: the node keeps internal state (cur_prompts, cur_batch, highest_num) across runs. On the first run it scans the base output folder for numbered subfolders, sets highest_num to the max plus one, and writes the first prompt into history.xlsx. Every subsequent run advances one step: if the current folder still needs images, it returns Bool_trigger_queue = True and bumps the batch counter; when a folder's done it moves to the next prompt; when everything's done it resets and returns False. You keep re-queuing the workflow until the boolean flips - that's the loop.
The inputs that matter:
- mode_type - a string,
abord. It selects the base folder and the Excel sheet. This is where the wheels come off for most people, read below. - Num_of_Prompts (0–30), image_per_Prompt (1–30), batch_size (1–30) - the job spec: prompts, images each, images per sampler run.
- seed and prompt (multiline) - the seed feeds the prompt generator; your typed
promptis only used whenNum_of_Promptsis exactly 1.
Outputs: Bool_trigger_queue (keep going or stop), folder_path (the current numbered folder, or no-data when there's nothing to save yet - that magic string is what abyz22_SaveImage recognizes), prompt, cur_prompts, cur_batch, and debug for watching the state machine tick.
Now the part that will actually bite you - and this is straight from the repo, not a rumor:
- prompts_maker.py is gitignored and not shipped. Whenever
Num_of_Promptsis greater than 1 (or is 1 with an emptyprompt), the node callsprompts_maker.make_prompt()- which doesn't exist on a fresh clone. You'll get an AttributeError. To use it at all, you must either write your own prompt generator or keep it at one prompt with a typed prompt. - Hardcoded Windows paths. The base folders are literally
E:/ComfyUI/output/submit1/(modeab) andE:/ComfyUI/output/submit3/(moded). On Linux, Mac, or any different layout,os.listdirthrows on the nonexistent path. You'll be editingset_queue.pybefore this runs anywhere but the author's machine. - The Excel file must already exist. It loads
E:/ComfyUI/output/history.xlsxand expects sheets literally namedSheet1,2andSheet4, then writes prompts by row-index math (row =highest_num + cur_prompts + 4). No file, no run. Theopenpyxldependency in the pack's requirements is there for exactly this.
Bottom line: this is a genuinely clever reference for building a stateful batch loop in ComfyUI - the counter state, the folder-per-prompt scheme, the "signal to re-queue" pattern are all worth stealing. But it's a personal rig published as-is, not a product. Treat it as a template to adapt, not something to install and go. If you just want to batch through prompts, Impact Pack's wildcard encoder or plain ComfyUI queueing gets you most of the way there with a fraction of the setup. Install it with the pack (Manager → image_control, or git clone https://github.com/abyz22/image_control into custom_nodes/), and expect to spend an evening making it yours.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| mode_type | STRING | ab | — |
| Num_of_Prompts | INT | 10–30 | — |
| image_per_Prompt | INT | 241–30 | — |
| batch_size | INT | 11–30 | — |
| seed | INT | 11–18446744073709550000 | — |
| prompt | STRING | — |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| Bool_trigger_queue | BOOLEAN | — |
| folder_path | STRING | — |
| prompt | STRING | — |
| cur_prompts | INT | — |
| cur_batch | INT | — |
| debug | STRING | — |