Nodes/Endless ️🌊✨ Nodes/β™ΎοΈπŸŒŠβœ¨ Float to Number
ComfyUI Node

β™ΎοΈπŸŒŠβœ¨ Float to Number

ESS Float to Number β€” the one-line type cast that unblocks finicky sockets

By tusharbhuttΒ·Created 3 years agoΒ·Updated about a year agoΒ· 68
β™ΎοΈπŸŒŠβœ¨ Float to Number
    • NUMBER
    β—„FloatValue0.00β–Ί

    Some ComfyUI inputs only accept the NUMBER type, and your value is sitting in a FLOAT socket. That's the entire reason the β™ΎοΈπŸŒŠβœ¨ Float to Number node exists: it takes a float and hands you back the same number in the more permissive NUMBER type, which accepts both ints and floats downstream. It's a two-line compatibility shim, and it works.

    You'll reach for it in exactly one situation: a node that declares its input as NUMBER won't take your float wire, or vice versa, and you need the cast to make the graph connect. It's the same family of fix as the pack's other converters, just pointed the other direction - where Number to Float narrows, this widens.

    How it works

    One input, one output:

    • FloatValue - type FLOAT, the number you're carrying.
    • Output: NUMBER.

    The implementation is float() all the way through - the value enters as a float and exits as a float, just labeled with the more flexible type so ComfyUI's connection rules let it plug into NUMBER sockets. No rounding, no conversion loss, nothing clever. A float is a float.

    Because NUMBER is ComfyUI's superset type, this is almost always a safe no-op you can drop into a chain without thinking. The main reason you'd care is precisely that it is a no-op: you don't need this node to change anything, only to change the type tag. If ComfyUI's recent core versions already include a built-in float-to-number conversion, use that instead - this one comes with baggage.

    The baggage, honestly

    That baggage is two things. First, this is a legacy node: the ESS prefix puts it in the pre-June-2025 single-file version of Endless-Nodes, and the pack's rebuild dropped the converter classes entirely. A fresh git clone https://github.com/tusharbhutt/Endless-Nodes into custom_nodes won't give you this class; old workflows referencing it may flag it missing. Second, the pack author, tusharbhutt, is a self-described hobbyist ("I am not a programmer, nor do I care to be") who makes nodes for himself and makes no maintenance promises.

    None of that makes the node bad at its job - a type cast is a type cast. But if you're starting a new workflow today, the pack's Float to X node does float-to-number and float-to-int and float-to-string in one node, which is a better use of canvas space than three single-purpose converters.

    CategoryEndless 🌊✨/Converters/Float

    Inputs (1)

    NameTypeDefaultDescription
    FloatValueFLOAT0.00β€”

    Outputs (1)

    NameTypeDescription
    NUMBERNUMBERβ€”