ComfyUI Node Runs on cloud

Text Find

Turn a substring check into a boolean you can branch on

By WASasquatch·Created 3 years ago·Updated about a year ago· 1,812
Text Find

      WAS's own README describes this one plainly: find a substring or pattern within another string, and return a boolean. That's the whole node - but it's a more load-bearing one than it sounds like, because it's the entry point into WAS's logic system. On its own, ComfyUI doesn't give you much in the way of "if my prompt contains X, do Y." Text Find is where that kind of branching starts: it turns a plain string check into a TRUE/FALSE value that WAS's Logic nodes (Boolean, AND, OR, XOR, NOT) and its various Input Switch nodes can actually act on.

      The use case that makes this click: say you've got a prompt string that sometimes includes a trigger word for a specific LoRA, and sometimes doesn't. Rather than manually toggling a LoRA loader on and off, you run the prompt through Text Find looking for that trigger word, wire the boolean result into a Model Input Switch or a Lora Input Switch, and the loader only kicks in when the trigger word is actually present. Same pattern works for routing based on a filename tag, gating a whole branch of your workflow on whether a piece of text matches some condition, or building a self-configuring workflow that reacts to its own prompt instead of needing manual toggles every run.

      The inputs are exactly what you'd expect from the description: a string to search inside, and the substring or pattern you're looking for. The output is a boolean. Worth noting the README's own wording says "substring or pattern," which suggests it's not strictly limited to a literal string match - don't be surprised if it accepts some regex-flavored input, though the details of what's supported are worth checking against the node's own tooltip once it's on your canvas rather than assumed. The one thing that catches people with basically every find/compare node in any toolkit, WAS included: case sensitivity. If you're checking for "Trigger" and the actual text says "trigger," a naive substring check will come back false and you'll spend ten minutes convinced the node is broken before you notice the capitalization mismatch.

      Installing it: through ComfyUI Manager, search "WAS Node Suite" and install - the straightforward path for most people. Manually: cd ComfyUI/custom_nodes && git clone https://github.com/WASasquatch/was-node-suite-comfyui, then pip install -r requirements.txt (portable installs: python_embeded\python.exe -s -m pip install -r requirements.txt; manual/venv installs: activate the venv first), then restart ComfyUI. This is a pure string-processing node - no model, no extra dependency of its own, so it's ready the moment the suite itself loads.

      Where it bites: beyond the case-sensitivity trap above, the main risk isn't the node itself but the pack it ships in. WAS Node Suite has had no active development since December 2023 - "(Retired)" is literally in the README's title - and the community's recurring complaint is the whole suite failing to import after a ComfyUI update, rather than any specific text node breaking on its own. If Text Find (or any WAS node) stops showing up, check your console log for an import error on the suite as a whole before assuming this node in particular is at fault.

      Categoryx

      Inputs (0)

      No inputs

      Outputs (0)

      No outputs