ComfyUI Node

String Lower

Normalize every tag to lowercase before you compare

By kale4eat·Created 2 years ago·Updated 2 years ago· 7
String Lower
    • string
    s

    String Lower is the quiet twin of String Upper, and in most workflows it's the more useful one. It converts a string to all lowercase - and lowercase is the common denominator that makes string comparisons stop being case-sensitive headaches.

    What it is

    It runs Python's s.lower(). Every uppercase letter becomes lowercase; everything else passes through. "MASTERPIECE, Best Quality" becomes "masterpiece, best quality".

    The practical payoff is normalization for comparison. This pack's predicates - String Equal, String Not Equal, String StartsWith, String EndsWith - are all case-sensitive, which means "Masterpiece" and "masterpiece" read as different strings even though they're the same tag. Pipe both sides through String Lower before comparing and you get case-insensitive logic for free. Lowercase is the safer normalization target than uppercase, because it doesn't have the "shouting" side effect if you ever feed the result somewhere it'll be seen.

    The inputs and outputs

    • s (STRING) - the text to convert.
    • string (STRING) - the lowercase result.

    One in, one out, no options. Exactly as thin as it looks.

    How to install it

    Part of the string-util pack, a single dependency-free repo:

    cd ComfyUI/custom_nodes
    git clone https://github.com/kale4eat/ComfyUI-string-util
    

    or search "ComfyUI-string-util" in ComfyUI Manager and restart. It sits under the string-util category, right next to String Upper.

    Common issues

    Very little can go wrong - this node is about as safe as a node gets. The one thing to remember is the flip side of normalization: lowercase is a rewrite of the text. If you lowercase a prompt and then feed it to CLIP Text Encode, you've changed what the model sees, and tag-case can matter to how the text encoder reads it. Keep lowercase for comparisons and logic, not for the actual prompt content you send to the encoder. Lowercasing for logic, preserving case for generation - that split keeps everything working.

    Categorystring-util

    Inputs (1)

    NameTypeDefaultDescription
    sSTRING

    Outputs (1)

    NameTypeDescription
    stringSTRING