Nodes/ComfyUI Layer Style/LayerUtility: Float
ComfyUI Node Runs on cloud

LayerUtility: Float

Float — a numeric value you can wire and display

By chflame163·Created 3 years ago·Updated 4 days ago· 3,113
LayerUtility: Float
    • float
    • string
    float_value0.0000

    The numeric sibling of this pack's Boolean node: one widget holding a number, exposed two ways - as a real FLOAT you can wire into anything expecting a numeric input, and as a STRING for anywhere you want that number as text. No computation, no model, just a value living on a node that other parts of the graph can read.

    It shows up in workflows the moment you need a single number to be reused, displayed, or exposed to the outside world. Set a value once and wire it to three different nodes that all need the same scale factor. Feed the string output into a filename so a batch of renders records which parameter they used. Or expose it as an API input so a caller can override a numeric setting without touching the graph at all.

    How it works

    Nothing to explain beyond the obvious: float_value is the widget, and it's passed straight out in both forms. It's a static input unless something (the API, a Set Node value call) changes it - it doesn't compute anything from upstream connections.

    The inputs and outputs that matter

    • float_value (default 0, range effectively unbounded - ±1×10¹⁸ - step 0.00001) - the number. That range is absurdly wide by design; in practice you'll be nowhere near the edges of it.
    • float output - the raw numeric value, for wiring into anything that takes a FLOAT.
    • string output - the same value as text.

    How to install it

    Ships with the ComfyUI Layer Style pack. ComfyUI Manager - search ComfyUI Layer Style, install, restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/chflame163/ComfyUI_LayerStyle
    pip install -r ComfyUI_LayerStyle/requirements.txt
    

    then restart. Lives under 😺dzNodes → LayerUtility → Data. Nothing to download - pure logic, no models involved.

    Common issues & troubleshooting

    There's very little that can actually go wrong in this node - it's a single widget with two output ports. The one thing worth double-checking: if a downstream node expects an INT and you've wired float straight into it, that's a type mismatch ComfyUI should flag at connect time rather than something this node is responsible for fixing - cast it explicitly with a conversion node if you need a whole number.

    The node isn't in your node list at all. That's the pack failing to import, not this node - LayerStyle pulls in a long dependency chain, and a broken library (transformers paired with a stray TensorFlow install is the recurring offender) takes down every LayerStyle and LayerUtility node at once. Especially common on an old, pre-split install (the pack used to ship combined with the heavier LayerStyle Advance). Reinstall clean, or hit "Try Fix" in ComfyUI Manager and read the actual traceback before assuming this specific node is the problem.

    Category😺dzNodes/LayerUtility/Data

    Inputs (1)

    NameTypeDefaultDescription
    float_valueFLOAT0.0000-1000000000000000000–1000000000000000000

    Outputs (2)

    NameTypeDescription
    floatFLOAT
    stringSTRING