Nodes/ComfyUI-bleh/BlehDisableNoise
ComfyUI Node

BlehDisableNoise

Fix ComfyUI's silent seed bug on SamplerCustomAdvanced

By blepping·Created 3 years ago·Updated 2 months ago· 142
BlehDisableNoise
    • NOISE
    noise_seed0
    seed_offset1

    If you're building with SamplerCustomAdvanced and getting a completely different image every single run no matter what seed you type in, this small node is almost certainly the fix, and it's fixing a real ComfyUI bug rather than papering over a mistake in your graph.

    Here's the bug, straight from the README, because it's genuinely surprising the first time you hit it: if add_noise is turned off, ComfyUI does not set any global RNG seed at all for samplers like euler_a. Not "sets it but ignores it" - it skips the seeding step entirely. So your seed number is meaningless, and you get a different result every time regardless of what you typed. SDE-family samplers are unaffected, because they use a different RNG mechanism that doesn't depend on that global seed step.

    This node is a NOISE-type node - it slots into SamplerCustomAdvanced's dedicated noise input in place of the standard RandomNoise or DisableNoise core nodes - and it makes sure a seed actually gets set even with noise addition turned off. There's a companion node, BlehForceSeedSampler, that does the identical job but wraps a SAMPLER directly instead of plugging into a NOISE input - reach for that one if your graph is built around the older KSampler-with-a-custom-sampler style instead of SamplerCustomAdvanced.

    Inputs: noise_seed (required - your actual seed value). seed_offset (optional, default 1, range 0-200) advances the RNG this many extra steps before sampling starts, so the noise actually used for sampling isn't identical to whatever noise the initial generation step already produced - the author recommends leaving this at 1 or higher, with 0 as the explicit, deliberate way to disable that offset if you have a specific reason to want the exact same noise reused.

    Output is a NOISE object, wired straight into SamplerCustomAdvanced's noise input.

    Why bother disabling add_noise at all, if it comes with this trap attached? It's a legitimate thing to want - SamplerCustomAdvanced splits noise generation and sampling into separate steps specifically so you can do things like feed in a latent that already has the "right" amount of noise baked in from somewhere else (an img2img-style partial latent, or a hand-crafted noise source), rather than have the sampler add its own fresh noise on top. add_noise: false is how you tell it not to double up. The bug is that ComfyUI takes that as license to skip seeding the RNG at all, even though plenty of samplers still read from that global RNG state for other purposes during the sampling loop itself - which is exactly what breaks reproducibility.

    Install is the standard route for the pack: ComfyUI Manager, or a manual git clone https://github.com/blepping/ComfyUI-bleh into custom_nodes followed by a restart. No extra dependencies for this node.

    The practical takeaway if you're troubleshooting: this is a documented ComfyUI behavior, not something specific to your workflow being misconfigured. If you've been staring at a SamplerCustomAdvanced graph wondering why changing the seed does nothing, check whether add_noise is disabled somewhere upstream before you go looking anywhere else - that's the actual cause, and this node (or its sampler-wrapping sibling) is the actual fix.

    Categorysampling/custom_sampling/noise

    Inputs (2)

    NameTypeDefaultDescription
    noise_seedINT00–18446744073709550000
    seed_offsetoptINT10–200Advances the RNG this many times to avoid the mistake of using the same noise for sampling as the initial noise. I recommend leaving this at 1 (or higher) but you can set it to 0. to disable

    Outputs (1)

    NameTypeDescription
    NOISENOISE