ComfyUI Node

Show Number

Read a number back out of a ComfyUI run without a Save node

By lldacing·Created 3 years ago·Updated 8 months ago· 96
Show Number
    • NUMBER
    number
    keytext

    If you've ever wired a NUMBER value deep into a ComfyUI graph and then had no way to actually see it without adding a print statement to someone else's Python, ShowNumber is the fix. It's a tiny probe: plug a number in, and it both displays that value on the node and - because it's flagged as an output node - pushes it into the run's websocket message, so if you're calling ComfyUI's API instead of clicking around the UI, the value shows up in your JSON response too.

    That last part is the whole reason it's in comfyui-easyapi-nodes, a pack built by lldacing specifically for people driving ComfyUI headless rather than by hand. Stock ComfyUI is happy to compute a number deep inside a graph and never surface it anywhere outside the node itself. Fine if a human's staring at the canvas. Useless if your backend fired off the prompt and is waiting on a result. ShowNumber (and its siblings ShowInt, ShowString, ShowFloat, ShowBoolean) exist to close that gap - a value-reporting node for every basic type ComfyUI passes around.

    How it works

    There's no transformation here. ShowNumber takes whatever NUMBER value reaches it, displays it, and passes the exact same value back out so you can keep chaining nodes after it. It's a pass-through with a side effect: the side effect is what makes it useful.

    The inputs and outputs that matter

    • number (NUMBER, required) - the value you want visible. Wire in anything that outputs a NUMBER - a math node, a counter, whatever you're tracking.
    • key (STRING, default "text") - the label this value is filed under in the returned message. If you're only showing one value this doesn't matter much, but the moment you drop two or three Show* nodes into the same graph, distinct keys are what let your API client tell them apart in the response instead of getting one value overwritten by another.
    • Output: NUMBER - the same value, unchanged, so ShowNumber never dead-ends a wire. Chain it mid-graph without breaking anything downstream.

    How to install it

    Easiest path is ComfyUI Manager: open it, search comfyui-easyapi-nodes, install, restart. Manually, it's the usual drill:

    cd ComfyUI/custom_nodes
    git clone https://github.com/lldacing/comfyui-easyapi-nodes.git
    cd comfyui-easyapi-nodes
    pip install -r requirements.txt
    

    Restart ComfyUI afterward. There are no models to download for this node - it's pure Python, no external weights, no heavy dependencies. To update later, git pull inside the pack's folder and restart again.

    Common issues & troubleshooting

    Nothing shows up in my API response. Check that you're actually reading the websocket/history output and not just the final image URLs - ShowNumber's value rides along in the run's message data, not in the outputs list most quick-start API examples parse. If you're new to the API-format side of ComfyUI at all, that's the same channel tools like ViewComfy or a custom frontend read from when they consume an exported workflow.

    Two Show nodes are stepping on each other. This is what key is for - give each ShowNumber (and any other Show* node) in the graph its own key string instead of leaving them all on the default "text".

    I just want to debug, not build an API integration. That's a completely legitimate use too - drop ShowNumber mid-graph, run the workflow, and read the value straight off the node in the UI. You don't need to be calling the API for this to be useful; it's just at its best when you are.

    CategoryEasyApi/Number

    Inputs (2)

    NameTypeDefaultDescription
    numberNUMBER
    keySTRINGtext

    Outputs (1)

    NameTypeDescription
    NUMBERNUMBER