The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Add ExponentialScheduler and PolyexponentialScheduler nodes.
comfyanonymous213976f8c3ea
diff --git a/comfy_extras/nodes_custom_sampler.py b/comfy_extras/nodes_custom_sampler.pyindex b667afe4f..a1dc97848 100644--- a/comfy_extras/nodes_custom_sampler.py+++ b/comfy_extras/nodes_custom_sampler.py@@ -43,6 +43,43 @@ class KarrasScheduler:sigmas = k_diffusion_sampling.get_sigmas_karras(n=steps, sigma_min=sigma_min, sigma_max=sigma_max, rho=rho)return (sigmas, )+class ExponentialScheduler:+ @classmethod+ def INPUT_TYPES(s):+ return {"required":+ {"steps": ("INT", {"default": 20, "min": 1, "max": 10000}),+ "sigma_max": ("FLOAT", {"default": 14.614642, "min": 0.0, "max": 1000.0, "step":0.01, "round": False}),+ "sigma_min": ("FLOAT", {"default": 0.0291675, "min": 0.0, "max": 1000.0, "step":0.01, "round": False}),+ }+ }+ RETURN_TYPES = ("SIGMAS",)+ CATEGORY = "_for_testing/custom_sampling"++ FUNCTION = "get_sigmas"++ def get_sigmas(self, steps, sigma_max, sigma_min):+ sigmas = k_diffusion_sampling.get_sigmas_exponential(n=steps, sigma_min=sigma_min, sigma_max=sigma_max)+ return (sigmas, )++class PolyexponentialScheduler:+ @classmethod+ def INPUT_TYPES(s):+ return {"required":+ {"steps": ("INT", {"default": 20, "min": 1, "max": 10000}),+ "sigma_max": ("FLOAT", {"default": 14.614642, "min": 0.0, "max": 1000.0, "step":0.01, "round": False}),+ "sigma_min": ("FLOAT", {"default": 0.0291675, "min": 0.0, "max": 1000.0, "step":0.01, "round": False}),+ "rho": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 100.0, "step":0.01, "round": False}),+ }+ }+ RETURN_TYPES = ("SIGMAS",)+ CATEGORY = "_for_testing/custom_sampling"++ FUNCTION = "get_sigmas"++ def get_sigmas(self, steps, sigma_max, sigma_min, rho):+ sigmas = k_diffusion_sampling.get_sigmas_polyexponential(n=steps, sigma_min=sigma_min, sigma_max=sigma_max, rho=rho)+ return (sigmas, )+class SplitSigmas:@classmethoddef INPUT_TYPES(s):@@ -155,6 +192,8 @@ class SamplerCustom:NODE_CLASS_MAPPINGS = {"SamplerCustom": SamplerCustom,"KarrasScheduler": KarrasScheduler,+ "ExponentialScheduler": ExponentialScheduler,+ "PolyexponentialScheduler": PolyexponentialScheduler,"KSamplerSelect": KSamplerSelect,"SamplerDPMPP_2M_SDE": SamplerDPMPP_2M_SDE,"BasicScheduler": BasicScheduler,