SK Merge Prompt
Stitch up to 20 prompt strings into one clean line
- string
Prompt assembly is the plumbing nobody enjoys, and this node exists to make it less fiddly. SK Merge Prompt takes up to twenty string inputs and joins them into one - with a twist that separates it from the plain "concatenate" nodes: it splits each input on the separator first, then rejoins everything. So you can dump in a prompt with commas or pipes scattered through it and get back a flattened, cleaned-up single string.
Where it earns its place is inside this pack. The SK Lora Loader hands you a trigger_words output - a comma-joined blob of every LoRA tag it applied - and you usually want that merged into your base prompt with the rest of your positive conditioning. This node is the natural splice point: base prompt in one input, trigger words in another, one string out the front into your CLIPTextEncode.
How it works. Pick a separator (or type your own), and each input is split into pieces by it, cleaned of whitespace, optionally scrubbed of empty lines and newlines, then joined with the separator. A couple of nice details in the implementation: comma and period presets also match the Chinese full-width variants (, and 。), so prompts copied from Chinese-language workflows split correctly. And sep_as_segment flips the logic - instead of splitting inside each box, it treats each input box as one whole segment and joins them with newline + separator + newline, which is what you want when each input is already a self-contained block.
Inputs that matter. string_1 and string_2 are required; string_3 through string_20 are optional - so it scales from "merge two things" to "assemble a prompt from twenty sources." The fiddly one is input_count (2–20): it changes how many inputs the node shows, and per the author's tooltip you set the number first, then click the "change prompt input count" button at the bottom of the node to apply it. If you're wiring strings in and inputs aren't appearing, that's the step you missed. preset_sep gives you Comma, Period, Pipe, or Newline; custom_sep overrides the preset whenever it's non-empty. remove_newlines and remove_empty_lines are self-explanatory cleanup toggles.
Output. One string, the merged result. Wire it into a CLIPTextEncode and you're done.
Installing. ComfyUI Manager (search "SK LoRA Manager") or:
cd ComfyUI/custom_nodes
git clone https://github.com/sinvks/ComfyUI-SKLora-Manager.git
pip install -r requirements.txt
Restart. No dependencies beyond the pack's standard ones, no model downloads.
One honest note. The default separator is Pipe (|), which is a slightly odd default for an English prompt workflow - most people will want Comma. If your output comes out with pipes in it, that's not a bug; the preset is doing exactly what it says. Swap to Comma (or a custom , ) and move on.
Inputs (26)
| Name | Type | Default | Description |
|---|---|---|---|
| string_1 | STRING | — | |
| string_2 | STRING | — | |
| string_3opt | STRING | — | |
| string_4opt | STRING | — | |
| string_5opt | STRING | — | |
| string_6opt | STRING | — | |
| string_7opt | STRING | — | |
| string_8opt | STRING | — | |
| string_9opt | STRING | — | |
| string_10opt | STRING | — | |
| string_11opt | STRING | — | |
| string_12opt | STRING | — | |
| string_13opt | STRING | — | |
| string_14opt | STRING | — | |
| string_15opt | STRING | — | |
| string_16opt | STRING | — | |
| string_17opt | STRING | — | |
| string_18opt | STRING | — | |
| string_19opt | STRING | — | |
| string_20opt | STRING | — | |
| input_countopt | INT | 22–20 | 修改接入提示词的数量。使用时先修改数量,再点击底部的【修改提示词接入数量】。 |
| preset_sepopt | COMBO | Pipe (竖线 |) | 选择一个预设分隔符。若自定义分隔符不为空,则此选项被忽略。 |
| custom_sepopt | STRING | 输入自定义分隔符。若此项不为空,则使用此分隔符。 | |
| remove_newlinesopt | BOOLEAN | false | 移除换行符 |
| remove_empty_linesopt | BOOLEAN | false | 移除空行 |
| sep_as_segmentopt | BOOLEAN | false | 如果勾选,合并后的每个【提示词输入框】片段将由换行符 + 分隔符 + 换行符连接。此时,输入框内部的分隔符将不会被用于拆分。如果分隔符本身是换行,则使用双换行符连接(\n\n)。 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| string | STRING | — |