ComfyUI Node

Display Float

The DeepGen node that never calls DeepGen

By deepiksdev·Created 8 months ago·Updated 6 months ago· 0
Display Float
    • text
    float_val

    Every other node in the DeepGen pack is an API wrapper: it ships your prompt off to deepgen.app and waits for the cloud to render something. DeepGen_F2T0 is the exception. It has no key, makes no network call, and costs you nothing. It's a utility node whose entire job is to take a number and display it as text.

    Under the hood it's dead simple: a FLOAT in, a STRING out, flagged as an output node so the result shows up in the UI. You'll mostly reach for it for one of two reasons. The first is metering - every DeepGen generator returns a total_credits_used float, and wiring that into this node is the cheapest way to see exactly what each run cost you without digging through console logs. The second is debugging: if some node downstream is handing you a float and you're not sure what it actually is, this shows it to you.

    What you actually set

    There's one input and one output, and neither needs much explanation:

    • float_val (FLOAT) - the number to display. Note the forceInput flag in the schema: you can't type a value in, you have to wire one in from another node. That's fine, it's what you want here anyway. Any node outputting a float works - total_credits_used from a DeepGen generator, a value from a math node, whatever.
    • text (STRING) - the float rendered as a string. You can leave it unconnected and just read the value in the node's UI preview, or feed it into a text-save node if you're logging runs.

    One nice touch: the node is registered under DeepGen/Utilities, and the pack keeps an old alias, DisplayFloat_deepgen, around for workflows built before the rename. If you see that name in an old graph, it's the same node.

    Installing it

    It ships in the same pack as all the DeepGen nodes, so the install is identical to the rest of them:

    cd ComfyUI/custom_nodes
    git clone https://github.com/deepiksdev/ComfyUI-DeepGen-API.git
    cd ComfyUI-DeepGen-API
    pip install -r requirements.txt
    

    Then restart ComfyUI. (Or use ComfyUI Manager and search "ComfyUI-DeepGen-API".) The pack's only Python dependencies are requests and opencv-python - nothing heavy, no model downloads.

    The one gotcha

    Because this node does nothing, there's very little to go wrong. The only trap is expecting more from it than it does: it formats a float as text, full stop. It won't round, pretty-print, or convert to a percentage - you get str(float_val). If you need formatting, pipe the text into a string-format node afterward. And if you're wiring it up and the input won't accept a typed value, that's the forceInput flag, not a bug - connect a wire and move on.

    CategoryDeepGen/Utilities

    Inputs (1)

    NameTypeDefaultDescription
    float_valFLOAT

    Outputs (1)

    NameTypeDescription
    textSTRING