You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Easy to use string manipulation nodes for ComfyUI (strip/remove multiple text strings or search and replace text strings). Particularly useful for modifying text from LLM outputs (Ollama, Claude.ai, OpenAI ChatGPT), such as prompts or image-to-text description results. Nodes will be located under standard `Add Node` > `utils` menu.
3
+
Simple string manipulation nodes for ComfyUI (strip/remove text strings, search and replace text strings, preview modified string outputs). Particularly useful for modifying text from LLM outputs (Ollama, Claude.ai, OpenAI ChatGPT), such as prompts or image-to-text description results. No bloat/additional Python dependencies or external modules required. Nodes use a small amount of basic Python and Javascript code.
4
+
5
+
## Nodes included:
6
+
7
+
- String Textbox
8
+
- String Strip
9
+
- String Replace
10
+
- String Preview
11
+
12
+
***Once added nodes can be found under the `Add Node` > `utils` menu.***
4
13
5
14
## Features
6
15
- Remove or replace text, words, numbers in input strings
Removes specified strings from input text. Each line should contain the string to be searched. The string can contain multiple words. To match individual words/strings place on separate lines.
20
+
## String Textbox
21
+
A simple multiline textbox for free form text.
22
+
23
+

24
+
25
+
## String Strip
26
+
Removes specified strings from input text. Each line should contain the string to be searched. The string can contain multiple words. To strip multiple individual words/strings place on separate lines.
13
27
14
-

28
+

15
29
16
30
### Inputs
17
31
-**`input_string`**: The string or text to process
@@ -20,13 +34,10 @@ Removes specified strings from input text. Each line should contain the string t
20
34
-**`match_whole_string`**: Ensure only exact matches are removed (default: enabled)
21
35
-**`remove_extra_spaces`**: Clean up extra spaces after removal (default: enabled)
22
36
23
-
### String Strip Example Usage:
24
-

25
-
26
-
## String Replace Node
27
-
Replaces text strings with new strings. Each line should contain a search and replace pair separated by the replacement_delimiter (default is double colon `::`).
37
+
## String Replace
38
+
Replaces text strings with new strings (replace/swap words etc.). Each line should contain a search and replace pair separated by the replacement_delimiter (default is double colon `::`). Example to replace dog with cat `dog::cat`. Supports mulitple string replacements, just add one replacement per line.
28
39
29
-

40
+

30
41
31
42
### Inputs
32
43
-**`input_string`**: The string or text to process
@@ -36,8 +47,15 @@ Replaces text strings with new strings. Each line should contain a search and re
36
47
-**`match_whole_string`**: Ensure only exact matches are replaced (default: disabled)
37
48
-**`remove_extra_spaces`**: Clean up extra spaces after replacement (default: enabled)
38
49
39
-
### String Replace Example Usage:
40
-

50
+
## String Preview
51
+
Simply displays a string output. Can be used to view the results/changes to the input_string by the `String Strip` or `String Replace`.
52
+
53
+

54
+
55
+
## Example Usage
56
+
57
+

58
+
41
59
42
60
## Installation
43
61
1. Navigate to the `custom_nodes` directory in your ComfyUI installation path.
@@ -46,4 +64,7 @@ Replaces text strings with new strings. Each line should contain a search and re
0 commit comments