Nodes/Deforum Nodes/(deforum) Add Custom Noise
ComfyUI Node

(deforum) Add Custom Noise

Nineteen kinds of noise, one node, and when you'd ever want them

By XmYx·Created 3 years ago·Updated 3 months ago· 198
(deforum) Add Custom Noise
  • images
  • temperature_map
  • NOISED_IMAGE
  • NOISE
noise_type
amount0.10
seed
mean0.00
std0.10
prob0.05
scale0.10
temp_scale1.00
scale_factor1.00
location0.00
res_x10
res_y10
octaves5
persistence0.50
num_points100
direction1.00

Most of the "(deforum) Add Noise"-type nodes in the wild add one flavor of noise and call it a day. This one is a small toolbox instead: 19 different noise types, all computed in plain PyTorch on an IMAGE tensor, with the raw noise map handed back to you as a second output. If you've ever wanted film grain on a generated frame, or a speckle pattern, or a Perlin-driven wobble in your animation, this is the node.

What it's actually for

In a Deforum pipeline you'll most often reach for it in two places: dressing up frames before they're fed back into the sampler (a touch of grain or texture keeps flat areas from looking waxy), and generating noise maps you can composite yourself. Because the node returns the noise separately from the noised image, you can scale the noise, mask it, or layer it without touching the original.

How it works

Mechanically it's delightfully straightforward - the node clones your images, generates a noise tensor for the chosen type, and returns clamp(image + amount * noise, 0, 1) plus the noise tensor itself. Different types interpret amount differently: for gaussian it's the strength of the additive noise, for salt_pepper it's the fraction of pixels flipped, for poisson it's used as the intensity scale.

The menu: speckle, uniform, rayleigh, exponential, gamma, random_valued_impulse, laplace, perlin, brownian, quantization, shot, multiplicative, flicker, fractal, cellular, gaussian, thermal, salt_pepper, poisson. That's the whole 19. Most of the per-type parameters only matter for a subset - mean/std are gaussian and multiplicative, prob drives salt_pepper and impulse, res_x/res_y/octaves/persistence shape the Perlin/fractal noise, and num_points is for the cellular (Worley) type.

Inputs and outputs that matter

  • images - the batch to corrupt. Any IMAGE works; in an animation it's usually the current frame.
  • noise_type - the dropdown with the 19 flavors.
  • amount (FLOAT, 0–100, default 0.1) - the one dial you'll actually touch 95% of the time.
  • seed (optional INT) - set it if you want the same noise pattern back on the next run. Leave it unset and it draws a fresh random seed.

Outputs:

  • NOISED_IMAGE - your image with noise applied.
  • NOISE - the raw noise map. Wire this somewhere yourself if you want custom handling.

Two gotchas. First, thermal requires a temperature_map image - without it the node raises a ValueError rather than degrading gracefully. Second, some types (brownian, fractal, cellular) can be slow at large resolutions because they generate noise per channel per batch member; don't be surprised if a 1080p batch takes a few seconds.

Installing this pack

It ships in Deforum Nodes by XmYx - install once, the whole "(deforum)" family appears. ComfyUI Manager: search Deforum Nodes. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/XmYx/deforum-comfy-nodes

Restart, and be ready for the first-install dependency haul: install.py pulls the deforum-studio backend from GitHub, a stack of scientific Python packages, and pins numpy below 2.0. Python 3.10 is the stated requirement. If the pip step dies, the installer tells you to run the deforum-studio install manually in your venv - do that and re-run.

Common issues

  • ValueError: Temperature map must be provided - you picked thermal without a temperature_map. Feed one in or switch noise types.
  • Noise looks identical every frame. That's the seed being fixed. That's useful for a consistent grain pattern across a video; if you want per-frame variation, leave the seed unset.
  • Clamped whites or blacks. amount above ~0.5 on gaussian will push pixels to 0/1 fast. Start at 0.1, nudge up.
Categorydeforum/noise

Inputs (18)

NameTypeDefaultDescription
imagesIMAGE
noise_typeCOMBO19 options: speckle, uniform, rayleigh, exponential, gamma, random_valued_impulse, +13
amountFLOAT0.100–100
seedoptINT0–4294967295
temperature_mapoptIMAGE
meanoptFLOAT0.00-1–1
stdoptFLOAT0.100.01–1
proboptFLOAT0.050–1
scaleoptFLOAT0.100.01–10
temp_scaleoptFLOAT1.000.1–10
scale_factoroptFLOAT1.000.1–10
locationoptFLOAT0.00-10–10
res_xoptINT101–100
res_yoptINT101–100
octavesoptINT51–10
persistenceoptFLOAT0.500.01–1
num_pointsoptINT10010–1000
directionoptFLOAT1.000–1

Outputs (2)

NameTypeDescription
NOISED_IMAGEIMAGE
NOISEIMAGE