Text Match Pixaroma
Does this text contain one of your words? Get a yes or no, and let things through only on a match.
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
textinto Text Match and keep the wordyes. - Wire the picture into
valueandif_matchinto Save Image Pixaroma: only the pictures the AI said yes to are saved. Useif_no_matchto 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) orstarts 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
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.