ComfyUI Node

upper

Everything to Uppercase, No Surprises

By StableLlama·Created about a year ago·Updated 4 days ago· 48
upper
    • STRING
    string

    upper is the boring node you'll actually reach for - which is exactly why it's worth knowing. It converts every lowercase character to uppercase and leaves the rest alone. No options, no behavior to discover, one input and one output. In a pack full of Python string wrappers, this is the one people end up using for the unglamorous reason: normalizing text so comparisons work.

    How it works

    A straight pass-through to Python's str.upper(), from StableLlama's Basic data handling pack - pure Python, zero dependencies. Input string, output STRING. That's the entire API.

    The real value is in how you chain it. Case-insensitive matching is the killer app:

    1. Run a tag, filename, or prompt through upper.
    2. Feed the result into a startswith, a comparison node, or a StringContains.
    3. Now "flux", "Flux", and "FLUX" all compare identically, because you've flattened the case out of the problem.

    This pattern is everywhere in automation: routing on model names, matching tags from different sources, checking whether a string contains a keyword regardless of how it was typed. The pack's own README treats case-insensitive comparison as a feature ("StringComparison with case-sensitive/insensitive options") - doing it with upper + a plain comparison is the DIY version that works with any downstream node.

    When to use it vs. the alternatives

    • upper - everything uppercase, for normalization and ALL CAPS output.
    • lower - everything lowercase, same idea from the other direction.
    • title / capitalize - human-facing formatting, not normalization.

    For pure matching purposes, lower and upper are interchangeable; pick one and stay consistent across your workflow. Mixing them ("compare the uppercased version against a lowercased literal") is the one way to break it.

    Installing it

    Search "Basic data handling" in ComfyUI Manager and restart, or:

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

    Restart and it's available. No models, no requirements - the pack installs in seconds.

    Gotchas

    None worth losing sleep over. str.upper() handles Unicode fine - German ß becomes SS, which is standard Python behavior. And remember the output is uppercase, so if you're feeding it into a text renderer or prompt encoder, the change is real, not cosmetic.

    CategoryBasic/STRING

    Inputs (1)

    NameTypeDefaultDescription
    stringSTRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING