mirror of
https://github.com/justUmen/Bjornulf_custom_nodes.git
synced 2026-03-21 20:52:11 -03:00
first commit
This commit is contained in:
23
loop_samplers.py
Normal file
23
loop_samplers.py
Normal file
@@ -0,0 +1,23 @@
|
||||
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],)
|
||||
Reference in New Issue
Block a user