Batch String
Right-Click, Add Input, and Pretend You Built a Grid
- BATCH_STRING
If CLIP Text Encode (Batch) is the engine of this pack, Batch String is the hopper you load it with. It exists to do one job: collect several prompts into a single BATCH_STRING - a list of strings - in a fixed order, without making you draw a row of separate text nodes and patch them together.
The catch, and it's a real one: the node starts with zero inputs. Its schema literally has nothing required, so the first time you drag it onto the canvas you'll stare at an empty box wondering if it's broken. It isn't. The inputs are added at runtime by a JavaScript extension (js/app.js) that ships with the pack. Right-click the node and you get two menu options:
- add input - appends a multiline text box, labeled
text1,text2,text3, … - remove input - pops the last text box off.
That's the whole interaction. There's no dropdown, no settings panel, no way to see the list except the stack of boxes in front of you. Click "add input" once per prompt you want, type each one, done.
How it works under the hood. The Python side (encode()) collects every textN widget it received, in order, into a plain Python list and hands it out as BATCH_STRING. No execution cost, no VRAM, no model involved - it's pure lazy data passing. The order you add boxes is the order the prompts land in the list, which is the order they map onto latents downstream. That ordering is the whole game, so get it right the first time.
Where it goes. The output feeds straight into CLIP Text Encode (Batch)'s texts port, and from there into the sampler. Typical flow:
Batch String (add N inputs → N prompts)
└─> CLIP Text Encode (Batch) → KSampler
with Empty Latent batch size = N
So for a 16-frame AnimateDiff gen, you add 16 inputs. Annoying? A little. But it's the honest price of per-latent prompts, and it beats drawing 16 nodes.
Gotchas worth knowing:
- No inputs until you right-click. If you just drag it in and try to wire something, there's nothing to grab. This trips up everyone once.
- You can only remove the last input. There's no reorder UI and no mid-list deletion, so if you fat-finger
text3, the fix is remove-from-the-top and re-add. Plan your prompt order before you type. - A lone Batch String does nothing. It's a widget node with no downstream consumer, so it just sits there. That's normal.
- The pack is frozen - last commit March 2024 - but it's tiny, has no dependencies beyond torch, and runs fine on current ComfyUI.
Install. Same as the rest of the pack. ComfyUI Manager → search "Batch-Condition-ComfyUI" → install → restart. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/laksjdjf/Batch-Condition-ComfyUI
# restart ComfyUI
No requirements.txt, no model downloads - the JS extension is the only "moving part." It shows up under the conditioning_batch folder, by the author of the Attention Couple regional-conditioning nodes. If you're doing prompt matrices or per-frame prompt videos, this is the unglamorous glue that makes it painless.
Inputs (0)
No inputs
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BATCH_STRING | BATCH_STRING | — |