String Safe
Sanitizing text before it hits a filename or a fragile field
- safe_text
Honest framing up front: String Safe has no tooltip, no README entry, and nothing in the KB to lean on - it's one string in, one string out, with a name that does most of the talking. Everything below is read off that shape rather than confirmed against source, so treat it as the sensible interpretation rather than documented fact.
Given the name and the fact that it sits in GR85/Utils next to the pack's seed and random-number nodes - the kind of thing that typically feeds a SaveImage filename prefix or a caption file - the most plausible job is sanitizing text for contexts that choke on certain characters: stripping or replacing the ones that break Windows or Linux filenames (/ \ : * ? " < > |), trimming stray whitespace, maybe collapsing a multiline string down to something a single-line field can accept. That's the standard shape of a "safe text" utility across custom-node packs generally, and it lines up with this node's single STRING → STRING signature.
Input and output. text (required, multiline, default empty) - whatever string you want sanitized, could be a whole prompt or just a filename fragment. Output is a single safe_text.
Where you'd actually use it. Anywhere a string that started life as a prompt, a wildcard pick, or a tag-injected template needs to land somewhere pickier - a SaveImage filename, a metadata field, a caption file written to disk. Rather than hand-sanitizing or hoping your prompt text never contains a stray : or /, route it through this first. It's a small thing, but it matters more than it sounds like at first: a batch of a hundred generations with wildcard-picked or tag-injected prompts baked into filenames is exactly the scenario where one stray colon or slash from an unexpected input silently breaks a save, and you don't find out until you go looking for an image that never got written to disk.
Installing it. No dependencies - plain string handling. Search "comfyui_gr85" in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/veighnsche/comfyui_gr85
Restart ComfyUI.
Troubleshooting, with the same honesty caveat. Since there's no documentation of exactly which characters it strips or which rules it applies, the practical move is to test it against your actual worst-case strings - a prompt with slashes, colons, emoji, whatever you're likely to feed it - before trusting the output inside something like a filename_prefix at scale. If you hit a character it doesn't handle the way you need, that's not something this article can tell you how to work around beyond the obvious: check safe_text's actual output for your specific case before you commit to relying on it in production.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| safe_text | STRING | — |