-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathloop_my_combos_samplers_schedulers.py
82 lines (68 loc) · 2.89 KB
/
loop_my_combos_samplers_schedulers.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import comfy
class LoopCombosSamplersSchedulers:
combinations = [
"sgm_uniform/euler", "sgm_uniform/dpm_2", "sgm_uniform/dpmpp_2m", "sgm_uniform/lcm",
"sgm_uniform/ddim", "sgm_uniform/uni_pc",
"normal/ddim", "normal/uni_pc", "normal/euler", "normal/heunpp2", "normal/dpm_2",
"ddim_uniform/euler", "ddim_uniform/dpm_2", "ddim_uniform/lcm", "ddim_uniform/uni_pc",
"simple/euler", "simple/heun", "simple/heunpp2", "simple/dpmpp_2m", "simple/lcm", "simple/ipndm", "simple/uni_pc",
"exponential/dpm_adaptive"
]
# "normal/uni_pc_bh2", "ddim_uniform/uni_pc_bh2", "simple/uni_pc_bh2", "sgm_uniform/uni_pc_bh2"
@classmethod
def INPUT_TYPES(cls):
# Generate the list of combinations from specified pairs
combi_list = ["ALL 6 COMBINATIONS (sgm_uniform)", "ALL 5 COMBINATIONS (normal)", "ALL 5 COMBINATIONS (ddim_uniform)", "ALL 7 COMBINATIONS (simple)"] + cls.combinations
return {
"required": {
"combination": (combi_list,),
}
}
RETURN_TYPES = (comfy.samplers.KSampler.SAMPLERS, comfy.samplers.KSampler.SCHEDULERS,)
RETURN_NAMES = ("sampler_name", "scheduler",)
OUTPUT_IS_LIST = (True, False)
FUNCTION = "create_loop_combination"
CATEGORY = "Bjornulf"
def create_loop_combination(self, combination):
if combination == "ALL 6 COMBINATIONS (sgm_uniform)":
return (["euler", "dpm_2", "dpmpp_2m", "lcm", "ddim", "uni_pc"], "sgm_uniform",) #, "uni_pc_bh2" uni_pc_bh2 is too similar to exist....
elif combination == "ALL 5 COMBINATIONS (normal)":
return (["ddim", "uni_pc", "euler", "heunpp2", "dpm_2"], "normal",) #, "uni_pc_bh2"
elif combination == "ALL 5 COMBINATIONS (ddim_uniform)":
return (["euler", "dpm_2", "lcm", "ddim", "uni_pc"], "ddim_uniform",) #, "uni_pc_bh2"
elif combination == "ALL 7 COMBINATIONS (simple)":
return (["euler", "heun", "heunpp2", "dpmpp_2m", "lcm", "ipndm", "uni_pc"], "simple",) #, "uni_pc_bh2"
else:
# Split the input and output the selected sampler and scheduler
scheduler, sampler = combination.split("/")
# return [(sampler, scheduler,)]
return ([sampler], scheduler,)
# + ("exponential", "dpm_adaptive")
# TESTED GOOD WITH SD3, modelsampling 5 / CFG 3 / 28 steps
# sgm_uniform + euler
# sgm_uniform + dpm_2
# sgm_uniform + dpmpp_2m
# sgm_uniform + lcm
# sgm_uniform + ddim
# sgm_uniform + uni_pc
# sgm_uniform + uni_pc_bh2
# normal + ddim
# normal + uni_pc
# normal + uni_pc_bh2
# normal + euler
# normal + heunpp2
# normal + dpm_2
# ddim_uniform + euler
# ddim_uniform + dpm_2
# ddim_uniform + lcm
# ddim_uniform + uni_pc
# ddim_uniform + uni_pc_bh2
# simple + euler
# simple + heun
# simple + heunpp2
# simple + dpmpp_2m
# simple + lcm
# simple + ipndm
# simple + uni_pc
# simple + uni_pc_bh2
# exponential + dpm_adaptive