ComfyUI Node
SonarScatternetFilteredNoise
Custom noise type that allows filtering noise using a scatternet (basically wavelets). Requires the pytorch_wavelets package to be installed in your Python environment. Can be used to do stuff like take the higher frequency components of a very low-frequency noise type such as Pyramid. Currently only works with 4D latents.
SonarScatternetFilteredNoise
- sonar_custom_noise_opt
- custom_noise
- SONAR_CUSTOM_NOISE
◄factor1.000►
◄rescale0.000►
◄padding_modesymmetric►
◄use_symmetric_filterfalse►
◄magbias0.010►
◄output_offset0.000►
◄output_modechannels_adjusted►
◄scatternet_order1►
◄per_channel_scatternetfalse►
◄normalize_noisefalse►
◄normalizedefault►
Categoryadvanced/noise
Inputs (13)
| 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. |
| padding_mode | STRING | symmetric | This is just passed to the pytorch_wavelets scatternet constructor. Valid padding modes that I know of (second order only supports symmetric and zero): symmetric, reflect, zero, periodization, constant, replicate, periodic |
| use_symmetric_filter | BOOLEAN | false | Slower, but possibly higher quality. |
| magbias | FLOAT | 0.010-1000–1000 | Magnitude bias. Changing it doesn't seem to affect anything, but you can try. |
| output_offset | FLOAT | 0.000-100000–100000 | Controls where the output starts. The beginning is the low frequency bands, the end is high frequencies. If less than 1 (positive or negative) it will be treated as a percentage into the dimension. Negative values count from the end. |
| output_mode | COMBO | channels_adjusted | The normal scatternet reduces the spatial dimensions 2x, the second order one 4x. The adjusted modes will generate larger noise (in the spatial dimensions) to compensate, this is slower but gives you a lot more room to work with. The scaled modes will just scale the noise to compensate (likely doesn't work well). Modes that start with channels will index along the channel dimension, otherwise the indexing will be flat (after the batch dimension). Note: I recommend channels_adjusted mode, it's very possible the offset indexing math is wrong for other modes. |
| scatternet_order | INT | 1-3–3 | Each order increases the number of channels exponentially. You can use a primitive node to bypass the limit of 3 here if you're a crazy person, the code will handle any value but you're very likely to die of old age or run out of VRAM or both if you go above 3 (and even that is stretching it). You can set this to 0 to disable scatternet filtering quickly. Negative values are the same as positive ones here with one exception: there's a specialized 2nd order scatternet which will be used by default for order 2, however it may not support the normal parameters (like padding modes). Use -2 here if you just want to stack two normal scatternet layers instead. |
| per_channel_scatternet | BOOLEAN | false | Runs the scatternet on each channel separately. May be very slow. Models like SDXL use 4 channels, models like Flux have 16. Enabling this may help with non-adjusted output modes. |
| normalize_noise | BOOLEAN | false | Controls whether the noise source is normalized before scatternet filtering occurs. |
| normalize | COMBO | default | Controls whether the generated noise is normalized to 1.0 strength. |
| 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 | |
| custom_noiseopt | SONAR_CUSTOM_NOISE,OCS_NOISE | Optional: Custom noise input. If unconnected will default to Gaussian noise. 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. |