Nodes/ComfyUI-JNodes/Float Literal
ComfyUI Node

Float Literal

A single float value you can wire anywhere

By JaredTherriault·Created 3 years ago·Updated about a month ago· 91
Float Literal
    • FLOAT
    float1.0

    Sometimes you just need a number. Float Literal is a one-widget node that outputs a single floating-point value - a CFG scale, a denoise strength, a LoRA weight, a multiplier - as a proper FLOAT you can wire into any float input. That's the entire job. It's the decimal cousin of an integer or string literal node, and it exists so you can define a value once and feed it to several places instead of typing the same 0.75 into three different widgets and forgetting to update one of them.

    The real payoff is single source of truth. When the same strength value needs to reach two or three nodes, a literal node is where you set it, and everything downstream tracks it. Change 0.5 to 0.55 in one place, and the whole graph moves together. On a big workflow, that's the difference between a clean adjustment and a bug hunt for the one widget you missed.

    How it works

    There's no computation - you type a number into the widget and it emits that number on the output pin. It's a constant. The value is organizational, not functional: a named, reusable anchor for a float you'd otherwise scatter across the graph.

    The inputs and outputs that matter

    • float - the value itself. Default 1.0, adjustable in steps of 0.01, with an effectively unbounded range so it'll hold anything from a tiny denoise to a large multiplier.

    The output is a single FLOAT - connect it to any float input: KSampler denoise, CFG, a LoRA loader's strength, a math node, wherever.

    How to install it

    ComfyUI Manager, search JNodes, install, restart. Or:

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

    No models.

    Common issues & troubleshooting

    Downstream node wanted an integer. This outputs a float. Feeding it into an INT-only input (a seed, a step count) either won't connect or will complain. Use an integer literal or a conversion/math node for whole-number inputs.

    Tiny rounding weirdness. Floats are floats - a value can display as 0.30000001 after math downstream. That's normal floating-point behavior, not this node misbehaving. If exactness matters, keep the precision you need and don't sweat the last digit.

    Do I need it over the built-in primitive? ComfyUI's Primitive node can also emit a float. Reach for Float Literal when you want a small, obvious, always-a-float node you can drop and forget, especially to serve one value to multiple inputs. If it's a one-off going to a single node, just set the widget on that node directly.

    Categorysd

    Inputs (1)

    NameTypeDefaultDescription
    floatFLOAT1.0-3.402823466e+38–3.402823466e+38

    Outputs (1)

    NameTypeDescription
    FLOATFLOAT