Nodes/ComfyUI-sonar/SonarGuidedNoise
ComfyUI Node

SonarGuidedNoise

Noise that wants to look like your reference image

By blepping·Created 3 years ago·Updated 13 days ago· 49
SonarGuidedNoise
  • latent
  • sonar_custom_noise
  • SONAR_CUSTOM_NOISE
factor1.000
methodeuler
guidance_factor0.013
normalize_noisedefault
normalize_resultdefault
normalize_reftrue

SonarGuidedNoise is a custom noise type that mixes a reference latent into your noise stream, so the starting noise itself carries a hint of the reference's structure. Where SonarGuidanceConfig steers the sampler, this node steers the noise - you get composition baked into the starting point, before the sampler ever runs.

What it's for

Think of it as structural guidance at the cheapest possible level. You encode a reference image, feed its latent in here, and the generated noise gets nudged toward that latent's shape - early detail, layout, rough structure - instead of being pure randomness. It slots into the same SONAR_CUSTOM_NOISE chain as everything else in the pack, so you can guide one stage of a noise build and leave the rest free.

How it works

  • latent - the reference. This is the structure you're guiding toward.
  • method - euler (default) does an Euler step toward the guidance; linear simply lerps the guidance at the given strength. Euler is gentler, linear is more direct.
  • guidance_factor - strength, default 0.0125. The tooltip's advice is on point: keep it low so it nudges rather than overpowers. Crank it and the noise becomes the reference image's noise, which is rarely what you want.
  • sonar_custom_noise - optional. The noise to combine with the guidance. The tooltip has the honest detail: if you don't attach anything here, your reference gets combined with zeros, so attach a SonarCustomNoise (Gaussian or whatever flavor you like) unless you specifically want pure-reference noise.

Normalization switches follow the pack's standard trio - normalize_ref (default true, normalizes the reference to 1.0), normalize_noise, and normalize_result - plus the usual factor scaling. Output is SONAR_CUSTOM_NOISE, so the guided result can feed another noise node or a Sonar sampler directly.

The recipe that makes sense

The pattern that works: reference latent → this node → with a Gaussian SonarCustomNoise plugged into sonar_custom_noise, guidance_factor in the 0.005–0.02 range, then wire the output to a Sonar sampler or a NoisyLatentLike. The reference becomes a ghost in the noise - visible in early composition, mostly gone by the end. That's the sweet spot. Push guidance_factor toward 0.1+ and the reference starts fighting the prompt.

Gotchas

The reference latent and the sampled latent need to be the same size - same rule as the sampler guidance, same failure mode if you ignore it. And because this is noise-generation territory, remember the pack's reproducibility quirk: whether noise generates on CPU or GPU can vary, so seeds can differ between GPU models. If you're chasing a specific result, pin override_device in SonarCustomNoiseParameters or accept some variance.

Install

ComfyUI Manager → search "ComfyUI-sonar" → Install → restart, or:

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

No model files, no extra deps. The author's disclaimer applies here more than most nodes: he's upfront that guidance-style features in this pack are experimental and "probably" imperfect - so treat results as interesting, not as a dependable steering mechanism.

Categoryadvanced/noise

Inputs (8)

NameTypeDefaultDescription
factorFLOAT1.000-10000–10000Scaling factor for the generated noise of this type.
latentLATENTLatent to use for guidance.
methodCOMBOeulerMethod to use when calculating guidance. When set to linear, will simply LERP the guidance at the specified strength. When set to Euler, will do a Euler step toward the guidance instead.
guidance_factorFLOAT0.013-100–100Strength of the guidance to apply. Generally should be a relatively slow value to avoid overpowering the generation.
normalize_noiseCOMBOdefaultControls whether the generated noise is normalized to 1.0 strength.
normalize_resultCOMBOdefaultControls whether the final result is normalized to 1.0 strength.
normalize_refBOOLEANtrueControls whether the reference latent (when present) is normalized to 1.0 strength.
sonar_custom_noiseoptSONAR_CUSTOM_NOISE,OCS_NOISEOptional custom noise input to combine with the guidance. If you don't attach something here your reference will be combined with zeros. The following input types are supported: SONAR_CUSTOM_NOISE, OCS_NOISE

Outputs (1)

NameTypeDescription
SONAR_CUSTOM_NOISESONAR_CUSTOM_NOISEA custom noise chain.