STRINGER (JOV) πͺ
The string surgery node ComfyUI never shipped
- RANGE
- π
- COUNT
ComfyUI is weirdly bad at strings. You can generate a prompt, but split it, find something in it, or replace a token - and you're suddenly writing custom Python or wiring three nodes sideways. STRINGER is Jovimetrix's answer: five string operations in one node, all batch-aware, with a COUNT output so you know what you got. It's the kind of utility you don't think you need until a workflow needs to munge a prompt or parse a filename, and then it's the whole solution.
The operation lives on βοΈ, and the tooltip on π tells you the split roles: it's the delimiter for SPLIT/JOIN, and the search string for FIND/REPLACE. The five modes:
- SPLIT - breaks each input on the delimiter and returns the pieces as a list. Nicely, it keeps empty tokens so "a,,b" split on "," gives you three parts, not two.
- JOIN - the reverse: glues the whole input list into one string with the delimiter as the separator.
- FIND - filters the input list down to only the strings that contain the search text. This is a filter, not a locator.
- REPLACE - swaps every occurrence of the search string for whatever's in REPLACE.
- SLICE - slices each string by RANGE, which is a start/end/step tuple (default 0, -1, 1). Negative values are relative to the string's end, and out-of-range values clip instead of crashing.
Outputs: π is the resulting string (a list - one per input item), and COUNT is an INT telling you how many strings came out. That count is more useful than it looks: after a SPLIT you can use it to validate you got the expected number of pieces, or drive a loop. Everything is list-native, so a batch of prompts goes through in one pass.
Where you'll actually use it: sanitizing a filename pulled from a QUEUE node (REPLACE spaces or illegal chars), parsing a path into components, FIND-ing only the prompts that mention a subject, or SPLIT-ting a comma list into a proper batch for LERP or any list node. It plays especially well with QUEUE (JOV) - cycle through raw strings, STRINGER cleans them up, and the clean result feeds your text encoder.
One honest note: STRINGER is a current, maintained node - it's not one of this pack's legacy refugees. What has churned over versions is its internals and type handling (the pack's v2.0 updates cleaned up enum names and defaults across the board), so if an old workflow's STRINGER acts oddly, re-check which op it's actually set to. The operation enum got realigned with cozy_comfyui in 2.1.0.
Install is the pack-wide routine: ComfyUI Manager β "Jovimetrix", or
cd ComfyUI/custom_nodes
git clone https://github.com/Amorano/Jovimetrix.git
pip install -r Jovimetrix/requirements.txt
then restart. Dependencies are the shared light set (numpy, opencv-contrib-python, Pillow, matplotlib, the cozy-comfyui helpers), no models. Keep ComfyUI at 0.1.3+ with a current frontend and you're set.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| βοΈopt | COMBO | SPLIT | Operation to perform on the input string |
| πopt | STRING | Delimiter (SPLIT/JOIN) or string to use as search string (FIND/REPLACE). | |
| REPLACEopt | STRING | String to use as replacement | |
| RANGEopt | VEC3INT | 0,-1,1 | Start, End and Step. Values will clip to the actual list size(s). |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| π | STRING | β |
| COUNT | INT | β |