Nodes/Kemmy Sequential Prompt List/cn_02_kemmy_Sequential Prompt List
ComfyUI Node

cn_02_kemmy_Sequential Prompt List

The conditioning version of Sequential Prompt List

By kemmy2302·Created 7 days ago·Updated 3 days ago· 0
cn_02_kemmy_Sequential Prompt List
  • clip
  • conditioning
records_json{"version": 1, "records": [{"id": "506ec077-028f-4486-8581-48750da99896", "enabled": true, "title": "List Item 001", "prompt": ""}]}
prefix_prompt
suffix_prompt

The problem this node solves is the one you hit the first time you try to tell a story with Stable Diffusion: the character stays the same across ten scenes, but you don't want to copy the character prompt into ten separate CLIP Text Encode nodes and queue ten times. cn_02_kemmy_Sequential Prompt List (class OPTSequentialPromptList) is a smarter alternative to copy-paste: you keep the fixed character/quality text in two STRING inputs, type the changing part into a list of records, and one queue action encodes every record into its own CONDITIONING. Ten scenes, one click, ten separate results.

It lands in the same niche as the old {this|that} wildcard trick from prompt engineering - generate the same person across poses, lighting and moods without retraining - but with a big difference. Dynamic prompts pick a random combination per run and you batch blind. This is deterministic and inspectable: you see every item, you can disable the ones you don't want right now, and the ordering is exactly top-to-bottom. If you're building a character sheet, a story sequence, or a pose/scene set where every frame must share the same identity prompt, that's the workflow it was built for. It doesn't touch character consistency itself - no reference images, no IP-Adapter - it just stops you from re-typing the fixed half of the prompt for every variation.

How it works

The node keeps an ordered list of records, each with an enable checkbox, a title you give it, and a multiline prompt field. The whole list is serialized into the records_json input (a widget, not something you normally hand-type), and the editor buttons - add, delete, duplicate, reorder, enable all, disable all - rewrite that JSON for you. Nothing is hidden in the record data: every output prompt is exactly the prefix plus that record's prompt plus the suffix.

For each enabled, non-empty record, the node joins

prefix_prompt
<the record's prompt>
suffix_prompt

then runs clip.tokenize() and clip.encode_from_tokens_scheduled() on it internally - so you never need a CLIP Text Encode in between. The result is a list of CONDITIONING values (the output is declared as a list, OUTPUT_IS_LIST), and ComfyUI maps compatible downstream nodes over that list in order. Feed the output into a KSampler's positive input and the sampler runs once per item: one queue action, N generated images, each with its own completed prompt. A multiline record stays one prompt - newlines inside a record do not split it into separate images.

The inputs and outputs that matter

  • clip - required. Connect your checkpoint/LoRA stack's final CLIP output; the node does the text encoding itself.
  • prefix_prompt - optional STRING. The fixed stuff: character, outfit, pose base.
  • suffix_prompt - optional STRING. The fixed finish: style, lighting, quality tags.
  • Output: conditioning - a list, one entry per enabled record, wired to KSampler's positive (or negative) input.

If every record is disabled or empty, you don't get an error - you get one item built from prefix and suffix alone. Handy when you want to turn the node "off" without rewiring.

Installing it

There are no Python dependencies and no model downloads here, which is rare and worth appreciating. Through ComfyUI Manager, search for cn_02_kemmy_ComfyUI-Sequential-Prompt-List and install. Or, from a terminal in ComfyUI/custom_nodes:

git clone https://github.com/kemmy2302/cn_02_kemmy_ComfyUI-Sequential-Prompt-List.git

Then restart the ComfyUI backend - not just the browser tab - and hard-refresh with Ctrl+F5 so the frontend JavaScript clears. You'll find both nodes of the pack under the Ordered Prompt Tools category in the node menu. Saved prompt lists live outside the plugin folder at ComfyUI/user/ordered_prompt_tools/lists/, so updating the repo won't wipe them.

Where people get burned

Seeds are the classic trap, and this node makes it sharper. If your KSampler seed is on randomize, every item in the list runs with a different seed, so a "bad" result might be the prompt or just the noise. For comparisons you want the seed fixed so the only variable is the prompt text - set control_after_generate to fixed, and remember the widget fires after the run, so lock it before you queue, not after you like an image. Also note this variant encodes text the moment it runs: if you want an LLM to rewrite each scene prompt before encoding, that's what the sibling ... (String) node in this pack is for - this one bakes in whatever the text is.

CategoryOrdered Prompt Tools

Inputs (4)

NameTypeDefaultDescription
clipCLIP
records_jsonSTRING{"version": 1, "records": [{"id": "506ec077-028f-4486-8581-48750da99896", "enabled": true, "title": "List Item 001", "prompt": ""}]}
prefix_promptoptSTRING
suffix_promptoptSTRING

Outputs (1)

NameTypeDescription
conditioningCONDITIONING