ComfyUI Node

Show Float

Surface a computed number in the UI and the API response

By lldacing·Created 3 years ago·Updated 8 months ago· 96
Show Float
    • FLOAT
    FLOAT
    keytext

    A float slipping through a ComfyUI graph - a similarity score out of a face-comparison node, a computed strength value, a confidence percentage from a detector - is just as invisible as a boolean until something shows it to you. ShowFloat is the display node for that: drop it on a wire carrying a FLOAT and it reports the number, both in the UI when you queue the run and in the API response if you're calling ComfyUI programmatically.

    Mechanism

    Same design as its siblings ShowBoolean, ShowString, ShowInt and ShowNumber - this pack ships one of these per core data type rather than a single "show anything" node, which keeps each one strictly typed instead of dumping a stringified blob of unknown shape into the API response. It's an output node, so it runs every time it's part of the graph, tags the float with your chosen key, and pushes {key: value} into the run's output message - the same reporting mechanism ImageToBase64Advanced uses for its base64 payload, just for a plain number instead of an image string.

    It's also a passthrough: the float comes back out the other side unchanged, so you can wire ShowFloat into the middle of an existing connection to inspect a value without breaking anything downstream.

    Inputs and outputs that matter

    • FLOAT (required) - the value to display and report.
    • key (required, default "text") - the label it's tagged with in the output message. This is the field that matters most in practice: give it something you'll recognize later, especially if you're going to have more than one numeric readout in the same workflow.

    Output: a single FLOAT, the same value, unchanged, for continuing the wire.

    Installing it

    Via ComfyUI Manager, search comfyui-easyapi-nodes. By hand:

    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. ShowFloat is pure Python, no models, no extra downloads - it just rides along with the rest of the pack's dependency install.

    Where people get tripped up

    Same landmine as the rest of the Show* family: the default key is "text", shared across ShowFloat, ShowString, ShowBoolean and friends. Stack two Show* nodes in one workflow without giving them distinct keys and you'll get collisions in the output message - you can still see both in the UI queue log (they're separate node instances there), but an API caller reading the response by key won't be able to tell them apart. Set a real key the moment you add a second one, something like similarity_score or strength_used, not the default.

    The other thing to remember: this node doesn't format or round the number for you - there's nothing in it for decimal places or units. If you need a clean two-decimal percentage for display, do that formatting upstream (or downstream) rather than expecting ShowFloat to do it.

    CategoryEasyApi/Float

    Inputs (2)

    NameTypeDefaultDescription
    FLOATFLOAT
    keySTRINGtext

    Outputs (1)

    NameTypeDescription
    FLOATFLOAT