Nodes/ComfyUI-Data-Analysis/CDA Float Create
ComfyUI Node

CDA Float Create

The node that types a float so you don't have to

By HowToSD·Created 2 years ago·Updated about a year ago· 23
CDA Float Create
    • FLOAT
    data

    CDA Float Create is one of those nodes that looks pointless until you hit the exact problem it solves. Its entire job: you type a number into a single-line text field, and it hands you a typed Python float on a FLOAT output. If that sounds redundant, you haven't tried feeding precise values into this pack's numeric nodes yet.

    The thing is, ComfyUI's native FLOAT widgets are clumsy. The Data-Analysis pack's own Pandas Fill NA Scalar Float node admits in its docstring that its built-in field only supports one decimal digit - a hard ceiling on precision if you type directly. That's where this node comes in: it produces a real float, with as many digits as you want, and the whole pack treats its output as authoritative. It's the "make the value its own node" trick, and it's the intended workaround for the one-decimal-digit trap.

    It's part of the CDA ("ComfyUI Data Analysis") family in HowToSD's pack, the collection of small IO and display nodes that glue the Pandas/Matplotlib machinery together.

    How it works

    The implementation is brutal and honest: float(data). Your text is parsed with Python's float() - so "3.14" works, "abc" raises a ValueError. No rounding, no coercion beyond what Python does. The result rides out on a FLOAT socket that any node in the pack (or ComfyUI's own) can consume.

    Inputs and outputs

    • data (required, STRING, single-line) - the number as text. Keep it to a plain numeric literal.
    • FLOAT output - the parsed value.

    When you'd reach for it

    Two main cases:

    • Precision. Anywhere a float widget rounds on you - the fill-NA node being the prime example - wire a CDA Float Create in and get your full precision back.
    • Reusability and clarity. A scalar that matters (a threshold, a fill value, a multiplier) deserves to be its own labeled node rather than buried in a widget. Change it in one place and every consumer updates.

    The pipeline pattern is simple: CDA Float Create → the node that needs the number → a show node like CDA Show Float to verify the value made it through.

    Installing it

    It ships with the pack - install once, get the whole CDA family. ComfyUI Manager: search "Data analysis", install ComfyUI-Data-Analysis, restart, reload. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/HowToSD/ComfyUI-Data-Analysis
    mv ComfyUI-Data-Analysis data-analysis   # README: examples expect this folder name
    pip install -r data-analysis/requirements.txt
    

    Dependencies are the pack's stack - pandas, matplotlib, seaborn, scipy, scikit-learn, openpyxl, lxml. No GPU, no models. Since March 2025 the PyTorch nodes live in a separate ComfyUI-Pt-Wrapper extension.

    Gotchas

    • Non-numeric text errors. float("three") is a crash, not a friendly message. Type valid numbers.
    • NaN / inf work but behave oddly. Python parses them fine; pandas will treat NaN as a missing value downstream, which may not be what you want from a "create" node.
    • Single-line only. Multi-line text needs CDA Text Create, and this node expects one clean numeric literal per run.
    CategoryData Analysis

    Inputs (1)

    NameTypeDefaultDescription
    dataSTRING

    Outputs (1)

    NameTypeDescription
    FLOATFLOAT