Nodes/ComfyUI Ino Nodes/Ino String Contains
ComfyUI Node

Ino String Contains

A substring check that lets your workflow make decisions

By nobandegani·Created about a year ago·Updated 2 months ago· 6
Ino String Contains
    • contains
    input_string
    substring
    case_sensitivetrue

    Text in a ComfyUI workflow isn't just decoration - prompts get generated, transformed, and routed. Ino String Contains turns a question into a boolean: does this string contain that substring? The contains output is a plain BOOLEAN, which means it's the natural thing to feed a switch or a conditional to branch your graph on what the text actually says.

    The real use case is routing. Prompt coming out of an LLM or a wildcard system? Check whether it mentions "portrait" and send it down a portrait-specialized branch. Filename from a batch? Test whether it matches a pattern before deciding what to do with it. This is the text equivalent of a classifier - crude, but instant and free.

    What you set

    Three inputs, all obvious:

    • input_string - the text to search.
    • substring - what you're looking for.
    • case_sensitive - a toggle that defaults to on. Flip it off to ignore case.

    That last one is where beginners lose time. If you're checking a model name against "flux" and your string says "Flux1Dev", a case-sensitive check fails. The toggle is labelled plainly (Case Sensitive / Ignore Case), but it defaults to case-sensitive, which is the opposite of what most people assume when they're doing a quick "does this mention X" check.

    How it works

    It's a plain substring membership test - Python's in operator, essentially. If case_sensitive is on, it checks substring in input_string; if off, it lowercases both sides first and checks again. So "FLUX" matches "flux1dev" when case-insensitive. There's no regex, no partial-word smarts, no fuzzy matching - "cat" matches "concatenate", which is exactly what you asked for, even if it isn't what you meant. For fuzzy or regex behavior you'd need a different tool.

    Installing Ino Nodes

    Comes with the whole Ino pack. ComfyUI Manager: search "ComfyUI Ino Nodes", install, restart. Terminal:

    cd ComfyUI/custom_nodes
    git clone https://github.com/nobandegani/ComfyUI-InoNodes.git
    cd comfyui_ino_nodes
    pip install -r requirements.txt
    

    Pack requires inopyutils installed into ComfyUI's Python environment. No models, no setup.

    Where people get burned

    Two spots: forgetting case sensitivity (covered above), and forgetting that "contains" isn't "equals". If your substring is shorter than the string, it matches - and sometimes that's a false positive that sends your workflow down the wrong branch. When in doubt, check the console for what the string actually held.

    CategoryInoStringHelper

    Inputs (3)

    NameTypeDefaultDescription
    input_stringSTRING
    substringSTRING
    case_sensitiveBOOLEANtrue

    Outputs (1)

    NameTypeDescription
    containsBOOLEAN