Nodes/ComfyUI-list-filter/Random Normal Distribution
ComfyUI Node

Random Normal Distribution

A list of jittered values, one per item in your batch

By Kesin11·Created 2 years ago·Updated about a year ago· 1
Random Normal Distribution
    • random_samples
    • first_sample
    mean0.00
    std_dev1.00
    num_samples10
    min_value5.00
    max_value8.00

    Random Normal Distribution is the odd one out in ComfyUI-list-filter. It's filed under the Random category, it doesn't touch strings, images, or indices, and it's the only node in the pack that has nothing to do with filtering. What it does: generate a list of random floats drawn from a normal (bell-curve) distribution, which is a surprisingly handy thing to have mid-graph.

    The use case is batch processing where you want each item in the batch to get a slightly different value around a target, instead of one fixed number for everything. Feed the output list into anything that accepts a list of floats - per-image CFG scale, denoise strength, prompt weights - and each image gets its own value, clustered around the mean you chose. Same seed, same workflow, but the batch stops being monotonous. It's the kind of node you discover, use once for a "vary the denoise per frame" idea, and then remember whenever you need jitter anywhere in the graph.

    How it works

    For each of num_samples iterations it draws random.gauss(mean, std_dev), clamps the result to [min_value, max_value], and rounds it to one decimal place. Clamping means no sample ever escapes your chosen range - useful when you're feeding a value that would crash or look wrong outside bounds, like a denoise of 1.3.

    Two outputs: random_samples, the full LIST of floats (one per sample), and first_sample, a plain FLOAT equal to the first entry - convenient if you only want one value and don't want to unpack a list.

    The inputs that matter

    • mean - the center of the distribution (default 0).
    • std_dev - how much values spread out around the mean (default 1).
    • num_samples - how many values to generate (default 10).
    • min_value / max_value - the clamp range (defaults 5 and 8).

    The trap in the defaults

    Look at those defaults again: mean 0, std_dev 1, min 5, max 8. A normal distribution centered on 0 with spread 1 essentially never produces values near 5, let alone 8 - so every single sample clamps to 5.0. Run it as-is and you get a list of ten identical 5.0s. That's not a bug; it's just defaults that only make sense together if you change the mean. Want values hovering around 7? Set mean 7, std_dev 0.5, keep the clamp wide. The moment you accept the defaults, you've got a very elaborate way to print the number 5.

    Also worth knowing: num_samples = 0 will crash the node, because it returns random_samples[0] and there is no element 0. Give it at least one sample.

    Installing it

    Same drill as the rest of the pack - this is one of six nodes shipped together in ComfyUI-list-filter:

    • ComfyUI Manager - search ComfyUI-list-filter, install, restart.
    • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/Kesin11/ComfyUI-list-filter, then restart ComfyUI.

    No requirements.txt, no models, no pip installs - the pack is stdlib-only, and this node's only dependency is Python's random module.

    It's not the node you'd show off, but for anyone doing per-image parameter variation it beats hand-typing ten different numbers, and it's a nice reminder that the smallest packs sometimes hide the least obvious utilities.

    CategoryRandom

    Inputs (5)

    NameTypeDefaultDescription
    meanFLOAT0.00The mean of the normal distribution.
    std_devFLOAT1.00The standard deviation of the normal distribution.
    num_samplesINT10The number of random samples to generate.
    min_valueFLOAT5.00The minimum value of the generated samples.
    max_valueFLOAT8.00The maximum value of the generated samples.

    Outputs (2)

    NameTypeDescription
    random_samplesLISTThe list of generated random samples.
    first_sampleFLOATThe first generated random sample.