Nodes/Quality of life Suit:V2/replace String advanced _O
ComfyUI Node

replace String advanced _O

The fully-wired version of a node you shouldn't use

By omar92·Created 3 years ago·Updated 5 months ago· 181
replace String advanced _O
  • string
  • old
  • new
  • STR

replace String advanced _O is the "advanced" sibling of the pack's deprecated find-and-replace node - advanced here meaning that every input, including the old and new substrings, comes in as the legacy STR type over wires instead of as text widgets. If you wanted to change what's being replaced on the fly, driven by other nodes, this is the version built for that.

But let's be honest about the label. "Advanced" in this case doesn't mean more power - it means more of the same deprecated STR typing that already makes the plain replace String _O awkward to use in any modern workflow. Both live in O/deprecated/string/operations of the Quality of Life Suit pack, and both are compatibility glue for the pack's pre-merge string suite.

How it works

Same mechanism as its sibling - one Python str.replace() call replacing all occurrences - with a different wiring philosophy:

  • string (STR) - the source, dict-wrapped, from a legacy STR node.
  • old (STR) - the substring to find, supplied as another STR node's output (e.g. from String _O).
  • new (STR) - the replacement, also wired in from an STR node.

One output: STR, the modified string.

So where replace String _O lets you type old/new directly into widgets, this node forces every argument to flow through the graph. That's genuinely useful in one narrow scenario: when the strings you're searching for and replacing are themselves dynamic - a term generated mid-workflow, a filename, a value that changes per queue. If your find/replace targets are static text, this version is pure extra plumbing.

Where it fits

The same honest guidance as every deprecated node here applies: only reach for it when you're loading an old workflow built on the legacy STR suite, or when you specifically need dynamic old/new values inside that legacy suite. For new work, Replace Text _O under O/text/operations is the modern, native-STRING version - and since the whole deprecated folder is marked for eventual removal, building on it is planning for breakage.

Installing it

Part of the Quality of Life Suit pack (omar92/ComfyUI-QualityOfLifeSuit_Omar92). Install via ComfyUI Manager (search "Quality of Life Suit") or clone:

cd <ComfyUI>/custom_nodes
git clone https://github.com/omar92/ComfyUI-QualityOfLifeSuit_Omar92.git

Restart ComfyUI properly. No models, no dependencies.

Common issues

  • "I can't type my replacement text." Right - this node takes wires, not widgets. Every input is STR. If you want to type, use replace String _O.
  • "The wire won't connect from a normal text node." STRSTRING. You need the legacy String _O node as the source.
  • "Nothing replaced." Check that your old string actually matches - str.replace is case-sensitive and exact.

It's a niche of a niche: a find-and-replace for the pack's legacy string system, fully graph-wired. If that's not precisely your situation, the modern node is a better home.

CategoryO/deprecated/string/operations

Inputs (3)

NameTypeDefaultDescription
stringSTR
oldSTR
newSTR

Outputs (1)

NameTypeDescription
STRSTR