Ino String Replace
Find-and-replace for your prompts and filenames
- string
Every once in a while you need to swap one bit of text for another mid-pipeline - replace , masterpiece in a prompt, fix a filename convention, turn _ separators into -. It's the kind of thing you expect to exist and then discover you're reaching for some 40-node utility suite to do it. Ino String Replace is the find-and-replace node: three string inputs in, one string out. Nothing clever, which is exactly the point.
It's from ComfyUI Ino Nodes (nobandegani/ComfyUI-InoNodes), and it does what the name says with no surprises: every occurrence of replace_from in input_string becomes replace_to. That's a plain substring replacement under the hood (Python's str.replace), so it's literal and case-sensitive. Search test, and TEST survives untouched.
The three inputs
input_string- what you're transforming.replace_from- the exact substring to find.replace_to- what replaces it. Empty string deletes the match entirely, which is a handy quick-strip when you only need to remove a word.
The single string output feeds straight into a text encoder, a filename builder, or another string node.
Where it fits
The honest use case is chaining: one prompt template feeds this node with a value from a seed or an input, and the cleaned result goes on to CLIP Text Encode. It's also a workhorse for filename sanitizing before a save node - strip out characters that break Windows filenames (though for that, the pack's Ino String Strip Simple is the better tool, since it removes whole character classes at once).
If you're new to this pack's string family, the distinction worth knowing: Ino String Replace swaps one exact substring for another, while Ino String Replace Placeholder matches any {token} shape with a regex. Reach for Replace when you know the exact text; reach for the placeholder variant when the thing you're matching varies in its contents. Both are cheap, but picking the right one saves you a debugging pass later.
Install
It ships with the pack, so:
# ComfyUI Manager: search "ComfyUI Ino Nodes", install, restart
# or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/nobandegani/ComfyUI-InoNodes.git
cd ComfyUI-InoNodes
pip install -r requirements.txt
Restart ComfyUI after. No models, no extra services - the only real dependency is inopyutils, installed by requirements.txt. This pack is on the newer V3 node schema, so update ComfyUI (v0.18.1+) if the node doesn't register; and note the README's cd comfyui_ino_nodes is a typo for the actual folder name, ComfyUI-InoNodes.
One gotcha to file away: because it's a literal, all-occurrences replace, "replace once" isn't an option - if you only want the first match, you'll want a different tool (or a chain that isolates the string first). For everything else, it's three fields and done.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| input_string | STRING | Test string | — |
| replace_from | STRING | Test | — |
| replace_to | STRING | Example | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| string | STRING | — |