String Splitter (CRT)
Turn one block of text into the shots of your video
- string_1
- string_2
- string_3
- string_4
- string_5
- string_6
- string_7
- string_8
- string_9
- string_10
- string_11
- string_12
- string_13
- string_14
- string_15
- string_16
- string_17
- string_18
- string_19
- string_20
- string_21
- string_22
- string_23
- string_24
- string_25
- string_26
- string_27
- string_28
- string_29
- string_30
- string_31
- string_32
- string_33
- string_34
- string_35
- string_36
- string_37
- string_38
- string_39
- string_40
- string_41
- string_42
- string_43
- string_44
- string_45
- string_46
- string_47
- string_48
- string_49
- string_50
- string_51
- string_52
- string_53
- string_54
- string_55
- string_56
- string_57
- string_58
- string_59
- string_60
- string_61
- string_62
- string_63
- string_64
Storyboard-style workflows are built on a simple idea: write all your shot descriptions in one text box, one paragraph each, and feed each paragraph to its own generation. The boring-but-essential step in the middle is splitting that blob of text into discrete strings you can route to different samplers or conditioning. That's this node. It splits a single multiline string into up to 64 separate STRING outputs, either on blank lines or on a custom separator you provide.
It looks intimidating because the node always shows a wall of outputs - string_1 through string_64. Don't panic. You only use the ones you set, and a split_count widget controls how many are active.
How it works
Default behavior: it splits your text on empty lines (one or more blank lines act as the boundary), so each paragraph becomes its own output. If you set split_symbol to something like --- or |, it splits on that instead - handy when your paragraphs themselves contain blank lines for formatting.
Two behavioral details are worth internalizing:
- strip_whitespace (default on) trims each part so you don't get stray newlines gumming up your prompts.
- Empty parts are dropped entirely. Split by blank lines, and two blank lines in a row won't hand you an empty string - the parts are compacted.
The split_count input (1–64) says how many of those outputs you're actually using, which also keeps unused outputs from carrying stale values from a previous run.
Inputs and outputs
- text - the blob to split (multiline).
- split_count - how many outputs are active.
- split_symbol - custom separator; empty = split on blank lines.
- strip_whitespace - clean up each part.
Outputs are string_1 through string_64, each a STRING. Feed the first few into your prompt encoders and leave the rest unconnected.
Installing it
CRT-Nodes install as usual: ComfyUI Manager → CRT-Nodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/PGCRT/CRT-Nodes.git
pip install -r requirements.txt
Restart; it's under CRT/Text.
Where people get burned
The numbering is the trap. Because empty parts are dropped, part N of your input is not guaranteed to be output string_N - a leading blank line or a double blank line shifts everything by one, and if you've hardwired paragraph three to string_3 you'll silently get paragraph two. If your outputs are misaligned, count your blank lines. Also, keep split_count honest: it's easy to leave it at 2 while you've written five paragraphs and wonder why three are missing - bump it and reconnect.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | Paragraph 1... Paragraph 2... | — |
| split_count | INT | 21–64 | — |
| split_symbol | STRING | A custom character or string to split by. If empty, splits by empty lines. | |
| strip_whitespace | BOOLEAN | true | Remove leading/trailing whitespace from each split part |
Outputs (64)
| Name | Type | Description |
|---|---|---|
| string_1 | STRING | — |
| string_2 | STRING | — |
| string_3 | STRING | — |
| string_4 | STRING | — |
| string_5 | STRING | — |
| string_6 | STRING | — |
| string_7 | STRING | — |
| string_8 | STRING | — |
| string_9 | STRING | — |
| string_10 | STRING | — |
| string_11 | STRING | — |
| string_12 | STRING | — |
| string_13 | STRING | — |
| string_14 | STRING | — |
| string_15 | STRING | — |
| string_16 | STRING | — |
| string_17 | STRING | — |
| string_18 | STRING | — |
| string_19 | STRING | — |
| string_20 | STRING | — |
| string_21 | STRING | — |
| string_22 | STRING | — |
| string_23 | STRING | — |
| string_24 | STRING | — |
| string_25 | STRING | — |
| string_26 | STRING | — |
| string_27 | STRING | — |
| string_28 | STRING | — |
| string_29 | STRING | — |
| string_30 | STRING | — |
| string_31 | STRING | — |
| string_32 | STRING | — |
| string_33 | STRING | — |
| string_34 | STRING | — |
| string_35 | STRING | — |
| string_36 | STRING | — |
| string_37 | STRING | — |
| string_38 | STRING | — |
| string_39 | STRING | — |
| string_40 | STRING | — |
| string_41 | STRING | — |
| string_42 | STRING | — |
| string_43 | STRING | — |
| string_44 | STRING | — |
| string_45 | STRING | — |
| string_46 | STRING | — |
| string_47 | STRING | — |
| string_48 | STRING | — |
| string_49 | STRING | — |
| string_50 | STRING | — |
| string_51 | STRING | — |
| string_52 | STRING | — |
| string_53 | STRING | — |
| string_54 | STRING | — |
| string_55 | STRING | — |
| string_56 | STRING | — |
| string_57 | STRING | — |
| string_58 | STRING | — |
| string_59 | STRING | — |
| string_60 | STRING | — |
| string_61 | STRING | — |
| string_62 | STRING | — |
| string_63 | STRING | — |
| string_64 | STRING | — |