Nodes/ComfyUI-sonar/SonarBlendedNoise
ComfyUI Node

SonarBlendedNoise

Blend two noise types until the image looks right

By blepping·Created 3 years ago·Updated 13 days ago· 49
SonarBlendedNoise
  • sonar_custom_noise_opt
  • custom_noise_1
  • custom_noise_2
  • custom_noise_mask
  • SONAR_CUSTOM_NOISE
factor1.000
rescale0.000
noise_2_percent0.500
blend_modelerp
normalizedefault

Most sonar noise nodes are one-trick ponies: this flavor, that distribution. SonarBlendedNoise is the glue that turns them into a palette. It takes two custom noise items, mixes them at a ratio you control, and hands back a single SONAR_CUSTOM_NOISE chain. Pure gaussian is boring and pure voronoi is chaos; a 75/25 mix of gaussian and pyramid is often exactly what a generation wants. This is the node you reach for when no single noise type is doing the job.

The controls are blessedly few:

  • custom_noise_1 / custom_noise_2 - the two noise items to blend, each accepting a SONAR_CUSTOM_NOISE chain.
  • noise_2_percent - the blend ratio, 0.5 default. This is the knob you'll actually be turning. Two useful behaviors to know: at exactly 0 the second input is optional and isn't even called, and at exactly 1 the first isn't - so going from 0.000000001 to 0 is a real, structural difference, not a rounding artifact.
  • blend_mode - lerp (default), plus inject and subtract_b. If ComfyUI-bleh is installed you get its whole blend-mode library here too, which is where this gets interesting.
  • custom_noise_mask - the advanced path. Connect a third noise item and it becomes a spatial mask: its output is normalized to 0–1 and drives the blend ratio per-pixel instead of the global noise_2_percent. The mask is then clamped to 0–1, and noise_2_percent adds to it first - so you can force the effective range to 0.5–1.0 by setting it to 0.5, or 0–0.5 by setting it to -0.5. Note that once a mask is connected, both noise inputs become mandatory.
  • normalize - default / forced / disabled output normalization. The tooltip suggests forced for weird blend modes that stretch the range.
  • factor / rescale - the pack-wide strength pair.

Output is SONAR_CUSTOM_NOISE, chainable onward, and consumed wherever custom noise is accepted. Install is the standard one-liner:

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

The practical pattern: build two chains you like, blend at 50/50, then sweep noise_2_percent across a few seeds. Because custom noise only shows up on samplers that inject noise, run this through Euler a, DPM++ SDE, or a sonar momentum sampler. And the usual pack caveats apply - noise placement between GPU and CPU is inconsistent, so seeds aren't perfectly portable across hardware, and the pack's inputs shift between versions. None of that stops it from being the node that makes the whole "noise toybox" concept cohere: every other noise node is an ingredient, and this is the mixing bowl.

Categoryadvanced/noise

Inputs (9)

NameTypeDefaultDescription
factorFLOAT1.000-10000–10000Scaling factor for the generated noise of this type.
rescaleFLOAT0.0000–10000When non-zero, this custom noise item and other custom noise items items connected to it will have their factor scaled to add up to the specified rescale value. When set to 0, rescaling is disabled.
noise_2_percentFLOAT0.500-10000–10000Blend strength for custom_noise_2. Note that if set to 0 then custom_noise_2 is optional (and will not be called to generate noise) and if set to 1 then custom_noise_1 will not be called to generate noise. This only applies when custom_noise_mask is not connected. This is worth mentioning since going from a strength of 0.000000001 to 0 could make a big difference. Important: When custom_noise_mask is connected, this value will be added to the mask and then the mask will be clamped to 0 through 1. In other words, you could use this to ensure the mask ranges between 0.5 and 1.0 by setting it to 0.5 or ensure it ranges between 0 and 0.5 by setting it to -0.5.
blend_modeCOMBOlerpMode used for blending the two noise types. More modes will be available if ComfyUI-bleh is installed.
normalizeCOMBOdefaultControls whether the generated noise is normalized to 1.0 strength. For weird blend modes, you may want to set this to forced.
sonar_custom_noise_optoptSONAR_CUSTOM_NOISE,OCS_NOISEOptional input for more custom noise items. The following input types are supported: SONAR_CUSTOM_NOISE, OCS_NOISE
custom_noise_1optSONAR_CUSTOM_NOISE,OCS_NOISECustom noise. Optional if noise_2_percent is 1 and custom_noise_mask is not connected.. The following input types are supported: SONAR_CUSTOM_NOISE, OCS_NOISE
custom_noise_2optSONAR_CUSTOM_NOISE,OCS_NOISECustom noise. Optional if noise_2_percent is 0 and custom_noise_mask is not connected.. The following input types are supported: SONAR_CUSTOM_NOISE, OCS_NOISE
custom_noise_maskoptSONAR_CUSTOM_NOISE,OCS_NOISECustom noise. If connected, this will be used instead of noise_2_percent to determine the blend ratio. Noise generated by this will be normalized to a 0 through 1 scale. When connected, both custom noise inputs are mandatory. The following input types are supported: SONAR_CUSTOM_NOISE, OCS_NOISE

Outputs (1)

NameTypeDescription
SONAR_CUSTOM_NOISESONAR_CUSTOM_NOISEA custom noise chain.