Batch Prompt Json
Turning a Styles List Into a 100-Image Batch Run
- name
- positive
BatchPromptJson is the batch-generation workhorse of this pack: it reads a style list from a JSON file and emits a list of prompts, one per style. Wire its output into the sampler of your choice, queue a run, and you get a whole set of variations from one base prompt. It's the lazy way to do "same subject, twenty looks" - which is exactly what it's for.
How it works
The pack ships a style/ folder full of JSON files, and the node's styles dropdown lists every one of them. Under the hood it loads the file, slices it by batch_start and batch_length, and for each entry builds a prompt by gluing your base positive text to the style value. So "a portrait,`" becomes "a portrait, cinematic lighting" and so on, as many times as there are styles.
The bundled data leans heavily on Chinese prompt tags - the categories are things like 01风格 (style), 03场所 (place), 09表情 (expression), 06发型 (hairstyle), 08化妆 (makeup), 10姿态 (pose). The pack credits ComfyUI-sixgod_prompt and ComfyUi_PromptStylers as the source, and there's a prompt_weight.json that applies Fooocus-style weighting to a few categories. The fooocus_styles file is the one English/native Fooocus list, so it's the friendliest starting point if the Chinese categories aren't your workflow.
The inputs that matter
positive- your base prompt, prefixed to every generated prompt.styles- which JSON to read.batch_startandbatch_length- the slice window. Default batch_length is 100, so check it before you queue: if a file has 80 styles, you're about to generate 80 images. Dial it down to test with one.
Outputs
Two list outputs: name (each style's name, with spaces and dashes normalized to underscores - useful for file naming) and positive (the per-style full prompts). Both are lists, so they want to feed a node that iterates a batch - pair it with this pack's checkpoint_sampler or a standard sampler, and you've got a style sweep.
Gotchas
The 100-prompt default is a trap if you forget it. And because prompts are built by string concatenation, an empty base prompt yields prompts that are just the style tags - fine for pure style tests, useless if you wanted a subject. Check the positive output through a ShowText node before committing to the full batch run.
Installing it
From windfancy/zsq_prompt: search "zsq_prompt" in ComfyUI Manager and install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/windfancy/zsq_prompt
then restart. Heavy requirements install alongside but this node only reads JSON files. And the usual Manager "conflict" flag on zsq_prompt is the generic-class-name issue - ignore unless you're running the other pack too.
Verdict
If you batch-generate style variants, this is the fastest route in the pack to a full sweep. If you never batch, skip it - the JSON style data is the real asset here.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| positive | STRING | — | |
| styles | COMBO | fooocus_styles | 14 options: 01风格, 03场所, 09表情, 06发型, 03天气, 02国籍, +8 |
| batch_start | INT | 0 | — |
| batch_length | INT | 100 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| name | STRING | — |
| positive | STRING | — |