Nodes/ComfyUI-bleh/BlehDiscardPenultimateSigma
ComfyUI Node

BlehDiscardPenultimateSigma

Stop noise dumping on your last sampling step

By blepping·Created 3 years ago·Updated 2 months ago· 142
BlehDiscardPenultimateSigma
  • sigmas
  • SIGMAS
enabledtrue

If your image looks totally fine right up until the very last step, and then a wash of noise gets dumped onto it out of nowhere, this tiny node is worth trying before you touch anything else - but it's important to know it fixes a narrower, more specific problem than the usual suspects.

The much more common cause of an image degrading near the end of generation is too-high CFG combined with too few steps - that's a CFG and step-count problem, and the fix is lowering CFG or adding steps. This node fixes something different and more mechanical: certain samplers, the README specifically names dpm2 a and SDE-family samplers, can spew a burst of noise into the image specifically on the second-to-last step of the sigma schedule, independent of your CFG or step count. Discarding that one sigma value from the schedule before it reaches the sampler sidesteps the issue at the source.

Mechanically it's about as simple as bleh nodes get: it takes a SIGMAS list and drops the next-to-last value from it. Inputs are enabled (default true, so you can toggle the behavior without rewiring anything) and sigmas (required - the SIGMAS input you'd otherwise feed straight to your sampler). Output is a modified SIGMAS list, one entry shorter, ready to wire into whatever consumes your sigma schedule.

This exact fix also exists baked into another node in the pack: BlehSetSamplerPreset has a discard_penultimate_sigma checkbox for people assigning sampler presets, doing the identical thing without needing a separate node in that particular graph shape. This standalone version is for anywhere else you're building a custom sigma chain directly.

Where this fits in your graph: it sits between whatever builds your sigma schedule (a scheduler node, or something like SplitSigmas if you're doing more elaborate sigma surgery) and whatever consumes it - typically SamplerCustomAdvanced or a custom sampling setup. Because it only touches the SIGMAS list itself, it's agnostic to which sampler you're actually running; you're deciding whether to apply the fix, not wiring it into sampler-specific logic.

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

If you enable this and see no visible change, that's likely because your sampler isn't one of the affected ones - Euler and DPM++ 2M, for instance, generally don't exhibit this behavior, so there's nothing for the fix to correct. Worth confirming which sampler you're actually on before concluding the node isn't working; it's solving a specific, sampler-dependent problem, not a general end-of-generation cleanup. And if you're already reaching for BlehSetSamplerPreset elsewhere in the same workflow, remember it has this exact fix built in as a checkbox - you don't need both wired into the same chain.

Categorysampling/custom_sampling/sigmas

Inputs (2)

NameTypeDefaultDescription
enabledBOOLEANtrue
sigmasSIGMAS

Outputs (1)

NameTypeDescription
SIGMASSIGMAS