♻ Loop (Texts)
Run a whole list of prompts in one Queue click
- STRING
If you've ever wired up five separate prompts and clicked Queue five separate times to see which one you liked best, this is the node that stops you doing that. Loop Texts takes a batch of text inputs and cycles your whole pipeline through every single one of them in one go - one click, N results.
It's one of a handful of nodes in the Bjornulf pack built around the same idea: don't make the human re-run the workflow, make the workflow run itself N times. The author's own basic Loop node (a separate one in this pack) is flagged deprecated in the README for exactly the reason this one exists - newer ComfyUI versions refuse to let a node output the same cached value twice, which broke the old trick of incrementing a counter across repeated Queue presses. Loop Texts sidesteps that entirely by using ComfyUI's native list execution instead of a counter: it hands off a list of strings, and ComfyUI automatically re-runs every downstream node once per item in that list, all inside a single prompt execution. No re-queuing, no cache fighting.
The inputs and outputs that matter
There's exactly one control here, which is refreshingly simple for this pack: number_of_inputs (2 to 50). Bump it up and the node grows that many text sockets - wire each one from a Write Text node, a Combine Texts node, or literally anything that outputs a string. The single output is a STRING list. That "list" part is the whole mechanism: connect it to your CLIP Text Encode (or wherever), and everything downstream fires once per text in the batch, in one run.
Practically: five prompt variations in, five full generations out, from one Queue click. Great for A/B-ing wording, testing a style prefix against several subjects, or just batch-running a short curated list without babysitting the UI.
How to install it
Easiest path is ComfyUI Manager - open it, search Bjornulf_custom_nodes, install, restart ComfyUI. Manually, it's the usual drill:
cd ComfyUI/custom_nodes
git clone https://github.com/justUmen/Bjornulf_custom_nodes
Then cd into the new folder and pip install -r requirements.txt (a venv is recommended so this doesn't collide with anything else), and restart. On Windows with the portable/embedded build, run the same pip install using the python.exe inside python_embeded.
Common issues
This node itself has no heavy dependencies, but it ships inside the same Python package as everything else in the pack - TTS, video, Ollama, the API image generators - and that package pulls in a long list of libraries (ollama, opencv-python, pydub, spacy, civitai-py, fal_client, and more) via one shared requirements.txt. If any one of those fails to import, ComfyUI can silently fail to load the entire Bjornulf_custom_nodes folder, not just the node that actually needed the missing library - so if Loop Texts (or any other Bjornulf node) is missing from your node menu after install, check the ComfyUI console for an import error first rather than assuming it's this node specifically.
The other thing worth knowing going in: this pack ships breaking changes often - the changelog is full of "❗ Breaking changes" entries across its version history, including ones that touched text/loop node behavior. If you pull a workflow off Reddit or a friend's machine and a Loop Texts node shows red or has a mismatched socket count, it's very likely a version drift issue rather than anything you did wrong - rebuilding the node (or bumping number_of_inputs back down and up) usually fixes the socket mismatch.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| number_of_inputs | INT | 22–50 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |