Nodes/ComfyUI-sonar/SonarCustomNoiseParameters
ComfyUI Node

SonarCustomNoiseParameters

Custom noise type that allows setting parameters like dtype or forking the RNG.

By blepping·Created 3 years ago·Updated 3 days ago· 49
SonarCustomNoiseParameters
  • custom_noise
  • SONAR_CUSTOM_NOISE
factor1.000
rng_state_offset0
rng_offset_modedisabled
rng_modedefault
frames_to_channelsfalse
ensure_square_aspect_ratiofalse
fix_invalidfalse
override_dtypedefault
override_devicedefault
normalizedefault
Categoryadvanced/noise

Inputs (11)

NameTypeDefaultDescription
factorFLOAT1.000-10000–10000Scaling factor for the generated noise of this type.
custom_noiseSONAR_CUSTOM_NOISE,OCS_NOISEAllows connecting a custom noise chain. The following input types are supported: SONAR_CUSTOM_NOISE, OCS_NOISE
rng_state_offsetINT00–10000In other words, seed. Avoiding using the word seed here to suppress ComfyUI's annoying default behavior. If you want stuff like auto-increment you can connect an INT primitive node.
rng_offset_modeCOMBOdisabledControls the seed passed to the noise sampler and also seeding when rng_mode is set to separate. Most noise samplers don't care about the seed so this generally will only have an effect in when rng_mode is set to separate.
rng_modeCOMBOdefaultdefault mode doesn't do anything special. separate mode creates a generator and saves/restores the state when generating noise (also includes the Python random module). fork uses the existing RNG state (for both Torch and Python random module) but restores it to whatever it was before the custom noise was called.
frames_to_channelsBOOLEANfalseOnly applicable for 5D latents (video models). Will move the frame dimension into channels, may be necessary if a noise type can't deal with 5D latents directly. It's safe to enable this for all models.
ensure_square_aspect_ratioBOOLEANfalseWill rearrange the height/width sizes to be square, padding with zeros if necessary. May help some noise types work better with extreme aspect ratios, can also deal with 3D (1 spatial dimension) latents.
fix_invalidBOOLEANfalseReplaces any NaNs or infinite values with 0.
override_dtypeCOMBOdefaultCan be used to override the dtype the noise is generated with. Not all noise generators support all types. I don't recommend using the int or float8 types. Probably the most useful override is float64.
override_deviceCOMBOdefaultdefault just uses whatever device normally would be used. gpu will use ComfyUI's default GPU device and also toggle the cpu_noise flag off. cpu will use the CPU device and toggle the cpu_noise flag on.
normalizeCOMBOdefaultControls whether noise is normalized to 1.0 strength.

Outputs (1)

NameTypeDescription
SONAR_CUSTOM_NOISESONAR_CUSTOM_NOISEA custom noise chain.