Nodes/ComfyUI-NegiTools/Noise Image Generator πŸ§…
ComfyUI Node

Noise Image Generator πŸ§…

The pack's hidden gem for masking and conditioning experiments

By natto-makiΒ·Created 3 years agoΒ·Updated 2 years agoΒ· 31
Noise Image Generator πŸ§…
  • image_opt
  • mask_opt
  • IMAGE
β—„width512β–Ί
β—„height512β–Ί
β—„methodβ–Ύβ–Ί
β—„seed0β–Ί
β—„scale1.00β–Ί
β—„center0.50β–Ί
β—„perlin_freq_log24β–Ί
β—„perlin_octaves4β–Ί
β—„perlin_persistence0.50β–Ί

Easily the most fun node in the pack, and the one people sleep on. It generates procedural noise as an actual IMAGE - uniform, gaussian, or Perlin, in gray or color - and can layer it onto an existing image or restrict it to a mask. If you've ever wanted to understand how noise drives diffusion, or needed a synthetic image to test a ControlNet preprocessor, this is the toy and tool in one.

What it does

Pick a method from eight options: uniform_gray/uniform_color, gaussian_gray/gaussian_color, and perlin_gray/perlin_color with perlin_fractal_gray/perlin_fractal_color variants. The _gray flavors produce identical noise in all three RGB channels; _color gives each channel independent noise. Every output is scaled into the 0.0–1.0 range so it behaves like a normal image.

The knobs are straightforward:

  • scale and center define the value range - noise lands in roughly [center - scale/2, center + scale/2]. For Perlin, scale also effectively controls contrast.
  • seed makes it reproducible - same seed, same noise, every time.
  • perlin_freq_log2 sets the base frequency (higher = finer detail), and for the fractal methods perlin_octaves + perlin_persistence add and damp the high-frequency layers.

Two optional inputs are where it gets genuinely useful. image_opt is a target image the noise gets added to - if you leave it unconnected, it assumes a black image and you get pure noise. mask_opt restricts where the noise lands: everything outside the mask stays untouched. Feed in an image and a face mask and you've got a primitive but effective "add noise only to this region" node, which is a surprisingly handy building block for img2img-style experiments.

Why you'd reach for it

Beyond the obvious "I want a noise image," think testing. Want to see how a ControlNet depth or pose preprocessor handles synthetic input before you trust it with real photos? Generate a structured Perlin field and throw it at the preprocessor. Want to verify a mask's shape? Blast uniform noise through it and look at where it shows. The perlin_fractal output even makes decent procedural texture, which is a nice bonus. The implementation is a clean numpy Perlin implementation (from the well-known pvigier Perlin post), so the math is sound and it's fast.

Inputs and outputs

  • Required: width, height (ignored if image_opt is connected - the image's own size wins), method, seed, scale, center, plus the three Perlin controls.
  • Optional: image_opt, mask_opt.
  • Output: a single IMAGE.

Installing it

It's part of ComfyUI-NegiTools - ComfyUI Manager, search "ComfyUI-NegiTools", or:

cd ComfyUI/custom_nodes
git clone https://github.com/natto-maki/ComfyUI-NegiTools
pip install -r ComfyUI-NegiTools/requirements.txt

then restart. No API key, no downloads. This is one of the nodes that works with zero extra setup beyond the install.

The one gotcha

If you connect both image_opt and mask_opt, their sizes must match (the node raises a ValueError if the mask isn't the same size as the image). And remember the noise is added to image_opt, not overlaid with alpha - so the result is brighter and noisier, not a mix. If that's not what you want, run it without an image and composite the result yourself.

CategoryGenerator

Inputs (11)

NameTypeDefaultDescription
widthINT5120–4096β€”
heightINT5120–4096β€”
methodCOMBO8 options: uniform_gray, uniform_color, gaussian_gray, gaussian_color, perlin_gray, perlin_color, +2
seedINT00–18446744073709550000β€”
scaleFLOAT1.000–1β€”
centerFLOAT0.500–1β€”
perlin_freq_log2INT41–11β€”
perlin_octavesINT41–11β€”
perlin_persistenceFLOAT0.500–1β€”
image_optoptIMAGEβ€”
mask_optoptMASKβ€”

Outputs (1)

NameTypeDescription
IMAGEIMAGEβ€”