Skip to content

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 a SplitSigmasDenoise node as an alternative to SplitSigmas.

comfyanonymous565eb6d176d2
diff --git a/comfy_extras/nodes_custom_sampler.py b/comfy_extras/nodes_custom_sampler.py
index f3dff000e..47f08bf60 100644
--- a/comfy_extras/nodes_custom_sampler.py
+++ b/comfy_extras/nodes_custom_sampler.py
@@ -139,6 +139,7 @@ class SplitSigmas:
}
}
RETURN_TYPES = ("SIGMAS","SIGMAS")
+ RETURN_NAMES = ("high_sigmas", "low_sigmas")
CATEGORY = "sampling/custom_sampling/sigmas"
FUNCTION = "get_sigmas"
@@ -148,6 +149,27 @@ class SplitSigmas:
sigmas2 = sigmas[step:]
return (sigmas1, sigmas2)
+class SplitSigmasDenoise:
+ @classmethod
+ def INPUT_TYPES(s):
+ return {"required":
+ {"sigmas": ("SIGMAS", ),
+ "denoise": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.01}),
+ }
+ }
+ RETURN_TYPES = ("SIGMAS","SIGMAS")
+ RETURN_NAMES = ("high_sigmas", "low_sigmas")
+ CATEGORY = "sampling/custom_sampling/sigmas"
+
+ FUNCTION = "get_sigmas"
+
+ def get_sigmas(self, sigmas, denoise):
+ steps = max(sigmas.shape[-1] - 1, 0)
+ total_steps = round(steps * denoise)
+ sigmas1 = sigmas[:-(total_steps)]
+ sigmas2 = sigmas[-(total_steps + 1):]
+ return (sigmas1, sigmas2)
+
class FlipSigmas:
@classmethod
def INPUT_TYPES(s):
@@ -599,6 +621,7 @@ NODE_CLASS_MAPPINGS = {
"SamplerDPMPP_SDE": SamplerDPMPP_SDE,
"SamplerDPMAdaptative": SamplerDPMAdaptative,
"SplitSigmas": SplitSigmas,
+ "SplitSigmasDenoise": SplitSigmasDenoise,
"FlipSigmas": FlipSigmas,
"CFGGuider": CFGGuider,