ComfyUI Node

islower

Islower — the quiet case-checker for whatever text you just built

By StableLlama·Created about a year ago·Updated 4 days ago· 48
islower
    • BOOLEAN
    string

    Once your workflow stops being a straight line from prompt to image, you start asking questions like "is this string lowercase?" Not because you're curious - because the answer decides what happens next. That's what islower from the Basic data handling pack answers, with a real BOOLEAN you can wire into a conditional.

    Reach for it when you're normalizing text before it hits a downstream node: verifying a tag string is the case you expect, checking a value you pulled out of a file or URL before you compare it, or gating prompt-building logic. The output is a genuine ComfyUI BOOLEAN, not a string that says "true", so it plugs straight into the pack's own if/else and comparison nodes.

    How it works

    Under the hood this is Python's str.islower() with the UI stripped off. Two conditions have to hold for it to return True: the string has at least one cased character, and every cased character is lowercase. Non-cased characters - digits, punctuation, underscores - are ignored entirely. So:

    • "hello 123!"True
    • "Hello"False
    • "123"False (no cased characters at all)
    • ""False (same reason)
    • "hello_world"True (the underscore doesn't count)

    That last one trips people. "hello_world" looks like it should fail, but Python only cares about cased characters, and both words are lowercase. If you're checking snake_case filenames, that's exactly the behavior you want.

    Inputs and outputs

    Only one input matters: string, a required STRING input that defaults to "". Type or wire in whatever text you're interrogating. The single output is BOOLEAN - True if lowercase, False otherwise. From there it feeds into a conditional, a switch, or an equality check to route your workflow.

    Installing it

    This node ships in the Basic data handling pack by StableLlama. Easiest route is ComfyUI Manager - search "Basic data handling" and install. Or, by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/StableLlama/ComfyUI-basic_data_handling
    

    Then restart ComfyUI. The whole pack is pure Python with zero dependencies and nothing to download - no models, no wheels, no CUDA bits. It's about the lightest install in the ecosystem, which is the main reason it shows up in shared workflows without a fight. You'll find this node under Basic/STRING/is in the node menu.

    Common issues

    The trap is the empty string. A ComfyUI text input that the user left blank is "", not None, and islower on that returns False - so if you're using it as a "is this text safe to lowercase" gate, blank text fails the check. That's correct Python behavior, just surprising the first time.

    One pack-level note: the community has hit friction wiring ComfyUI Core's BOOLEAN primitive output into this pack's conditional nodes - the types don't always line up. If you see a conditional misbehaving, run the value through the pack's to BOOLEAN cast node before the condition input. The BOOLEAN output from this node is already that type, so it's the safer source.

    CategoryBasic/STRING/is

    Inputs (1)

    NameTypeDefaultDescription
    stringSTRING

    Outputs (1)

    NameTypeDescription
    BOOLEANBOOLEAN