Nodes/PixelML ComfyUI Nodes/FloatInput_PixelML
ComfyUI Node

FloatInput_PixelML

A float input that parses text and clamps it into range — for when your CFG shows up as a string

By PixelML·Created 2 years ago·Updated 2 years ago· 0
FloatInput_PixelML
    • FLOAT
    namefloat_input
    value0
    min-2147483648.00
    max2147483648.00

    FloatInput_PixelML is the floating-point sibling of the pack's integer input, and it shares the same party trick: the value field is a string, parsed and clamped at runtime. Feed it "7.5" and you get a clean FLOAT out. Feed it a half-parsed chunk of LLM output and you get a clamped number instead of a crash. If you've ever watched an agent node hand a sampler a CFG written as "cfg: 7.5" and seen it choke, you already know why this exists.

    It comes from PixelML ComfyUI Nodes, a small pack built around variable handling and workflow automation - the theme being that values travel around these graphs as text and get converted into typed, in-range numbers where they land.

    How it works

    Same shape as the integer version, swapped for floats. On run it parses value with float(), clamps the result to [min, max], and returns it as a FLOAT. If the string won't parse - an empty field, a stray word, a comma where a dot should be - it returns 0.0 rather than throwing.

    Two things to keep in mind, both learned the hard way:

    • The silent 0.0 fallback. A denoise of 0.0 and a denoise that failed to parse look identical in the result. If a run comes back suspiciously clean or a strength slider behaves as if it's off, the string that reached the node is the first thing to check.
    • The clamp is invisible. There's no warning when your 7.5 CFG gets pinned to 7.0 because max was set lower. The clamp is a feature for agentic pipelines that can hallucinate wildly out-of-range values, but it can also quietly neuter a deliberate number.

    The inputs that matter

    • value (STRING, default "0") - the text to parse. This is the field you wire a generated string into, or just type 7.5 into.
    • min / max (FLOAT, default ±2³¹) - the clamp bounds. Set these to the sane operating range of whatever you're feeding: CFG, denoise, LoRA strength, upscale factor.

    The name field is a label for agentic bookkeeping; it does nothing to the output. The single FLOAT output plugs into any float input downstream - cfg, denoise, strength, scale, you name it.

    Install

    Install via ComfyUI Manager by searching "PixelML ComfyUI Nodes", or clone by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/PixelML/ComfyUI-PixelML-CustomNodes
    

    Then restart ComfyUI. One caveat: the pack's requirements.txt pins diffusers==0.24.0 and lists boto3/httpx/httpx-sse, yet the shipped nodes never import any of them - they only use PIL, numpy, torch, and requests, all standard ComfyUI fare. If that pinned diffusers downgrade breaks other nodes in your setup, skip the requirements step; this node doesn't need it. The README's dependency list has rotted well behind the actual code.

    Reach for FloatInput_PixelML when a float reaches your workflow as text and you need it typed and in range. If you're hand-typing numbers, core ComfyUI's float primitive does the same job with fewer dependencies.

    Categorysd

    Inputs (4)

    NameTypeDefaultDescription
    nameSTRINGfloat_input
    valueSTRING0
    minFLOAT-2147483648.00
    maxFLOAT2147483648.00

    Outputs (1)

    NameTypeDescription
    FLOATFLOAT