Skip to content

Commit

Permalink
Add SamplerEulerAncestral node.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Mar 9, 2024
1 parent 0a46752 commit a9ee958
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions comfy_extras/nodes_custom_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,23 @@ def get_sampler(self, eta, s_noise, r, noise_device):
sampler = comfy.samplers.ksampler(sampler_name, {"eta": eta, "s_noise": s_noise, "r": r})
return (sampler, )

class SamplerEulerAncestral:
@classmethod
def INPUT_TYPES(s):
return {"required":
{"eta": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 100.0, "step":0.01, "round": False}),
"s_noise": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 100.0, "step":0.01, "round": False}),
}
}
RETURN_TYPES = ("SAMPLER",)
CATEGORY = "sampling/custom_sampling/samplers"

FUNCTION = "get_sampler"

def get_sampler(self, eta, s_noise):
sampler = comfy.samplers.ksampler("euler_ancestral", {"eta": eta, "s_noise": s_noise})
return (sampler, )

class SamplerCustom:
@classmethod
def INPUT_TYPES(s):
Expand Down Expand Up @@ -288,6 +305,7 @@ def sample(self, model, add_noise, noise_seed, cfg, positive, negative, sampler,
"VPScheduler": VPScheduler,
"SDTurboScheduler": SDTurboScheduler,
"KSamplerSelect": KSamplerSelect,
"SamplerEulerAncestral": SamplerEulerAncestral,
"SamplerDPMPP_2M_SDE": SamplerDPMPP_2M_SDE,
"SamplerDPMPP_SDE": SamplerDPMPP_SDE,
"SplitSigmas": SplitSigmas,
Expand Down

0 comments on commit a9ee958

Please sign in to comment.