Nodes/ComfyUI-sonar/SonarModulatedNoise
ComfyUI Node

SonarModulatedNoise

Scaling and warping one noise with another, reference included

By blepping·Created 3 years ago·Updated 9 days ago· 49
SonarModulatedNoise
  • sonar_custom_noise
  • ref_latent_opt
  • SONAR_CUSTOM_NOISE
factor1.000
modulation_type
dims3
strength2.000
normalize_resultdefault
normalize_noisedefault
normalize_reftrue

SonarModulatedNoise takes one custom noise generator and modulates it - intensity, frequency, or a frequency-domain trick - optionally using a reference latent as the modulator. If SonarGuidedNoise is "noise that wants to look like your reference," this is "noise that gets sculpted by one."

What modulation means here

You feed in a base noise (sonar_custom_noise), pick a modulation_type, and the node reshapes the noise accordingly. With intensity, the noise's magnitude gets scaled based on the modulator - bright reference areas push noise up, dark ones push it down. With frequency, the local frequency content changes instead, which reads as texture variation. spectral_signum is the exotic one, doing sign-based work in the frequency domain - honestly it's the "press this to see what happens" option. none is the "prove the chain works" option. Set strength (default 2) to control how hard the effect hits.

The optional ref_latent_opt is the interesting input: plug a latent in and it becomes the modulator, so the noise inherits structure from a real image. No reference attached, and the modulation still happens - over the base noise's own spatial structure rather than a reference's.

The inputs that matter

  • modulation_type - intensity, frequency, spectral_signum, or none.
  • dims - which dimensions get modulated: 1 = channels only, 2 = height/width, 3 = both. Default 3.
  • strength - how strong the effect is, default 2.
  • sonar_custom_noise - the noise being modulated.
  • ref_latent_opt - optional reference latent to modulate by.

Normalization follows the pack standard: normalize_ref (default true), normalize_noise, normalize_result, plus factor for overall scaling. Output is SONAR_CUSTOM_NOISE, ready to chain into SonarCompositeNoise, SonarPowerFilterNoise, or a sampler.

A sensible way to use it

A good first experiment: base SonarCustomNoise at Gaussian, intensity modulation, a reference latent that has strong light/dark structure (a portrait against plain background works great), strength around 1–3. The result is starting noise that already "knows" where the subject is - combine that with SonarGuidanceNoise-style steering and you can do real compositional work without a ControlNet. Just don't expect it to be subtle at high strength; this is a noise-level effect, so it shows up mostly in the early steps and the sampler smooths it progressively.

Install

Same pack, same drill: ComfyUI Manager → search "ComfyUI-sonar" → Install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/blepping/ComfyUI-sonar

No models, no pip deps. Pack caveats apply: inputs shift between versions, and noise seed behavior can differ between GPU models since generation isn't pinned to one device. If a modulation experiment doesn't reproduce, that's usually the GPU-vs-CPU noise thing, not your settings.

Categoryadvanced/noise

Inputs (9)

NameTypeDefaultDescription
factorFLOAT1.000-10000–10000Scaling factor for the generated noise of this type.
sonar_custom_noiseSONAR_CUSTOM_NOISE,OCS_NOISECustom noise type to modulate. The following input types are supported: SONAR_CUSTOM_NOISE, OCS_NOISE
modulation_typeCOMBOType of modulation to use.
dimsINT31–3Dimensions to modulate over. 1 - channels only, 2 - height and width, 3 - both
strengthFLOAT2.000-100–100Controls the strength of the modulation effect.
normalize_resultCOMBOdefaultControls whether the final result is normalized to 1.0 strength.
normalize_noiseCOMBOdefaultControls whether the generated noise is normalized to 1.0 strength.
normalize_refBOOLEANtrueControls whether the reference latent (when present) is normalized to 1.0 strength.
ref_latent_optoptLATENT

Outputs (1)

NameTypeDescription
SONAR_CUSTOM_NOISESONAR_CUSTOM_NOISEA custom noise chain.