Affine Pattern Noise
Stop starting every image from the same random static
- options
- noise_options
- NOISE
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:
- Generates the base noise the standard way (respecting your seed and batch indices),
- Generates your chosen pattern mask at latent size,
- If
normalizeis on (default), centers and scales the pattern to zero-mean unit-std before amplitude scaling, - Scales it by
affine_scaleand adds it to the base noise as a bias term, - 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.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| pattern | COMBO | white_noise | Pattern used to synthesize structured noise (excludes solid and content-derived patterns). |
| seed | INT | 00–2147483647 | Seed for reproducible noise generation. |
| affine_scale | FLOAT | 0.9500–10 | Pattern amplitude multiplier applied to the base ComfyUI noise. Controls how much the pattern affects the final noise. |
| normalize | BOOLEAN | true | If enabled, center and scale the generated pattern to zero-mean unit-std before amplitude scaling. |
| affine_bias | FLOAT | 0.000-2–2 | Additive bias applied where the pattern mask is active. Positive values brighten, negative values darken. |
| optionsopt | DICT | Base options DICT for pattern parameters (same keys as Affine patterns). | |
| noise_optionsopt | DICT | Pattern-specific overrides layered onto 'options'. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| NOISE | NOISE | — |