1
+ from typing import Any
1
2
import comfy .sd
2
3
3
4
class SamplerSelector :
@@ -10,54 +11,54 @@ class SamplerSelector:
10
11
DESCRIPTION = 'Provides one of the available ComfyUI samplers'
11
12
12
13
@classmethod
13
- def INPUT_TYPES (cls ):
14
+ def INPUT_TYPES (cls ) -> dict [ str , Any ] :
14
15
return {
15
16
"required" : {
16
17
"sampler_name" : (comfy .samplers .KSampler .SAMPLERS , {"tooltip" : "sampler (Comfy's standard)" }),
17
18
}
18
19
}
19
20
20
- def get_names (self , sampler_name ) :
21
+ def get_names (self , sampler_name : str ) -> tuple [ str , str ] :
21
22
return (sampler_name , sampler_name )
22
23
23
24
class SchedulerSelector :
24
- RETURN_TYPES = (comfy .samplers .KSampler .SCHEDULERS + [ 'AYS SDXL' , 'AYS SD1' , 'AYS SVD' , 'GITS[coeff=1.2]' ] , "STRING" )
25
- RETURN_NAMES = ("scheduler" , "scheduler_name" )
26
- OUTPUT_TOOLTIPS = ("scheduler (SCHEDULERS + ['AYS SDXL', 'AYS SD1', 'AYS SVD', 'GITS[coeff=1.2]'] )" , "scheduler name (STRING)" )
25
+ RETURN_TYPES = (comfy .samplers .KSampler .SCHEDULERS , "STRING" )
26
+ RETURN_NAMES = ("scheduler" , "scheduler_name" )
27
+ OUTPUT_TOOLTIPS = ("scheduler (SCHEDULERS)" , "scheduler name (STRING)" )
27
28
FUNCTION = "get_names"
28
29
29
30
CATEGORY = 'ImageSaver/utils'
30
- DESCRIPTION = 'Provides one of the standard ComfyUI plus some extra schedulers'
31
+ DESCRIPTION = 'Provides one of the standard KSampler schedulers'
31
32
32
33
@classmethod
33
- def INPUT_TYPES (cls ):
34
+ def INPUT_TYPES (cls ) -> dict [ str , Any ] :
34
35
return {
35
36
"required" : {
36
- "scheduler" : (comfy .samplers .KSampler .SCHEDULERS + [ 'AYS SDXL' , 'AYS SD1' , 'AYS SVD' , 'GITS[coeff=1.2]' ], {"tooltip" : "scheduler (Comfy's standard + extras )" }),
37
+ "scheduler" : (comfy .samplers .KSampler .SCHEDULERS , {"tooltip" : "scheduler (Comfy's standard)" }),
37
38
}
38
39
}
39
40
40
- def get_names (self , scheduler ) :
41
+ def get_names (self , scheduler : str ) -> tuple [ str , str ] :
41
42
return (scheduler , scheduler )
42
43
43
- class SchedulerSelectorComfy :
44
- RETURN_TYPES = (comfy .samplers .KSampler .SCHEDULERS , "STRING" )
45
- RETURN_NAMES = ("scheduler" , "scheduler_name" )
46
- OUTPUT_TOOLTIPS = ("scheduler (SCHEDULERS)" , "scheduler name (STRING)" )
44
+ class SchedulerSelectorInspire :
45
+ RETURN_TYPES = (comfy .samplers .KSampler .SCHEDULERS + [ 'AYS SDXL' , 'AYS SD1' , 'AYS SVD' , 'GITS[coeff=1.2]' , 'OSS FLUX' , 'OSS Wan' ] , "STRING" )
46
+ RETURN_NAMES = ("scheduler" , "scheduler_name" )
47
+ OUTPUT_TOOLTIPS = ("scheduler (SCHEDULERS + ['AYS SDXL', 'AYS SD1', 'AYS SVD', 'GITS[coeff=1.2]', 'OSS FLUX', 'OSS Wan'] )" , "scheduler name (STRING)" )
47
48
FUNCTION = "get_names"
48
49
49
50
CATEGORY = 'ImageSaver/utils'
50
- DESCRIPTION = 'Provides one of the standard ComfyUI schedulers'
51
+ DESCRIPTION = 'Provides one of the KSampler (inspire) schedulers'
51
52
52
53
@classmethod
53
- def INPUT_TYPES (cls ):
54
+ def INPUT_TYPES (cls ) -> dict [ str , Any ] :
54
55
return {
55
56
"required" : {
56
- "scheduler" : (comfy .samplers .KSampler .SCHEDULERS , {"tooltip" : "scheduler (Comfy's standard)" }),
57
+ "scheduler" : (comfy .samplers .KSampler .SCHEDULERS + [ 'AYS SDXL' , 'AYS SD1' , 'AYS SVD' , 'GITS[coeff=1.2]' , 'OSS FLUX' , 'OSS Wan' ], {"tooltip" : "scheduler (Comfy's standard + extras )" }),
57
58
}
58
59
}
59
60
60
- def get_names (self , scheduler ) :
61
+ def get_names (self , scheduler : str ) -> tuple [ str , str ] :
61
62
return (scheduler , scheduler )
62
63
63
64
class SchedulerToString :
@@ -67,37 +68,37 @@ class SchedulerToString:
67
68
FUNCTION = "get_name"
68
69
69
70
CATEGORY = 'ImageSaver/utils'
70
- DESCRIPTION = 'Provides a given sandard ComfyUI or some extra scheduler\' s name as string'
71
+ DESCRIPTION = 'Provides a given sandard ComfyUI scheduler\' s name as string'
71
72
72
73
@classmethod
73
- def INPUT_TYPES (cls ):
74
+ def INPUT_TYPES (cls ) -> dict [ str , Any ] :
74
75
return {
75
76
"required" : {
76
- "scheduler" : (comfy .samplers .KSampler .SCHEDULERS + [ 'AYS SDXL' , 'AYS SD1' , 'AYS SVD' , 'GITS[coeff=1.2]' ], {"tooltip" : "scheduler (Comfy's standard + extras )" }),
77
+ "scheduler" : (comfy .samplers .KSampler .SCHEDULERS , {"tooltip" : "scheduler (KSampler )" }),
77
78
}
78
79
}
79
80
80
- def get_name (self , scheduler ) :
81
+ def get_name (self , scheduler : str ) -> tuple [ str ,] :
81
82
return (scheduler ,)
82
83
83
- class SchedulerComfyToString :
84
+ class SchedulerInspireToString :
84
85
RETURN_TYPES = ("STRING" ,)
85
86
RETURN_NAMES = ("scheduler_name" ,)
86
87
OUTPUT_TOOLTIPS = ("scheduler name (STRING)" ,)
87
88
FUNCTION = "get_name"
88
89
89
90
CATEGORY = 'ImageSaver/utils'
90
- DESCRIPTION = 'Provides a given sandard ComfyUI scheduler\' s name as string'
91
+ DESCRIPTION = 'Provides a given sandard ComfyUI or some extra scheduler\' s name as string'
91
92
92
93
@classmethod
93
- def INPUT_TYPES (cls ):
94
+ def INPUT_TYPES (cls ) -> dict [ str , Any ] :
94
95
return {
95
96
"required" : {
96
- "scheduler" : (comfy .samplers .KSampler .SCHEDULERS , {"tooltip" : "scheduler (Comfy's standard )" }),
97
+ "scheduler" : (comfy .samplers .KSampler .SCHEDULERS + [ 'AYS SDXL' , 'AYS SD1' , 'AYS SVD' , 'GITS[coeff=1.2]' , 'OSS FLUX' , 'OSS Wan' ], {"tooltip" : "scheduler (KSampler inspire )" }),
97
98
}
98
99
}
99
100
100
- def get_name (self , scheduler ) :
101
+ def get_name (self , scheduler : str ) -> tuple [ str ,] :
101
102
return (scheduler ,)
102
103
103
104
class SamplerToString :
@@ -110,14 +111,14 @@ class SamplerToString:
110
111
DESCRIPTION = 'Provides a given sandard ComfyUI samplers\' s name as string'
111
112
112
113
@classmethod
113
- def INPUT_TYPES (cls ):
114
+ def INPUT_TYPES (cls ) -> dict [ str , Any ] :
114
115
return {
115
116
"required" : {
116
117
"sampler" : (comfy .samplers .KSampler .SAMPLERS , {"tooltip" : "sampler (Comfy's standard)" }),
117
118
}
118
119
}
119
120
120
- def get_name (self , sampler ) :
121
+ def get_name (self , sampler : str ) -> tuple [ str ,] :
121
122
return (sampler ,)
122
123
123
124
class InputParameters :
@@ -139,7 +140,7 @@ class InputParameters:
139
140
DESCRIPTION = "Combined node for seed, steps, cfg, sampler, scheduler and denoise."
140
141
141
142
@classmethod
142
- def INPUT_TYPES (cls ):
143
+ def INPUT_TYPES (cls ) -> dict [ str , Any ] :
143
144
return {
144
145
"required" : {
145
146
"seed" : ("INT" , {"default" : 0 , "min" : 0 , "max" : 0xffffffffffffffff , "control_after_generate" : True , "tooltip" : "The random seed used for creating the noise." }),
@@ -151,5 +152,5 @@ def INPUT_TYPES(cls):
151
152
}
152
153
}
153
154
154
- def get_values (self , seed , steps , cfg , sampler , scheduler , denoise ) :
155
+ def get_values (self , seed : int , steps : int , cfg : float , sampler : str , scheduler : str , denoise : float ) -> tuple [ int , int , float , str , str , str , str , float ] :
155
156
return (seed , steps , cfg , sampler , sampler , scheduler , scheduler , denoise )
0 commit comments