Nodes/ComfyUI-GlifNodes/Glif Variable
ComfyUI Node

Glif Variable

A node that only does something inside glif's own editor

By glifxyz·Created 3 years ago·Updated about a year ago· 65
Glif Variable
    • STRING
    • INT
    • FLOAT
    variable
    fallback

    Let's be direct: Glif Variable is the most platform-specific node in this pack, and if you're running stock ComfyUI on your own machine, it is basically a no-op. It exists so that workflows built on glif's hosted Comfy editor can read the variables that platform injects into a run - the knobs a glif's creator exposes to people using their app. Outside that editor, there are no injected variables, and the node falls back to whatever you type. That's by design, and it's fine.

    What it does

    Two inputs: variable and fallback. The variable dropdown is populated dynamically by the glif platform - in plain ComfyUI it's an enum with a single empty string choice, which is your first clue. fallback is a string you set yourself. The logic is dead simple: if the variable is empty or wrapped in {} (glif's placeholder syntax), it uses the fallback; otherwise it uses the variable value.

    The interesting bit is the outputs: it returns three at once - STRING, INT, and FLOAT. The string is the raw value; the int and float are best-effort conversions that quietly fail to 0 if the text isn't numeric. So one node hands you the same value in whatever type the rest of your graph needs, without a chain of cast nodes. That's actually the tidy part of the design.

    Where it fits

    If you're building a glif on glif.app, this node is how a creator's variable becomes a number or string inside the Comfy workflow - you expose a "seed" or "subject" variable, and Glif Variable carries it in, with a fallback so the workflow still runs when the variable isn't set. If you're not, and you somehow end up with a workflow that uses it, just set the fallback and treat the node as a string-to-typed-value converter with extra steps. It'll work, it's just not what it's for.

    Install

    It's part of ComfyUI-GlifNodes. ComfyUI Manager → "ComfyUI-GlifNodes", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/glifxyz/ComfyUI-GlifNodes
    

    Restart ComfyUI. No models, no dependencies beyond the pack itself - it's a tiny string-handling node, instant even on CPU.

    Honest bottom line: if you found this page because a downloaded workflow has a Glif Variable in it and you're not on glif, don't panic and don't delete it - the fallback is right there, and the rest of the graph keeps working. If you are building on glif, it's exactly the bridge you were told it was.

    Categoryglif/variables

    Inputs (2)

    NameTypeDefaultDescription
    variableCOMBO1 options:
    fallbackSTRING

    Outputs (3)

    NameTypeDescription
    STRINGSTRING
    INTINT
    FLOATFLOAT