Nodes/ComfyUI-sonar/SamplerConfigOverride
ComfyUI Node

SamplerConfigOverride

Swap any sampler's noise type without building a custom sampler

By blepping·Created 3 years ago·Updated 9 days ago· 49
SamplerConfigOverride
  • sampler
  • custom_noise_opt
  • SAMPLER
eta1.000
s_noise1.000
s_churn0.000
r0.500
sde_solver
cpu_noisetrue
normalizetrue
noise_typeDEFAULT
yaml_parameters

Of everything in ComfyUI-sonar, SamplerConfigOverride is the one a beginner gets the most value out of, because it's the cheat code that lets you use the pack's custom noise without building a full custom-sampling graph. It takes a SAMPLER, applies overrides, and hands back a SAMPLER - you drop it between your normal sampler selection and a plain KSampler's sampler input, and suddenly that KSampler is running on whatever noise type you picked.

The star of the show is the noise_type dropdown: 39 choices from plain gaussian through brownian, collatz, distro, green_test, grey, highres_pyramid, laplacian, onef_greenish, and friends. Whatever noise that sampler injects during ancestral or SDE steps becomes that type. You can also bypass the dropdown entirely by connecting a SONAR_CUSTOM_NOISE chain to custom_noise_opt - that input wins over the dropdown whenever it's connected. The catch to know going in: custom noise only shows up in samplers that actually add noise, which is ancestral/SDE territory. Non-ancestral Euler isn't adding noise, so your exotic noise type is doing nothing.

The other knobs are sampler math, and the tooltips are actually trustworthy here:

  • eta - controls the ancestralness. 1 is the default; 0 gives you a non-ancestral (or SDE) sampler. This is how you dial a sampler's "creativity" up or down.
  • s_noise - multiplier for the noise added during ancestral/SDE sampling. Lower it for calmer output, push it for chaos.
  • s_churn - the older knob, only used by a few samplers (notably non-ancestral Euler). Not used by ancestral or SDE samplers.
  • r - used by dpmpp_sde and friends.
  • sde_solver - midpoint or heun for dpmpp_2m_sde.
  • cpu_noise - generates noise on CPU instead of GPU. It's true by default, and it matters for reproducibility: sonar's own README warns that GPU-vs-CPU noise generation is inconsistent, so this is one way to pin things down.
  • normalize - whether generated noise gets normalized to 1.0 strength. Leave it on until you have a reason not to.

There's also a multiline yaml_parameters field. It's mostly for the sonar momentum samplers - the README documents a sonar_params: block (momentum_mode, momentum_start_step, momentum_end_step, blend_mode, and so on) that can override the values set on the sampler node itself. The tooltip's warning is worth repeating: there's not much error checking when you go the YAML route, so typos fail silently.

Install is the pack standard - no model files, just the repo:

cd ComfyUI/custom_nodes
git clone https://github.com/blepping/ComfyUI-sonar

Restart ComfyUI, and you're done.

Where people get tangled: expecting the override to change noise on samplers that never inject noise, or connecting a custom noise chain and then also setting noise_type and wondering which won (the chain). And remember you're dealing with blepping's pack - inputs shift between releases, so if a workflow you saved stops behaving, check the changelog before blaming your settings. Start with gaussian-vs-grey or highres_pyramid on a converging-but-noisy sampler like Euler a and you'll feel the difference without fighting the math.

Categorysampling/custom_sampling/samplers

Inputs (11)

NameTypeDefaultDescription
samplerSAMPLER
etaFLOAT1.000-10000–10000Basically controls the ancestralness of the sampler. When set to 0, you will get a non-ancestral (or SDE) sampler.
s_noiseFLOAT1.000-10000–10000Multiplier for noise added during ancestral or SDE sampling.
s_churnFLOAT0.000-10000–10000Churn was the predececessor of ETA. Only used by a few types of samplers (notably Euler non-ancestral). Not used by any ancestral or SDE samplers.
rFLOAT0.500-10000–10000Used by dpmpp_sde (and perhaps a few other SDE samplers).
sde_solverCOMBOSolver used by dpmpp_2m_sde.
cpu_noiseBOOLEANtrueControls whether noise is generated on CPU or GPU.
normalizeBOOLEANtrueControls whether generated noise is normalized to 1.0 strength.
noise_typeoptCOMBODEFAULTNoise type used during ancestral or SDE sampling. DEFAULT will use the default for the attached sampler. Only used when the custom noise input is not connected.
custom_noise_optoptSONAR_CUSTOM_NOISE,OCS_NOISEOptional input for custom noise used during ancestral or SDE sampling. When connected, the built-in noise_type selector is ignored. The following input types are supported: SONAR_CUSTOM_NOISE, OCS_NOISE
yaml_parametersoptSTRINGAllows specifying custom parameters via YAML. Note: When specifying paramaters this way, there is generally not much error checking.

Outputs (1)

NameTypeDescription
SAMPLERSAMPLER