Comet 批量文本卡片
The prompt list that feeds Comet 批量图像
- batch_text
This is the node that makes Comet 批量图像 and Comet 异步批量图像提交 actually useful: it turns a pile of text into the batch_text payload those nodes consume. Type one prompt per line and you're done - or feed it a numbered list or a JSON array straight from an LLM, and it parses that too. One node, several input formats, and a single typed output that the whole batch pipeline understands.
The clever bit is the parsing. The batch image nodes don't accept a plain string of "prompt one, prompt two"; they want a COMET_BATCH_TEXT structure. This card is the thing that produces it, and it's built to take the messy output an LLM actually gives you.
How it works
The card accepts content (the multiline text box) and an optional text input - wired input wins if present, same rule as the single text card. Then it parses the text into a list of prompts in this order:
- JSON. If the text parses as a JSON array or object, it pulls prompts from arrays or from keys like
prompt,text,content,description,prompts,items,list,result. It even handles JSON inside a ``` fence. - Numbered or bulleted lines. A list like
1. first/2. secondor- first/- secondgets the markers stripped and becomes the prompt list. - Plain lines. Otherwise each non-empty line is a prompt.
That "LLM wrote a numbered list, the batch node just needs the words" case is exactly why the placeholder text in the node mentions it accepts LLM output. The output is batch_text (COMET_BATCH_TEXT), which you wire into the batch_text input on Comet 批量图像 or Comet 异步批量图像提交.
The workflow it unlocks
The killer loop: Comet 文本 (LLM) → Comet 批量文本卡片 → Comet 批量图像. Ask the LLM for ten prompt variations in a numbered list, pipe them through this card, and the batch node grinds out ten images without you hand-typing anything. It also works with a single-image Comet 图像 node if you only care about one prompt at a time - but then you're not really using a batch card, so why would you.
Install and gotchas
Standard pack install - ComfyUI Manager (search "ComfyUI-CometAPI") or git clone https://github.com/jieg9341-lab/ComfyUI-CometAPI into custom_nodes, restart. No API key needed; this node is pure local parsing.
Watch these:
- Whitespace and markers get stripped aggressively. It's built for LLM output, so it also strips stray quotes and bullet decorations. If your prompts contain meaningful leading hyphens or numbers, they can get eaten.
- A blank line is a separator, not a prompt. Empty lines are skipped, so you can't use a blank line as a deliberate "empty prompt" in the batch.
- Wired
textoverridescontent. A stray wire intotextwill silently replace everything you typed in the box. When the batch runs with the wrong prompts, check this first. - JSON wins over line parsing. If your text happens to parse as JSON, that's the format that's used - a prompt list that's almost valid JSON but malformed can confuse the parser. Prefer one format.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| content | STRING | — | |
| textopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| batch_text | COMET_BATCH_TEXT | — |