Nodes/ComfyUI-sonar/SonarShuffledNoise
ComfyUI Node

SonarShuffledNoise

Scramble the pixels of your noise

By blepping·Created 3 years ago·Updated 14 days ago· 49
SonarShuffledNoise
  • custom_noise
  • SONAR_CUSTOM_NOISE
factor1.000
dims1,-2,-1
percentages1.0,0.25,0.25
fork_rngtrue
no_identitytrue

Here's a cheap trick that produces surprisingly useful results: take your noise and shuffle chunks of it around. SonarShuffledNoise does exactly that - it randomly permutes elements of the noise along whichever dimensions you choose. Instead of generating new randomness, you're re-arranging existing randomness, which keeps the overall character of the source noise while destroying any structure it had. It's the node you reach for when your noise is too patterned or too tidy and you want it scrambled without changing its texture.

The mechanism is straightforward: pick dimensions, pick what fraction of elements along each dimension get shuffled, done. The default dims of 1,-2,-1 (channel, then the last two spatial dims) and percentages of 1.0,0.25,0.25 tell the story - shuffle 100% of channels, then 25% along each spatial dimension.

What you set

  • custom_noise - the noise to shuffle.
  • dims - comma-separated dimension indices to shuffle along. Negative counts from the end, so -1 is the last dimension. Image latents run batch, channel, row, column.
  • percentages - comma-separated fractions (0.0 to 1.0) of elements to shuffle per dimension. If the list is shorter than the dims list it wraps, so "1.0,0.25,0.25" with three dims uses 1.0, 0.25, 0.25 - and a fourth dim would reuse 1.0.
  • fork_rng (default true) - forks the RNG state to generate the shuffle values, so the shuffling doesn't disturb the main noise generation's random stream.
  • no_identity (default true) - guarantees a shuffled element never lands in its original spot. Turn it off if you want true random permutation including "stay put."
  • factor - overall strength. (No normalize on this one, unusually.)

Output is a SONAR_CUSTOM_NOISE for a Sonar sampler, SamplerConfigOverride, or NoisyLatentLike.

What it's good for

Two solid uses. First, as a de-patterner: if a noise type (or a resized/rippled noise) is imposing too regular a structure on your generations, shuffling along the spatial dims keeps its texture but kills the geometry. Second, as a variety generator - the same source noise, shuffled, gives you a family of related-but-different starting points across a batch.

One thing to know: the node was reworked in mid-2025, and the changelog is blunt that the new version "will break workflows" built on the old one. So if you loaded a saved workflow using SonarShuffledNoise and it errors or behaves differently, an old-pack version mismatch is the likely culprit - update the pack or find the old workflow's intended inputs.

Installing

Part of ComfyUI-sonar. Install via ComfyUI Manager (search "ComfyUI-sonar") or git clone https://github.com/blepping/ComfyUI-sonar into custom_nodes/, restart. Pure Python, no extra packages, no model files.

Categoryadvanced/noise

Inputs (6)

NameTypeDefaultDescription
factorFLOAT1.000-10000–10000Scaling factor for the generated noise of this type.
custom_noiseSONAR_CUSTOM_NOISE,OCS_NOISECustom noise type to filter. The following input types are supported: SONAR_CUSTOM_NOISE, OCS_NOISE
dimsSTRING1,-2,-1Comma separated list of dimensions to shuffle. May be negative to count from the end.
percentagesSTRING1.0,0.25,0.25Comma separated list of percentages (0.0 to 1.0 for 100%) of elements to shuffle. Paired with the list of dimensions and wrap if it's shorter. For example, if you specified three dimensions and two percentages, the third dimension in the list would use the first percentage again.
fork_rngBOOLEANtrueWhen enabled, the RNG state will be forked to generate the shuffle values.
no_identityBOOLEANtrueWhen enabled, ensures shuffle never ends up selecting the original element.

Outputs (1)

NameTypeDescription
SONAR_CUSTOM_NOISESONAR_CUSTOM_NOISEA custom noise chain.