Nodes/ComfyUI-LogicUtils/Random Gaussian Float
ComfyUI Node

Random Gaussian Float

A seeded number drawn from a normal distribution

By aria1th·Created 3 years ago·Updated 7 months ago· 119
Random Gaussian Float
    • FLOAT
    mean0.00
    std_dev1.00
    decimal_places2
    seed0

    Most "random number" nodes in ComfyUI give you a uniform draw - every value in the range equally likely. Random Gaussian Float doesn't: it samples from a normal (bell-curve) distribution, so values near mean come up far more often than values way out in the tails. If you want variation that clusters around a target instead of bouncing evenly across a whole range, this is the shape of randomness you actually want.

    Part of aria1th's ComfyUI-LogicUtils, a personal utility pack from the same handle behind the Illustrious XL training work. It's obscure - the README itself undersells the pack - but this node is a plain, correctly-labeled implementation of random.gauss().

    Why you'd reach for it

    Think of parameters you want to jitter rather than randomize outright - a CFG scale you want mostly near 7 but occasionally a bit higher or lower, a denoise strength that should usually sit around 0.5 with some natural spread, batch variation in a numeric input where you want "close to X, sometimes a little off" rather than "anywhere in this range." A uniform random node can't express that preference for the center; a Gaussian one can, via std_dev.

    How it works

    It's random.gauss(mean, std_dev), seeded, then rounded to decimal_places. Because it's seeded, the same seed with the same mean/std_dev/decimal_places reproduces the exact same output - useful when you find a jittered value that worked well and want to lock it in rather than leave it to chance on the next run.

    Inputs and outputs

    • mean (FLOAT, default 0) - the center of the distribution; most output values will land near here.
    • std_dev (FLOAT, default 1) - how spread out the values are. Larger means more variation away from mean; a std_dev of 0 effectively always returns mean.
    • decimal_places (INT, default 2) - how many digits after the decimal point to round the result to.
    • seed (INT, default 0) - controls the draw. Same seed → same output.
    • Output: FLOAT - the sampled, rounded value. The node is also marked as an output node, so it surfaces its result directly rather than just passing through silently.

    How to install it

    ComfyUI Manager: search "ComfyUI-LogicUtils", install, restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/aria1th/ComfyUI-LogicUtils
    

    then restart. No models, no GPU cost - a tiny CPU-side calculation.

    Common issues & troubleshooting

    "Missing node type" on a shared workflow. ComfyUI Manager's "Install Missing Custom Nodes" pulls in the whole pack from the graph JSON.

    Import error on startup. The README documents an opt-in auto-installer for the pack's dependencies: COMFYUI_LOGICUTILS_AUTO_INSTALL=1 before launch to install what's needed, or COMFYUI_LOGICUTILS_SKIP_INSTALL=1 to disable it if that hook is causing the issue. This node needs nothing beyond Python's standard random module.

    Values keep coming out way off from mean. That's std_dev set too high for what you expected - a Gaussian's tails are unbounded, so with a large enough std_dev, occasional far-from-center values are mathematically expected, not a glitch.

    Same value on every run despite expecting variety. Check seed - it's fixed by default (0), which means deterministic output. Randomize it, or drive it from an upstream node, if you want a fresh draw each run.

    CategoryLogic Gates

    Inputs (4)

    NameTypeDefaultDescription
    meanFLOAT0.00-999999999–999999999
    std_devFLOAT1.000–999999999
    decimal_placesINT20–10
    seedINT00–9223372036854776000

    Outputs (1)

    NameTypeDescription
    FLOATFLOAT