StringToolsString
A one-line text node with a surprisingly specific job
- STRING
The single-line half of the pack's text-source duo
StringToolsString is a single-line text input that passes its value straight through to a STRING output. One field, one wire, no modes. If that sounds like the most mundane node in the pack, you're right - and it's also the one you'll use constantly, because it's the sanctioned way to feed text into the rest of String Tools.
Here's the context that makes it matter: the pack's StringToolsConcat, StringToolsRandomChoice, and their list variants all refuse connections from ComfyUI's PrimitiveNode - the node you get when you "convert widget to input." That's deliberate, documented in the README, and the reason this pack exists at all. The author ships his own text source nodes so you can build an entire string subgraph without PrimitiveNode anywhere in it. StringToolsString is the single-line member of that pair; StringToolsText is the multiline one.
How you'll actually use it
The most common job: being a separator. StringToolsConcat's separator input is a force-input port - you can't type a comma into the concat node itself. Instead you drop a StringToolsString, type ", " into it, and wire it into the separator slot. It's also the natural way to feed a single alternative into a StringToolsRandomChoice, or a fixed part (a style suffix, a quality tag block) into a concat. And since these nodes can't take PrimitiveNode, every one of those inputs wants a StringToolsString or StringToolsText on the other end.
Mechanically it's a pass-through: process returns the text unchanged, with dynamicPrompts: false - no wildcard syntax, no prompt magic. Type literally, get it literally.
The one input
- text (STRING, single line, default empty) - that's it. The output is the same string as a STRING port, ready for anything downstream that eats text.
Installing it
The whole pack installs together. ComfyUI Manager: "Install Custom Nodes", search ComfyUI String Tools (repo Taremin/comfyui-string-tools), install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/Taremin/comfyui-string-tools
Then restart ComfyUI completely. No pip dependencies, no model downloads - just stdlib Python and a small JS file, MIT licensed, release 0.0.7, from the same Taremin who wrote the well-liked WebUI Monaco Prompt editor.
Gotchas
- Single line only. For multi-line blocks, use
StringToolsText. Pasting a newline into this field can behave oddly depending on where the value ends up. - If you're trying to connect this into a PrimitiveNode-using node, no problem - it's a plain STRING source and works anywhere. The restriction is the other direction: String Tools slots won't take PrimitiveNode, so this node exists to stand in for it.
- It does nothing except hold text. If you find yourself reaching for it and expecting formatting, you want
StringToolsConcat(assemble) or a template/format node from another pack.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |