Split Text
Cut one text into a list of items at each new line, comma or custom separator, so the next node runs once for every item, such as one image per line.
The Split Text node cuts one text into a list of items at a separator, such as each new line. The node you connect after it runs once for every item, so one text with ten lines becomes ten images, ten voice clips or ten videos. Split Text costs no credits and runs without a model.
When to use it
- Write one prompt per line and generate one image or video for each.
- Cut a script into scenes, then generate a shot per scene.
- Turn a comma-separated list of subjects into separate items.
- Cut the answer of a Prompt node into parts at a separator of your choice.
Quick start
Add the node
Press Tab on the canvas and choose Automate › Text › Split Text.
Connect a text
Connect a Text node, or any other text node, to the Text input.
Choose the separator
Open the settings panel and choose a Separator. The default, New Line (\n), makes one item per line. Preview shows the items after a run.
Connect the next node and run it
Connect the output to the node that should run per item, such as the Prompt input of Generate Image. Run it: the node runs once for every item.
Inputs
| Input | Accepts | What it does |
|---|---|---|
| Text | Text nodes, such as Text, Prompt and Combine Text | The text to cut into items. |
The output, Text, is the list of items. A node connected to it runs once per item.
Settings
| Setting | What it does |
|---|---|
| Separator | Where the text is cut: New Line (\n) (the default), Double New Line (\n\n), Comma (,), Space, Three Stars (***) or Custom. |
| Custom Separator | The separator you type yourself, when Separator is Custom, for example ===NEXT===. |
| Trim whitespace | On (the default) removes the spaces and line breaks around each item. |
| Remove empty | On (the default) drops empty items, such as the ones blank lines create. |
| Preview | The items of the last run, numbered. Read-only. |
One run per item, or all items at once
A connection from Split Text is set to Each by default: the next node runs once for every item, and you get one result per item. Click the connection to change it:
| Mode | What the next node receives | Use it for |
|---|---|---|
| Each (default) | One item per run | One image, video or voice clip per item |
| Bundle | Every item together, in one run | Nodes that combine a whole set |
| Item | One item that you choose by position, such as 2 or last | Using a single item |
In Each and Bundle mode you can also pass only some items, such as 1..5 for the first five. Read Lists and batching for every option.
Credits
Split Text itself is free. The node after it is charged once per item, so the cost grows with the number of items. Ten items into a node that costs 20 credits cost about 200 credits. The Run button of that node shows the total before you start.
Tips
- Check the preview first. Run Split Text on its own and read Preview before you run an expensive node after it.
- Test with a few items. Set the connection to pass only
1..2while you try a workflow, then remove the range for the full run. - Let a model write the items. A Prompt node can write several prompts at once. Its Items output already splits the answer at
===NEXT===, so you do not need Split Text for that separator. - For a table of values, use a List. When each run needs several values, such as a prompt and an image, a List node holds one row per run.
Frequently asked questions
Related
Lists and batching
Text
Combine Text
List
Prompt
Last updated on
Combine Text
Join the text of several nodes into one text, in the order you choose, with a new line, a comma, a space or your own separator between the parts.
Prompt
Generate, rewrite or summarize text with Gemini, Claude, GPT or Grok. Add instructions, images, video or audio, and split the answer into items.