Nodes/ComfyUI Ino Nodes/Ino String Starts/Ends With
ComfyUI Node

Ino String Starts/Ends With

The yes/no check that routes your workflow

By nobandegani·Created about a year ago·Updated 2 months ago· 6
Ino String Starts/Ends With
    • result
    input_string
    substring
    mode

    ComfyUI gives you conditionals and switches, but those only help if something upstream decides which branch to take. Ino String Starts/Ends With is that decision-maker: it looks at a string, asks "does this start with X, or end with Y?", and answers with a true/false boolean you can feed straight into a switch or a logic node. It's a predicate - one of those small unglamorous nodes that make a workflow feel alive instead of hardcoded.

    It's part of the ComfyUI Ino Nodes pack (nobandegani/ComfyUI-InoNodes).

    Inputs and output

    Three inputs:

    • input_string - the text to test.
    • substring - what you're checking for.
    • mode - a dropdown: starts_with or ends_with.

    One output, result, a boolean. It's case-sensitive (it's plain Python startswith/endswith under the hood), so "Photo" starting with "photo" returns false.

    Where it earns its keep

    The classic pattern is branch-by-filename. Say a workflow processes a folder of files - check if a name ends with _mask.png or starts with preview_, and route it to different downstream paths. Pair result with the pack's Ino Switch On Int or a bool switch, and you've built a decision point: one string in, one of two pipelines out. It's also handy as a guard - "only run the next step if the prompt starts with X" - for those automation-style graphs where ComfyUI is acting more like a job runner.

    Beginners often grab a string-comparison node for this, but "equals" is the wrong tool when you only know the prefix or suffix. If the thing you're matching is buried in the middle of the string, note that this node won't find it - that's a job for a contains-style check, which the same pack provides in a sibling string node.

    Install

    It's one node in a larger pack:

    # ComfyUI Manager: search "ComfyUI Ino Nodes", install, restart
    # or manually:
    cd ComfyUI/custom_nodes
    git clone https://github.com/nobandegani/ComfyUI-InoNodes.git
    cd ComfyUI-InoNodes
    pip install -r requirements.txt
    

    Restart ComfyUI after. No models, no services - requirements.txt installs the pack's shared dependency inopyutils. Keep ComfyUI current (V3 schema, v0.18.1+); the README's cd comfyui_ino_nodes line is a typo for the ComfyUI-InoNodes folder.

    If your checks seem to never fire, the usual culprit is case - double-check whether your data is lowercased before it hits this node. It's a two-field-and-a-dropdown node; the complexity budget is all in how you wire the boolean.

    CategoryInoStringHelper

    Inputs (3)

    NameTypeDefaultDescription
    input_stringSTRING
    substringSTRING
    modeCOMBO2 options: starts_with, ends_with

    Outputs (1)

    NameTypeDescription
    resultBOOLEAN