mirror of
https://github.com/justUmen/Bjornulf_custom_nodes.git
synced 2026-03-21 12:42:11 -03:00
23 lines
655 B
Python
23 lines
655 B
Python
import comfy
|
|
|
|
class LoopSamplers:
|
|
@classmethod
|
|
def INPUT_TYPES(cls):
|
|
samplers = ["ALL SAMPLERS"] + list(comfy.samplers.KSampler.SAMPLERS)
|
|
return {
|
|
"required": {
|
|
"sampler_name": (samplers,),
|
|
}
|
|
}
|
|
|
|
RETURN_TYPES = (comfy.samplers.KSampler.SAMPLERS,)
|
|
RETURN_NAMES = ("sampler_name",)
|
|
OUTPUT_IS_LIST = (True,)
|
|
FUNCTION = "create_loop_sampler"
|
|
CATEGORY = "Bjornulf"
|
|
|
|
def create_loop_sampler(self, sampler_name):
|
|
if sampler_name == "ALL SAMPLERS":
|
|
return (list(comfy.samplers.KSampler.SAMPLERS),)
|
|
else:
|
|
return ([sampler_name],) |