ComfyUI Node
SonarNormalizeNoiseToScale
Custom noise type that allows precisely controling noise normalization. The default range of -4.5 to 4.5 is roughly what you'd get from 10,000 items of Gaussian noise.
SonarNormalizeNoiseToScale
- custom_noise
- sonar_custom_noise_opt
- SONAR_CUSTOM_NOISE
◄factor1.000►
◄rescale0.000►
◄min_negative_value-4.500►
◄max_negative_value0.000►
◄min_positive_value0.000►
◄max_positive_value4.500►
◄modesimple►
◄dims-3, -2, -1►
◄std_dims-3, -2, -1►
◄std_multiplier1.000►
◄mean_dims-3, -2, -1►
◄mean_multiplier1.000►
◄normalize_noisefalse►
◄normalizedisabled►
Categoryadvanced/noise
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| factor | FLOAT | 1.000-10000–10000 | Scaling factor for the generated noise of this type. |
| rescale | FLOAT | 0.0000–10000 | When 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. |
| custom_noise | SONAR_CUSTOM_NOISE,OCS_NOISE | Allows connecting a custom noise chain. The following input types are supported: SONAR_CUSTOM_NOISE, OCS_NOISE | |
| min_negative_value | FLOAT | -4.500-10000–10000 | In simple mode, this is just the lowest value in the range (and can be positive, despite the name). In advanced mode, this controls the minimum negative value. If you set it to 0 or higher then normalization will leave negative values alone. |
| max_negative_value | FLOAT | 0.000-10000–10000 | Not used in simple mode. In advanced mode, this controls the maximum negative value. If you set it to 0 or higher, a maximum negative value will be automatically determined from negative value closest (but not equal to) zero. |
| min_positive_value | FLOAT | 0.000-10000–10000 | Not used in simple mode. In advanced mode, this controls the minmum positive value. If you set it to 0 or lower, a minimum positive value will be automatically determined from positive value closest (but not equal to) zero. |
| max_positive_value | FLOAT | 4.500-10000–10000 | In simple mode, this is just the highest value in the range (and can be negative, despite the name). In advanced mode, this controls the maximum positive value. If you set it to 0 or lower then normalization will leave positive values alone. |
| mode | COMBO | simple | There are several modes: simple: The noise will be rebalanced to be in between min_negative_value and max_positive_value. Though it sounds weird, you don't need to respect the positive/negative in the names. It is just treated as a simple range. advanced: Positive and negative values in the noise are separately rebalanced to be between the specified ranges. If you set max_negative_value to something positive or min_positive_value to something negative this will automatically determine whatever the closest value to zero is for each sign. Additionally, if you set max_positive_value to something negative or min_negative_value to something positive then values for that sign will be left alone. |
| dims | STRING | -3, -2, -1 | A comma separated list of dimensions which can be negative to count from the end. This behaves differently in advanced mode: If left blank, normalization will be global. If set to anything, normalization will be over each batch item separately. The actual values of the dimensions are ignored in advanced mode currently. |
| std_dims | STRING | -3, -2, -1 | A comma separated list of dimensions which can be negative to count from the end. |
| std_multiplier | FLOAT | 1.000-10000–10000 | Multiplier on the distance of the std from 1.0. The noise will be divided by this. You can set it to 1.0 to skip the division. When enabled, the division occurs before the final normalize and scaling and after the min/max value parameters are applied. |
| mean_dims | STRING | -3, -2, -1 | A comma separated list of dimensions which can be negative to count from the end. |
| mean_multiplier | FLOAT | 1.000-10000–10000 | Multiplier on the mean of the noise. The mean will be subtracted from the noise if it's not 0. This occurs before the final normalize and scaling and after the min/max value parameters are applied. |
| normalize_noise | BOOLEAN | false | Controls whether the noise source is normalized immediately after generation. |
| normalize | COMBO | disabled | Controls whether the generated noise is normalized to 1.0 strength. Enabling this does the same thing as the default mean/std settings. |
| sonar_custom_noise_optopt | SONAR_CUSTOM_NOISE,OCS_NOISE | Optional input for more custom noise items. The following input types are supported: SONAR_CUSTOM_NOISE, OCS_NOISE |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| SONAR_CUSTOM_NOISE | SONAR_CUSTOM_NOISE | A custom noise chain. |