Multi Prompt
Four prompts, one wire, and the node on the other end
- prompt_list
- prompt_list
ComfyUI will happily give you one text box. Getting four prompts into one place, in order, and then picking which one the current render uses - that's the part it never shipped. You end up with four separate text-encode nodes, a switch, and an index you have to keep in sync by hand.
TKMultiPrompt is the collecting half of that job. Four multiline boxes, one output. It doesn't encode anything, doesn't tokenize anything, doesn't touch your text. It just packages what you typed into a list so a looper downstream can hand one entry per render to your text encoder.
Where it earns its place: long-form video. If you're building the LTX speaker/singer or Wan "talk for ten minutes" kind of graph, you cut between shots - same subject, different framing, different beat - and each shot wants its own prompt. That's a prompt list, and this is one.
How it works
The source is about as small as a custom node gets. You get four required STRING widgets (prompt_1–prompt_4), all multiline, all defaulting to empty. On run, the node appends each one to a Python list of dicts shaped like {"prompt": text, "slot": n} and returns the list as a single custom-type wire, TK_PROMPT_LIST.
No parsing, no trimming, no wildcard expansion. If you were hoping {blonde|brunette} bracket syntax works in here, it doesn't - that's an A1111-era habit that some nodes implement and this one doesn't. What you typed is what comes out, newlines and all.
Two behaviours matter more than they look:
- Blank slots are still emitted. Unlike the pack's TKMultiImagePrompt, which skips unfilled slots, TKMultiPrompt always appends all four entries, even empty ones. The filtering happens downstream - TKPromptLooperAdv throws away entries whose prompt is
Noneor whitespace-only. So leavingprompt_3andprompt_4empty is fine and normal, but just know the list is always four long, not "as many as I filled in." - The optional input is a chaining socket. Wire another TKMultiPrompt's output into
prompt_listand its entries get prepended to yours, then your own four are appended. Chain two nodes and you've got eight prompts - first node in the chain contributes the first entries. That's your only route past the four-slot ceiling.
The inputs and output
prompt_1 through prompt_4: required, multiline, empty by default. Type the prompt. Blank ones get ignored by the looper later.
prompt_list: optional, type TK_PROMPT_LIST. The chaining input. Leave it unconnected unless you're stacking nodes.
Output: one prompt_list, type TK_PROMPT_LIST. This is the thing to understand before you start dragging wires - TK_PROMPT_LIST is a custom type, and core ComfyUI nodes have no idea what it is. You can't plug it into a CLIP text encode. It only talks to TKNodes nodes that declare the type, which in practice means TKPromptLooperAdv. That looper takes an index and returns a prompt as a plain STRING, plus image and total_cnt - and that is what you feed onward. The list is plumbing, the looper's string output is the payload. It also wraps: with four prompts, index 4 gives you prompt 1 again (index % count).
Install
ComfyUI Manager: search for "Handy Nodes" - that's the pack's display name, registry id ComfyUI-HandyNodes-KT, repo trashkollector/TKNodes. Manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/trashkollector/TKNodes
Restart ComfyUI and look under the TKNodes/prompt category. No models to download for this node.
The cost is the pack's requirements.txt, which is all-or-nothing: torch/torchvision/torchaudio floors, numpy, pydub (FFmpeg needs to be on your PATH for the pack's audio nodes), and sherpa-onnx - a chunky wheel you install purely for the speaker-diarization nodes. There's no way to take just the prompt collector. And since custom nodes share one Python environment with no isolation, that's another roll of the dice on a dependency conflict.
Things that bite
"It won't connect to my text encoder." Correct, and expected. Custom type, custom consumers only.
Prompts and images land on the wrong shot. TKPromptLooperAdv pairs prompts and images by their filtered position, not by slot number. Blank image_2 in TKMultiImageSelect and image 3 becomes the second image, pairing with prompt_2. Leave your gaps at the end of the lists, not in the middle.
Don't wire prompt_list on its own into TKPromptLooperAdv and expect it to work. In the shipped source, the prompts-only branch calls an internal method that builds its list and then returns nothing at all - you get a return-count error, not a prompt. Pair your prompt list with an image list (TKMultiImageSelect), or use TKMultiImagePrompt and its TK_IMAGE_PROMPT_LIST if you want image-plus-caption pairs. That pairing is the whole point of the node, honestly; the standalone prompt list is a half-finished path.
Editing a prompt does re-run it. IS_CHANGED hashes the prompt texts plus the upstream chain, so a text edit invalidates this node and anything chained into it. No stale-cache weirdness here.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt_1 | STRING | — | |
| prompt_2 | STRING | — | |
| prompt_3 | STRING | — | |
| prompt_4 | STRING | — | |
| prompt_listopt | TK_PROMPT_LIST | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| prompt_list | TK_PROMPT_LIST | — |