CLIP Prompt Splitter (5 lines)
Splitting a multiline prompt into separate CLIP conditionings
- clip
- out_1
- out_2
- out_3
- out_4
- out_5
Here's the situation this node exists for: you have three or four prompts you keep tweaking, and you're sick of stacking a separate CLIP Text Encode node for each one. CLIPPromptSplitter5 gives you a single multiline text box where every line you type (press ENTER, start a new line) becomes its own CLIP conditioning. One widget, up to five conditionings, all in view at once.
Before you get too excited: the name is honest about the scope. This is a convenience node, not a magic one. It does nothing a handful of stock CLIP Text Encode nodes can't do - the whole contribution is that your five prompts live in one place, you can read all of them without untangling spaghetti, and you edit them in a single box. For a workflow that juggles a few prompt variants that's genuinely worth it. For one simple prompt, don't bother; the stock node is right there.
How it splits
The source is about forty lines of pure Python with zero dependencies. When the node runs, it takes your prompt string, splits it on newlines, strips whitespace, and drops empty lines. It pads the result up to five entries with empty strings, then truncates to five. Each line is passed through clip.encode(), which is exactly the call the built-in CLIP Text Encode node makes under the hood.
That last bit is the useful fact. Because it's the same encode path, the README's claim that it "works with SD / SDXL / WanVideo / AnimateDiff" really means "whatever your CLIP loader hands you." No API keys, no extra model downloads, no text-encoder of its own - it's a pure function on the CLIP model you already loaded.
Also note what this is not: the "Prompt Splitter" in Adaptive Prompts and friends splits text into wildcard variants before encoding. That works on strings. This works on conditioning, after the encoder - different layer, different job.
Inputs and outputs that matter
Only two inputs, both obvious:
- clip - your CLIP model, from any CLIPLoader.
- prompt - a multiline STRING. Each non-empty line becomes one output.
The five outputs are out_1 through out_5, all CONDITIONING. Wire them wherever a conditioning goes: into a KSampler's positive or negative input, or into regional setups like Conditioning (Set Area) plus ConditioningCombine if you want each line to steer a different part of the canvas.
Installing it
Open ComfyUI Manager, search for CLIP Prompt Splitter (or comfyui-clip-prompt-splitter), install, restart. Or do it by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/elgalardi/comfyui-clip-prompt-splitter
Then restart ComfyUI. That's the whole thing - there's no requirements.txt, nothing to pip install, no models to fetch. It's the rare custom node that can't break your environment, which after a few Manager dependency fights is worth something.
Where it earns its keep
Three patterns actually benefit from this shape: regional conditioning (a line per region, fed through Set Area and combined), prompt-variation batches (five lines into five samplers so you can A/B whole prompts), and AnimateDiff-style work where you want distinct prompts available per line without rebuilding the graph. In every case the win is the same - you stop hunting for the right text box in a wall of nodes and just edit the list.
Gotchas
Two behaviors come straight from the code, and both are silent. First, line six and beyond are dropped (lines[:5]) - type six prompts and the last one quietly never exists. Second, if you type fewer than five lines, the unused outputs get encoded as empty prompts: valid conditioning that just does nothing. That's fine if you only wire the ones you filled, and confusing if you wire an empty one into a sampler's positive and wonder why it's ignoring your image.
Realistically that's the whole failure surface. This is a thin utility - when something goes wrong, look upstream, at the CLIP loader and the model, not here.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| prompt | STRING | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| out_1 | CONDITIONING | — |
| out_2 | CONDITIONING | — |
| out_3 | CONDITIONING | — |
| out_4 | CONDITIONING | — |
| out_5 | CONDITIONING | — |