Nodes/Akatz Custom Nodes/List To Numpy Float Array | Akatz
ComfyUI Node

List To Numpy Float Array | Akatz

Turn a ComfyUI float list into a NumPy array

By akatz-ai·Created 2 years ago·Updated 9 months ago· 32
List To Numpy Float Array | Akatz
    • float_array
    float_list

    This is the smallest node in the pack and it does exactly one thing: take a list of floats and run np.array(float_list, dtype=np.float64) on it. That's the whole trick. No API call, no key, no model - it's a type-bridge between the way ComfyUI likes to hand floats around and the way NumPy-based math wants them.

    Why you'd reach for it

    ComfyUI's default float type is a scalar - one number per wire. But the 💜Akatz pack (and a few others) smuggle lists of floats through FLOAT-typed sockets: keyframe schedules, audio amplitudes, brightness curves. If you've ever seen a node complain that it got a numpy.ndarray or a Python list where it expected a plain float, you've hit exactly the mismatch this node exists to fix.

    You'll want it when a downstream node - a custom math block, a mask schedule generator, a numpy-driven utility - wants a proper NumPy float array and you're holding a float list. It's also the flip side of the pack's AK_ConvertListToFloatList, which goes the other direction.

    How it works

    There's no rounding, no normalization, no range check. The input list gets cast to a 64-bit float array and handed back. If the input is already a NumPy array it'll still pass through the dtype conversion, which is handy if you want to force everything to float64 for consistent precision before doing arithmetic.

    Inputs and outputs

    • float_list (FLOAT) - the list of floats to convert. Expects a list, not a single number.
    • float_array (FLOAT output) - despite the type label, this is a NumPy array. That's the pack's list convention leaking through, and it's the main thing to know before you wire it anywhere.

    Installing the pack

    It ships in Akatz Custom Nodes (akatz-ai/ComfyUI-AKatz-Nodes). In ComfyUI Manager, search "Akatz" and install, or clone it manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/akatz-ai/ComfyUI-AKatz-Nodes
    

    Restart ComfyUI (or hit Refresh in Manager) and everything shows up under 💜Akatz Nodes. The pack's requirements.txt lists numpy, torch, opencv-python, and pydub - numpy and torch already ship with ComfyUI, so this node pulls nothing extra. No models to download. The README is mostly a gateway to the author's Notion docs and a custom GPT, so don't expect per-node docs in the repo.

    Gotchas

    • The output is labeled FLOAT but carries a NumPy array. If you plug it into something expecting a scalar float, you'll get a cryptic error. Feed it through AK_ConvertListToFloatList if you need a plain Python list back.
    • Wire a real scalar into float_list and ComfyUI will usually wrap it into a one-element list - technically it runs, but you get a length-1 array, which is almost never what you meant.
    • If you load a workflow that uses this node and ComfyUI reports it as missing, it means the pack isn't installed. That's the whole diagnosis.
    Category💜Akatz Nodes/Utils

    Inputs (1)

    NameTypeDefaultDescription
    float_listFLOAT

    Outputs (1)

    NameTypeDescription
    float_arrayFLOAT