String Combine (ComfyUI Deploy)
String Combine With a Hidden Regex Superpower
- STRING
The one node in this pack that isn't an API input. ComfyUIDeployStringCombine is a string utility that lives in the ComfyUI Deploy category because deployed workflows need to assemble and clean text on the fly - combining a caller's prompt with a style suffix, or scrubbing a raw prompt before it hits the CLIP encoder. It looks like yet another string concat node. It is not. There's a regex engine hiding in the replace mode.
How it works
Two actions. append joins whatever of text_a, text_b, text_c are non-empty. replace does the interesting work: text_b is the needle, text_c the replacement, applied to text_a. But if you wrap text_b in forward slashes - like /foo.*bar/ - it's treated as a regex and text_c is substituted over every match. That's the difference between this and every basic string-join node: you can do pattern-based prompt surgery server-side, no Python node required.
Then tidy_tags ("yes"/"no") cleans the result: collapses double spaces, strips stray " ," sequences, flattens repeated commas, and trims. On append mode with tidy on, the parts join with ", " - the classic tag-format separator. With tidy off they just concatenate with nothing between them, which is how you'd build a raw prompt without commas.
Why it's an output node
The brief flags this as an output node (is_output_node: true), and that's deliberate: the node pushes its result to the UI as well as returning it as a STRING. So it can act as a display node showing the combined text in your graph - handy when the ComfyUI Deploy dashboard should show a computed string instead of just consuming it. Wire the STRING output into a CLIP Text Encode and it behaves like any normal string node.
The inputs that matter
action-appendorreplace. This decides everything.tidy_tags-yes/no, whether to run the comma/space cleanup.text_a/text_b/text_c- the three string inputs. Inreplace,text_bis the needle (or/regex/),text_cthe replacement.
Installing
Same pack as the rest of the ComfyUI Deploy set - Manager → "ComfyUI Deploy", or:
cd ComfyUI/custom_nodes
git clone https://github.com/BennyKok/comfyui-deploy
Restart ComfyUI. No models, no heavy deps beyond the pack's usual light requirements.txt.
Gotchas
The replace regex path is the one to be careful with: if text_b starts with / you've entered regex territory, so a literal string that begins with a slash will misbehave. And remember append with tidy off produces zero separators - if you expected "a, b" and got "ab", that's the toggle, not a bug. For simple concatenation with commas, tidy on is what you want.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| action | COMBO | 2 options: append, replace | |
| tidy_tags | COMBO | 2 options: yes, no | |
| text_aopt | STRING | — | |
| text_bopt | STRING | — | |
| text_copt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |