π Array Includes
Exact membership, not a substring search
- Result
"Is this in there?"
Array Includes answers a yes/no question: does this list contain this value? It returns a single BOOLEAN and nothing else, which makes it the smallest node in honda-nodes' array group and one of the more useful ones once you have conditional wiring in a graph.
The use case that sells it: you have a blocklist, a style list, a set of approved tags, or a folder's worth of filenames, and you want a decision out of it. Is nsfw in this prompt's tag list? Is this model name in the downloaded set? Is character_a.png already in the output directory? All of that is membership testing, and before this node exists you're doing it with your eyes.
The mechanism, and the trap
It splits the array on newlines, trims items if asked, and compares whole items. Not substrings.
That distinction is the entire learning curve. cat does not match an item that says cat on a mat. If you want substring behaviour you have to reach for π Array Filter with the glob *cat* instead, which returns the matching items rather than a boolean. Getting this backwards leads to the "why is it False, the word is clearly right there" moment, and the answer is always that Includes is exact-match by design.
Case Sensitive is on by default. Turn it off and the comparison lowercases both sides - but note the implementation detail: the case-insensitive path compares item.lower() == value.lower() per item, so it's still exact, just folded. Cat and cat match; cat. and cat don't.
Trim Items is also on by default, and it's doing quiet work: it strips each item before comparing, so a list pasted with trailing spaces still matches. Interestingly it does not trim the value you're searching for - so if your search value has a trailing space in it, you'll get a False that looks impossible. Retype the value; it's almost always a phantom space.
Inputs and output
Both Array and Value are socket-only inputs in the pack's V3 schema. Value being a socket rather than a text box is the thing that surprises people: you can't just type nsfw into it. Route it through a text primitive or a Text node, or - if you only ever search for one fixed string - accept a one-node detour. It's slightly more wiring than you'd design from scratch, but it does mean the search term can come from anywhere, including a metadata extraction earlier in the graph.
The one output, Result (BOOLEAN), is designed to feed a switch. The plumbing tradition in ComfyUI - rgthree's fallback switches, the various *-typed routers - is built on exactly this shape: a boolean or an index picks which branch survives. Is the tag present? Then ship branch A, else branch B.
Less glamorous but frequently right: wire Result into a π€ Text Preview or a console print and use it as a check you glance at. It costs nothing and catches the day your blocklist file didn't load.
Install
Manager: Extensions β Node Pack β search "Honda Nodes" β Install β restart. Or clone it:
cd ComfyUI/custom_nodes
git clone --depth 1 https://github.com/Avaray/honda-nodes.git
cd honda-nodes
python install.py # ComfyUI's python; portable Windows: ..\..\..\python_embeded\python.exe install.py
The installer grabs jq and ime for the pack's JSON and metadata nodes; this one doesn't call them. Do check your ComfyUI version though - honda-nodes is authored entirely against the V3 schema and declares requires-comfyui >= 0.38.0. On anything older, the pack loads zero nodes and gives you no useful error.
Common issues
False when the item is obviously present. Three candidates, in order of likelihood: substring thinking (use *value* with Array Filter), a trailing space on your search value, or case (turn Case Sensitive off).
False for every value on Windows-created lists. CRLF line endings. str.split("\n") leaves a trailing \r on each item, and while Trim Items removes it, the moment you disable trimming every comparison fails. Leave Trim Items on for lists that came off Windows.
Nothing happens. It's not an output node, so ComfyUI won't execute it unless something downstream needs the boolean. Give Result a consumer.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| array | STRING | Newline-separated array string. | |
| value | STRING | The value to search for in the array. | |
| case_sensitive | BOOLEAN | true | If disabled, comparison is case-insensitive. |
| trim_items | BOOLEAN | true | Strip leading and trailing whitespace from each item before comparing. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Result | BOOLEAN | β |