Replace Text Multi (Inteliweb)
Ten find-and-replace pairs for people who clean up prompts
- STRING
If you've ever maintained a prompt library or a shared workflow, you know the real problem isn't writing prompts - it's keeping them consistent. Replace Text Multi is a text-plumbing node that applies up to ten find/replace pairs to a string in sequence. It's the kind of node you don't need until you're tired of editing the same placeholder across twelve nodes, and then it quietly becomes load-bearing.
How it works
One main multiline string field holds the text, and ten numbered pairs - find_1/replace_1 through find_10/replace_10 - run top to bottom. Empty find fields are skipped, so you can leave unused pairs blank. The backend is a simple sequential str.replace loop: each pair operates on the output of the previous one. That ordering is the thing to internalize, because it means pair 2 sees text that pair 1 already changed. "Mistral" → "Qwen" and then "Qwen" → "Qwen3" will behave differently than if the pairs were swapped, so keep your replacements in dependency order.
Two behaviors make it more than a toy. Every STRING widget - including string, find, and replace - can be converted to a socket (right-click, Convert widget to input). That turns a static cleanup chain into a dynamic one: wire the find/replace values in from another source and one node becomes a configurable rewrite engine. And replacing with an empty string deletes the matched text, which is the cheap way to strip tokens or qualifiers out of a prompt in bulk.
The inputs and output
Just the one string input to feed, the pairs to configure, and a single STRING output. You'll typically wire the output straight into a CLIP Text Encode or a string display node.
Installing it
It ships with the Inteliweb pack:
cd ComfyUI/custom_nodes
git clone https://github.com/maoper11/comfyui_inteliweb_nodes.git
cd comfyui_inteliweb_nodes
python -m pip install -r requirements.txt
Or via ComfyUI Manager, "ComfyUI_Inteliweb_nodes". Dependencies are just psutil and nvidia-ml-py; no model files, restart ComfyUI after.
What trips people up
Beyond the sequencing point above, the classic mistake is expecting regex. This is plain literal string replacement - "a.b" matches the literal characters a, ., b, not "any char between a and b". For regex you want a different pack. Second, note that each pair replaces every occurrence of the find text, not just the first - which is exactly what you want when normalizing a word across a prompt, but surprising if you expected a single swap. And if nothing seems to change, check whether the find text differs in case or trailing whitespace from what's in the string field - a common silent failure. It's unglamorous plumbing, but once you have a few pairs doing prompt normalization for you, you'll wonder why you ever edited text by hand.
Inputs (21)
| Name | Type | Default | Description |
|---|---|---|---|
| string | STRING | Text containing the values or placeholders to replace. | |
| find_1 | STRING | Text to find for replacement 1. | |
| replace_1 | STRING | Replacement text for pair 1. | |
| find_2 | STRING | Text to find for replacement 2. | |
| replace_2 | STRING | Replacement text for pair 2. | |
| find_3 | STRING | Text to find for replacement 3. | |
| replace_3 | STRING | Replacement text for pair 3. | |
| find_4 | STRING | Text to find for replacement 4. | |
| replace_4 | STRING | Replacement text for pair 4. | |
| find_5 | STRING | Text to find for replacement 5. | |
| replace_5 | STRING | Replacement text for pair 5. | |
| find_6 | STRING | Text to find for replacement 6. | |
| replace_6 | STRING | Replacement text for pair 6. | |
| find_7 | STRING | Text to find for replacement 7. | |
| replace_7 | STRING | Replacement text for pair 7. | |
| find_8 | STRING | Text to find for replacement 8. | |
| replace_8 | STRING | Replacement text for pair 8. | |
| find_9 | STRING | Text to find for replacement 9. | |
| replace_9 | STRING | Replacement text for pair 9. | |
| find_10 | STRING | Text to find for replacement 10. | |
| replace_10 | STRING | Replacement text for pair 10. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |