PixaromaHelp
Help › Nodes › Logic & Flow

Text Match Pixaroma

Does this text contain one of your words? Get a yes or no, and let things through only on a match.

In ComfyUI: double-click an empty spot on the canvas and type Text Match Pixaroma.

What it does

Checks a text for the words you type and turns the answer into something a workflow can use: match (yes or no), index (which word matched, 1 for the first) and word (the word itself).

Wire anything into value (a picture, a prompt, a latent) and two gates appear: if_match lets it through only when the text matches, if_no_match only when it does not. Whatever comes after a closed gate simply does not run, with no error. With nothing in value, the gates pass the text itself.

Filter a whole folder with an AI

  • Load Images from Folder sends each picture to AI Prompt Pixaroma with a vision model, and a formula like: Is the face sharp and in focus? Answer only yes or no.
  • Wire the AI's text into Text Match and keep the word yes.
  • Wire the picture into value and if_match into Save Image Pixaroma: only the pictures the AI said yes to are saved. Use if_no_match to collect the others.

Settings

words
The words or phrases to look for, one per line or separated by commas.
mode
contains any word (the default), contains all words, is exactly one of them (Yes. and "yes" count as yes) or starts with one of them.
ignore_case
On: Yes, YES and yes are the same.
whole_words
On: cat does not match category. Off: a word may be part of a longer one.

Outputs

match
True or False.
index
The number of the word that matched, 0 when none did. Handy to pick a branch by number.
word
The word that matched.
if_match
The value (or the text) when it matches; nothing runs after it otherwise.
if_no_match
The value (or the text) when it does not match.

What you wire in

textSTRING
The text to check, for example an AI Prompt answer, a prompt or a file name.
value*optional
Optional. Anything to let through only on a match (if_match) or only without one (if_no_match): a picture, a prompt, a latent. Not wired: the gates pass the text.
The words are plain text, never a code pattern, so any symbol you type is matched as it is.

This is the help that comes with Pixaroma 1.4.212. Inside ComfyUI, select the node and click the orange ? above it to read the same help there.