Nodes/WAS Affine/Affine Pattern Noise
ComfyUI Node

Affine Pattern Noise

Stop starting every image from the same random static

By WASasquatch·Created about a year ago·Updated 4 months ago· 5
Affine Pattern Noise
  • options
  • noise_options
  • NOISE
patternwhite_noise
seed0
affine_scale0.950
normalizetrue
affine_bias0.000

Most custom samplers start from plain Gaussian noise - ComfyUI's prepare_noise gives you the same random static every time. Affine Pattern Noise is the counter-idea: it takes that base noise and augments it with one of the pack's procedural patterns, so your starting noise is structured. Instead of seeding a blank canvas, you seed a canvas that already has a texture to it.

How it works

The node produces a NOISE object. When the sampler asks it for noise at the first step, it:

  1. Generates the base noise the standard way (respecting your seed and batch indices),
  2. Generates your chosen pattern mask at latent size,
  3. If normalize is on (default), centers and scales the pattern to zero-mean unit-std before amplitude scaling,
  4. Scales it by affine_scale and adds it to the base noise as a bias term,
  5. Clamps the result to [-3, 3].

So the pattern shapes the noise's statistics, not its overall brightness. Setting affine_scale to 0 (with affine_bias 0) returns plain base noise - an easy way to A/B the effect.

The pattern menu excludes the ones that make no sense as noise - solid, external_mask, and the content-derived masks (detail_region, edges_sobel, etc.) - because those need a latent to compute from, and there is none at the first step. You get the spectral family (white, pink, brown, blue, violet, green, black), procedural (perlin, cross_hatch, dot_screen, highpass_white, ring_noise), and geometric (checker, bayer).

Inputs and outputs

  • pattern - the noise texture (default white_noise).
  • seed - reproducibility of the pattern.
  • affine_scale (default 0.95) - how much the pattern dominates the base noise.
  • normalize (default True) - center/scale the pattern first.
  • affine_bias - extra additive offset where the pattern is active.
  • options / noise_options - the usual DICT pair for pattern tuning.

Output: one NOISE output, wired into the noise input of a Custom Sampler (it pairs especially well with Custom Sampler Affine Advanced, where you can augment the starting noise and apply affine during the run).

Why bother

Structured starting noise is an old trick for pulling detail out of early denoising steps - the pack's whole philosophy is that what happens early in sampling matters, and this applies it to step zero. Pink or green noise tends to read as natural detail; highpass_white pushes fine texture.

Installing

Part of WAS Affine by WASasquatch. ComfyUI Manager → Install Custom Nodes → search "WAS Affine" → install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was_affine

Restart ComfyUI. ComfyUI 1.0.0+, torch and numpy.

Common issues

The most common confusion is expecting to see the pattern directly in the image. You won't - it's the noise that's patterned, and what you'll notice is how detail lands during sampling, not a visible texture. Also, this node only does anything in a custom sampling stack: plug it into a plain KSampler and nothing happens, because KSampler generates its own noise internally. And keep affine_scale sensible; at 2+ the pattern swamps the base noise and you get a lopsided, biased start.

Categorysampling/custom_sampling/noise

Inputs (7)

NameTypeDefaultDescription
patternCOMBOwhite_noisePattern used to synthesize structured noise (excludes solid and content-derived patterns).
seedINT00–2147483647Seed for reproducible noise generation.
affine_scaleFLOAT0.9500–10Pattern amplitude multiplier applied to the base ComfyUI noise. Controls how much the pattern affects the final noise.
normalizeBOOLEANtrueIf enabled, center and scale the generated pattern to zero-mean unit-std before amplitude scaling.
affine_biasFLOAT0.000-2–2Additive bias applied where the pattern mask is active. Positive values brighten, negative values darken.
optionsoptDICTBase options DICT for pattern parameters (same keys as Affine patterns).
noise_optionsoptDICTPattern-specific overrides layered onto 'options'.

Outputs (1)

NameTypeDescription
NOISENOISE