The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Allow custom samplers to request discard penultimate sigma
bleppinga352c021eca1
diff --git a/comfy/samplers.py b/comfy/samplers.pyindex f4c3e268f..5dd72f3fa 100644--- a/comfy/samplers.py+++ b/comfy/samplers.py@@ -652,6 +652,7 @@ def sampler_object(name):class KSampler:SCHEDULERS = SCHEDULER_NAMESSAMPLERS = SAMPLER_NAMES+ DISCARD_PENULTIMATE_SIGMA_SAMPLERS = set(('dpm_2', 'dpm_2_ancestral', 'uni_pc', 'uni_pc_bh2'))def __init__(self, model, steps, device, sampler=None, scheduler=None, denoise=None, model_options={}):self.model = model@@ -670,7 +671,7 @@ class KSampler:sigmas = Nonediscard_penultimate_sigma = False- if self.sampler in ['dpm_2', 'dpm_2_ancestral', 'uni_pc', 'uni_pc_bh2']:+ if self.sampler in self.DISCARD_PENULTIMATE_SIGMA_SAMPLERS:steps += 1discard_penultimate_sigma = True