Nodes/ComfyUI-sonar/SonarWaveletNoise
ComfyUI Node

SonarWaveletNoise

Custom noise type that allows generating wavelet noise. Very simple explanation of how a single octave works: 1) Generate some noise. 2) Scale it down 50%. 3) Scale it back up to the original size. 4) Subtract the scaled noise from the original noise. Scaling the noise down and then back up blurs it, so this is essentially sharpening the noise.

By blepping·Created 3 years ago·Updated 4 days ago· 49
SonarWaveletNoise
  • sonar_custom_noise_opt
  • custom_noise
  • SONAR_CUSTOM_NOISE
factor1.000
rescale0.000
octaves4
octave_height_factor0.500
octave_width_factor0.500
octave_scale_modeadaptive_avg_pool2d
octave_rescale_modebilinear
post_octave_rescale_modebilinear
initial_amplitude1.000
persistence0.500
height_factor2.000
width_factor2.000
update_blend1.000
update_blend_modelerp
normalize_noisefalse
normalizedefault
Categoryadvanced/noise

Inputs (18)

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.
octavesINT4-100–100Number of octaves to generate. You can use a negative number here to run the octaves in reverse order though it may produce weird results/not work very well.
octave_height_factorFLOAT0.5000.001–10000Wavelet noise works by scaling noise by this factor in each octave, then scaling it back up to the original size. After that, the scaled noise is subtracted from the original noise.
octave_width_factorFLOAT0.5000.001–10000Wavelet noise works by scaling noise by this factor in each octave, then scaling it back up to the original size. After that, the scaled noise is subtracted from the original noise.
octave_scale_modeCOMBOadaptive_avg_pool2dScaling mode used within each octave to produce the scaled noise. By default this will be scaling down that octave's noise.
octave_rescale_modeCOMBObilinearScaling mode used within each octave to scale the noise back up to that octave's original size.
post_octave_rescale_modeCOMBObilinearScaling mode used to scale the output of an octave back up to the actual latent size.
initial_amplitudeFLOAT1.000-10000–10000Basically the strength an octave gets added to the total. This will be scaled by persistance after each octave.
persistenceFLOAT0.500-10000–10000Multiplier applied to amplitude after each octave. 0.5 means the first octave uses initial_amplitude, the second uses half of that and so on.
height_factorFLOAT2.0000.001–10000Scaling factor for height, calculated after each octave. 2.0 means divide by two. Note: It's possible to use values below 1 here but be careful as it's very easy to reach absurd latent sizes with only a few octaves.
width_factorFLOAT2.0000.001–10000Scaling factor for width, calculated after each octave. 2.0 means divide by two. Note: It's possible to use values below 1 here but be careful as it's very easy to reach absurd latent sizes with only a few octaves.
update_blendFLOAT1.000-10000–10000Controls how original_noise - scaled_noise is blended with original_noise. The default is to use 100% original_noise - scaled_noise.
update_blend_modeCOMBOlerpControls how the enhanced noise from each octave is blended with that octave's raw noise. With normal wavelet noise there's no blending and you use 100% enhanced noise.
normalize_noiseBOOLEANfalseControls whether the noise source is normalized before wavelet filtering occurs.
normalizeCOMBOdefaultControls whether noise is normalized to 1.0 strength.
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_noiseoptSONAR_CUSTOM_NOISE,OCS_NOISEOptional: Custom noise input. If unconnected will default to Gaussian noise. Note: When connected, the noise for all octaves will be generated at the maximum scale and then cropped which may be slow. The following input types are supported: SONAR_CUSTOM_NOISE, OCS_NOISE

Outputs (1)

NameTypeDescription
SONAR_CUSTOM_NOISESONAR_CUSTOM_NOISEA custom noise chain.