ComfyUI Node
SonarAdvancedCollatzNoise
Custom noise type that allows specifying parameters for Collatz noise. Very experimental, also very slow. It might just about work as initial noise with non-ancestral sampling but if you get weird results I recommend mixing it with other noise types or possibly using ancestral/SDE sampling.
SonarAdvancedCollatzNoise
- sonar_custom_noise_opt
- seed_custom_noise
- mix_custom_noise
- SONAR_CUSTOM_NOISE
◄factor1.000►
◄rescale0.000►
◄adjust_scalefalse►
◄chain_length1, 1, 2, 2, 3, 3►
◄chain_offset5►
◄iterations10►
◄iteration_sign_flippingtrue►
◄rmin-8000.000►
◄rmax8000.000►
◄dims-1, -1, -2, -2►
◄flattenfalse►
◄output_modevalues►
◄quantile0.500►
◄quantile_strategyclamp►
◄noise_dtypefloat32►
◄even_multiplier0.500►
◄even_addition0.000►
◄odd_multiplier3.000►
◄odd_addition1.000►
◄integer_mathtrue►
◄add_preserves_signtrue►
◄break_loopstrue►
◄seed_modedefault►
Categoryadvanced/noise
Inputs (26)
| 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. |
| adjust_scale | BOOLEAN | false | When enabled, the output will be normalized to values between -1 and 1 using the last two dimensions (if there are four or more), otherwise dimensions after the first. |
| chain_length | STRING | 1, 1, 2, 2, 3, 3 | Comma-separated list of chain lengths. Cannot be empty. Iterations will cycle through the list and wrap. Controls the length of Collatz chains. Note: Using a high chain length may be very slow, especially if combined with many iterations. |
| chain_offset | INT | 50–10000 | Uses values starting at the specified offset. Note: This entails generating chains of length chain_length + chain_offset, which may be quite slow if you use high values. |
| iterations | INT | 101–10000 | Number of iterations to run. Warning: Collatz noise (my implementation, anyway) is EXTREMELY slow. |
| iteration_sign_flipping | BOOLEAN | true | Controls whether we cycle between flipping the sign on the output from each iteration. May average out weirdness... Or make stuff weirder. |
| rmin | FLOAT | -8000.000-10000–10000 | Minimum value a chain can start with. Going as low as -9500 should be safe with float32. |
| rmax | FLOAT | 8000.000-10000–10000 | Maximum value a chain can start with. I don't recommend going over 9500 if you are using the float32 dtype here as that is where the Collatz chain starts to reach values that can't be accurately represented. |
| dims | STRING | -1, -1, -2, -2 | Comma-separated list of dimensions. Cannot be empty. May be negative to count from the end of the list. Iterations will cycle through the list and wrap. |
| flatten | BOOLEAN | false | Controls whether dimensions past the current one selected from the dims parameter will get flattened. |
| output_mode | COMBO | values | 9 options: values, ratios, mults, adds, seed_x_mults, seed_x_adds, +3 |
| quantile | FLOAT | 0.5000–1 | The initial output of each iteration will be run through quantile normalization. Setting the parameter to 0 or 1 will disable quantile normalization. |
| quantile_strategy | COMBO | clamp | Determines how to treat outliers. zero and reverse_zero modes are only useful if you're going to do something like add the result to some other noise. zero will return zero for anything outside the quantile range, reverse_zero only _keeps_ the outliers and zeros everything else. |
| noise_dtype | COMBO | float32 | Generally should be left at the default. Only float32 and float64 will work if you have quantile normalization enabled. |
| even_multiplier | FLOAT | 0.500-10000–10000 | Multiplier to use when the previous link in the chain is even. Collatz uses 0.5 (divides by two) here. |
| even_addition | FLOAT | 0.000-10000–10000 | Value to add when the previous link in the chain is even. Collatz uses 0 here. |
| odd_multiplier | FLOAT | 3.000-10000–10000 | Multiplier to use when the previous link in the chain is odd. Collatz uses 3 here. |
| odd_addition | FLOAT | 1.000-10000–10000 | Value to add when the previous link in the chain is odd. Collatz uses 1 here. |
| integer_math | BOOLEAN | true | Controls whether the results during chain generation get truncated to an integer value or not. Should be enabled if you actually want to generate accurate Collatz chains. |
| add_preserves_sign | BOOLEAN | true | Controls whether additions use the same sign as the item they're being added to. |
| break_loops | BOOLEAN | true | Controls whether the chain resets back to the seed value once it reaches 1 or 0. Generally should be left enabled, otherwise the chain will oscillate between only a few values for the rest of the length (at least with the Collatz rules). |
| seed_mode | COMBO | default | Default mode just uses whatever the original seed value was. force_odd/force_even will force it to the specified parity by adding one if it doesn't match. Starting from odd seeds might result in longer chains. Enabling the force modes may cause the initial seeds to exceed rmax by one. |
| 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 | |
| seed_custom_noiseopt | SONAR_CUSTOM_NOISE,OCS_NOISE | Optional custom noise to use for initial values for Collatz chains. May be slow as it will generate noise according to the original input size and then crop it. Does this noise type have enough warnings about it being slow? Yeah. Connecting something here will probably make it even slower! The following input types are supported: SONAR_CUSTOM_NOISE, OCS_NOISE | |
| mix_custom_noiseopt | SONAR_CUSTOM_NOISE,OCS_NOISE | Optional custom noise to use with the output modes starting with '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. |