Nodes/ComfyUI-QuasimondoNodes/Random Image Generator
ComfyUI Node

Random Image Generator

RGB, RGBA, or Mask, no sampler needed

By Quasimondo·Created 2 years ago·Updated about a year ago· 15
Random Image Generator
    • IMAGE
    • image_count
    • width
    • height
    mode
    image_count1
    width512
    height512
    channels
    random_seed0
    normalizetrue

    Sometimes you just need raw noise, right now, at a specific size and seed, without involving a diffusion model at all. Random Image Generator is the blunt instrument for that: pick Noise (uniform random) or Gaussian Noise, set a size, set a seed, get images. It's the simplest member of this pack's noise trio, and the one to reach for when you want pure stochastic static - as an img2img start frame, a debugging canvas, a seed for flow or displacement work, or a quick way to test "what does my pipeline do with a garbage image."

    What it does

    For Noise it fills the tensor with torch.rand - uniform 0–1 randomness. For Gaussian Noise it uses torch.randn - centered, normally distributed values. Then, unless you turn it off, it normalizes: each channel is stretched so its minimum hits 0 and its maximum hits 1. The seed makes it fully reproducible - same seed, same size, same exact noise.

    The channels choice is where it gets useful beyond "white noise image":

    • RGB - 3 channels.
    • RGBA - 4 channels (alpha is just more noise).
    • Mask - a single channel, output squeezed so it plugs directly into any MASK input.

    That last one is the sleeper feature: a seeded random mask on demand, for testing masking logic or generating random stencils.

    The inputs that matter

    • mode - Noise (uniform) or Gaussian Noise. Gaussian has a tighter, bell-shaped distribution; uniform is flat across the range. For a "grayscale static" look, Gaussian reads more natural.
    • image_count - batch size.
    • width / height - up to 8192.
    • channels - RGB, RGBA, or Mask.
    • random_seed - reproducibility.
    • normalize - on by default. Off gives you raw torch.rand/randn values, which for Gaussian means values that exceed the 0–1 range (clipped visually).

    Outputs are the IMAGE, plus image_count, width, and height as integers - a nice detail, since those values often need to be wired into other nodes (like latent-size or resize nodes) rather than typed.

    Install

    From the Quasimondo pack. ComfyUI Manager → search ComfyUI-QuasimondoNodes, or:

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

    Pure torch - no models, no downloads, instant at any resolution within reason.

    Where people get burned

    The main confusion is choosing between this and the pack's other two noise nodes. Perlin Noise Generator gives you smooth, structured noise for masks and displacement; Image Noise Generator scrambles an existing image, preserving its colors. This one is only ever pure random static - if you were hoping for terrain, you're in the wrong node.

    Second, normalize behaves per-channel: each channel gets stretched independently. If you're feeding the output somewhere that cares about cross-channel relationships (e.g., as a flow map), the per-channel normalization can skew what you expect - turn it off and control the range yourself if that matters. And Mask output is single-channel; don't expect to wire it into a node that wants an RGB image without converting.

    Categoryimage/generators

    Inputs (7)

    NameTypeDefaultDescription
    modeCOMBO2 options: Noise, Gaussian Noise
    image_countINT11–9007199254740991
    widthINT5121–8192
    heightINT5121–8192
    channelsCOMBO3 options: RGB, RGBA, Mask
    random_seedINT00–9007199254740991
    normalizeBOOLEANtrue

    Outputs (4)

    NameTypeDescription
    IMAGEIMAGE
    image_countINT
    widthINT
    heightINT