9494CONTROLNET_NAME_VALUES = Literal [tuple (CONTROLNET_DEFAULT_MODELS )]
9595
9696class ControlField (BaseModel ):
97- image : ImageField = Field (default = None , description = "processed image" )
98- control_model : Optional [str ] = Field (default = None , description = "control model used " )
99- control_weight : Optional [float ] = Field (default = 1 , description = "weight given to controlnet " )
97+ image : ImageField = Field (default = None , description = "The control image" )
98+ control_model : Optional [str ] = Field (default = None , description = "The ControlNet model to use " )
99+ control_weight : Optional [float ] = Field (default = 1 , description = "The weight given to the ControlNet " )
100100 begin_step_percent : float = Field (default = 0 , ge = 0 , le = 1 ,
101- description = "% of total steps at which controlnet is first applied " )
101+ description = "When the ControlNet is first applied (% of total steps) " )
102102 end_step_percent : float = Field (default = 1 , ge = 0 , le = 1 ,
103- description = "% of total steps at which controlnet is last applied " )
103+ description = "When the ControlNet is last applied (% of total steps) " )
104104
105105 class Config :
106106 schema_extra = {
@@ -112,7 +112,7 @@ class ControlOutput(BaseInvocationOutput):
112112 """node output for ControlNet info"""
113113 # fmt: off
114114 type : Literal ["control_output" ] = "control_output"
115- control : ControlField = Field (default = None , description = "The control info dict " )
115+ control : ControlField = Field (default = None , description = "The output control image " )
116116 # fmt: on
117117
118118
@@ -121,15 +121,15 @@ class ControlNetInvocation(BaseInvocation):
121121 # fmt: off
122122 type : Literal ["controlnet" ] = "controlnet"
123123 # Inputs
124- image : ImageField = Field (default = None , description = "image to process " )
124+ image : ImageField = Field (default = None , description = "The control image " )
125125 control_model : CONTROLNET_NAME_VALUES = Field (default = "lllyasviel/sd-controlnet-canny" ,
126- description = "control model used " )
127- control_weight : float = Field (default = 1.0 , ge = 0 , le = 1 , description = "weight given to controlnet " )
126+ description = "The ControlNet model to use " )
127+ control_weight : float = Field (default = 1.0 , ge = 0 , le = 1 , description = "The weight given to the ControlNet " )
128128 # TODO: add support in backend core for begin_step_percent, end_step_percent, guess_mode
129129 begin_step_percent : float = Field (default = 0 , ge = 0 , le = 1 ,
130- description = "% of total steps at which controlnet is first applied " )
130+ description = "When the ControlNet is first applied (% of total steps) " )
131131 end_step_percent : float = Field (default = 1 , ge = 0 , le = 1 ,
132- description = "% of total steps at which controlnet is last applied " )
132+ description = "When the ControlNet is last applied (% of total steps) " )
133133 # fmt: on
134134
135135
@@ -152,7 +152,7 @@ class ImageProcessorInvocation(BaseInvocation, PILInvocationConfig):
152152 # fmt: off
153153 type : Literal ["image_processor" ] = "image_processor"
154154 # Inputs
155- image : ImageField = Field (default = None , description = "image to process" )
155+ image : ImageField = Field (default = None , description = "The image to process" )
156156 # fmt: on
157157
158158
@@ -204,8 +204,8 @@ class CannyImageProcessorInvocation(ImageProcessorInvocation, PILInvocationConfi
204204 # fmt: off
205205 type : Literal ["canny_image_processor" ] = "canny_image_processor"
206206 # Input
207- low_threshold : float = Field (default = 100 , ge = 0 , description = "low threshold of Canny pixel gradient" )
208- high_threshold : float = Field (default = 200 , ge = 0 , description = "high threshold of Canny pixel gradient" )
207+ low_threshold : int = Field (default = 100 , ge = 0 , le = 255 , description = "The low threshold of the Canny pixel gradient (0-255) " )
208+ high_threshold : int = Field (default = 200 , ge = 0 , le = 255 , description = "The high threshold of the Canny pixel gradient (0-255) " )
209209 # fmt: on
210210
211211 def run_processor (self , image ):
@@ -214,16 +214,16 @@ def run_processor(self, image):
214214 return processed_image
215215
216216
217- class HedImageprocessorInvocation (ImageProcessorInvocation , PILInvocationConfig ):
217+ class HedImageProcessorInvocation (ImageProcessorInvocation , PILInvocationConfig ):
218218 """Applies HED edge detection to image"""
219219 # fmt: off
220220 type : Literal ["hed_image_processor" ] = "hed_image_processor"
221221 # Inputs
222- detect_resolution : int = Field (default = 512 , ge = 0 , description = "pixel resolution for edge detection" )
223- image_resolution : int = Field (default = 512 , ge = 0 , description = "pixel resolution for output image" )
222+ detect_resolution : int = Field (default = 512 , ge = 0 , description = "The pixel resolution for detection" )
223+ image_resolution : int = Field (default = 512 , ge = 0 , description = "The pixel resolution for the output image" )
224224 # safe not supported in controlnet_aux v0.0.3
225225 # safe: bool = Field(default=False, description="whether to use safe mode")
226- scribble : bool = Field (default = False , description = "whether to use scribble mode" )
226+ scribble : bool = Field (default = False , description = "Whether to use scribble mode" )
227227 # fmt: on
228228
229229 def run_processor (self , image ):
@@ -243,9 +243,9 @@ class LineartImageProcessorInvocation(ImageProcessorInvocation, PILInvocationCon
243243 # fmt: off
244244 type : Literal ["lineart_image_processor" ] = "lineart_image_processor"
245245 # Inputs
246- detect_resolution : int = Field (default = 512 , ge = 0 , description = "pixel resolution for edge detection" )
247- image_resolution : int = Field (default = 512 , ge = 0 , description = "pixel resolution for output image" )
248- coarse : bool = Field (default = False , description = "whether to use coarse mode" )
246+ detect_resolution : int = Field (default = 512 , ge = 0 , description = "The pixel resolution for detection" )
247+ image_resolution : int = Field (default = 512 , ge = 0 , description = "The pixel resolution for the output image" )
248+ coarse : bool = Field (default = False , description = "Whether to use coarse mode" )
249249 # fmt: on
250250
251251 def run_processor (self , image ):
@@ -262,8 +262,8 @@ class LineartAnimeImageProcessorInvocation(ImageProcessorInvocation, PILInvocati
262262 # fmt: off
263263 type : Literal ["lineart_anime_image_processor" ] = "lineart_anime_image_processor"
264264 # Inputs
265- detect_resolution : int = Field (default = 512 , ge = 0 , description = "pixel resolution for edge detection" )
266- image_resolution : int = Field (default = 512 , ge = 0 , description = "pixel resolution for output image" )
265+ detect_resolution : int = Field (default = 512 , ge = 0 , description = "The pixel resolution for detection" )
266+ image_resolution : int = Field (default = 512 , ge = 0 , description = "The pixel resolution for the output image" )
267267 # fmt: on
268268
269269 def run_processor (self , image ):
@@ -280,9 +280,9 @@ class OpenposeImageProcessorInvocation(ImageProcessorInvocation, PILInvocationCo
280280 # fmt: off
281281 type : Literal ["openpose_image_processor" ] = "openpose_image_processor"
282282 # Inputs
283- hand_and_face : bool = Field (default = False , description = "whether to use hands and face mode" )
284- detect_resolution : int = Field (default = 512 , ge = 0 , description = "pixel resolution for edge detection" )
285- image_resolution : int = Field (default = 512 , ge = 0 , description = "pixel resolution for output image" )
283+ hand_and_face : bool = Field (default = False , description = "Whether to use hands and face mode" )
284+ detect_resolution : int = Field (default = 512 , ge = 0 , description = "The pixel resolution for detection" )
285+ image_resolution : int = Field (default = 512 , ge = 0 , description = "The pixel resolution for the output image" )
286286 # fmt: on
287287
288288 def run_processor (self , image ):
@@ -300,8 +300,8 @@ class MidasDepthImageProcessorInvocation(ImageProcessorInvocation, PILInvocation
300300 # fmt: off
301301 type : Literal ["midas_depth_image_processor" ] = "midas_depth_image_processor"
302302 # Inputs
303- a_mult : float = Field (default = 2.0 , ge = 0 , description = "Midas parameter a = amult * PI" )
304- bg_th : float = Field (default = 0.1 , ge = 0 , description = "Midas parameter bg_th" )
303+ a_mult : float = Field (default = 2.0 , ge = 0 , description = "Midas parameter `a_mult` ( a = a_mult * PI) " )
304+ bg_th : float = Field (default = 0.1 , ge = 0 , description = "Midas parameter ` bg_th` " )
305305 # depth_and_normal not supported in controlnet_aux v0.0.3
306306 # depth_and_normal: bool = Field(default=False, description="whether to use depth and normal mode")
307307 # fmt: on
@@ -322,8 +322,8 @@ class NormalbaeImageProcessorInvocation(ImageProcessorInvocation, PILInvocationC
322322 # fmt: off
323323 type : Literal ["normalbae_image_processor" ] = "normalbae_image_processor"
324324 # Inputs
325- detect_resolution : int = Field (default = 512 , ge = 0 , description = "pixel resolution for edge detection" )
326- image_resolution : int = Field (default = 512 , ge = 0 , description = "pixel resolution for output image" )
325+ detect_resolution : int = Field (default = 512 , ge = 0 , description = "The pixel resolution for detection" )
326+ image_resolution : int = Field (default = 512 , ge = 0 , description = "The pixel resolution for the output image" )
327327 # fmt: on
328328
329329 def run_processor (self , image ):
@@ -339,10 +339,10 @@ class MlsdImageProcessorInvocation(ImageProcessorInvocation, PILInvocationConfig
339339 # fmt: off
340340 type : Literal ["mlsd_image_processor" ] = "mlsd_image_processor"
341341 # Inputs
342- detect_resolution : int = Field (default = 512 , ge = 0 , description = "pixel resolution for edge detection" )
343- image_resolution : int = Field (default = 512 , ge = 0 , description = "pixel resolution for output image" )
344- thr_v : float = Field (default = 0.1 , ge = 0 , description = "MLSD parameter thr_v" )
345- thr_d : float = Field (default = 0.1 , ge = 0 , description = "MLSD parameter thr_d" )
342+ detect_resolution : int = Field (default = 512 , ge = 0 , description = "The pixel resolution for detection" )
343+ image_resolution : int = Field (default = 512 , ge = 0 , description = "The pixel resolution for the output image" )
344+ thr_v : float = Field (default = 0.1 , ge = 0 , description = "MLSD parameter ` thr_v` " )
345+ thr_d : float = Field (default = 0.1 , ge = 0 , description = "MLSD parameter ` thr_d` " )
346346 # fmt: on
347347
348348 def run_processor (self , image ):
@@ -360,10 +360,10 @@ class PidiImageProcessorInvocation(ImageProcessorInvocation, PILInvocationConfig
360360 # fmt: off
361361 type : Literal ["pidi_image_processor" ] = "pidi_image_processor"
362362 # Inputs
363- detect_resolution : int = Field (default = 512 , ge = 0 , description = "pixel resolution for edge detection" )
364- image_resolution : int = Field (default = 512 , ge = 0 , description = "pixel resolution for output image" )
365- safe : bool = Field (default = False , description = "whether to use safe mode" )
366- scribble : bool = Field (default = False , description = "whether to use scribble mode" )
363+ detect_resolution : int = Field (default = 512 , ge = 0 , description = "The pixel resolution for detection" )
364+ image_resolution : int = Field (default = 512 , ge = 0 , description = "The pixel resolution for the output image" )
365+ safe : bool = Field (default = False , description = "Whether to use safe mode" )
366+ scribble : bool = Field (default = False , description = "Whether to use scribble mode" )
367367 # fmt: on
368368
369369 def run_processor (self , image ):
@@ -381,11 +381,11 @@ class ContentShuffleImageProcessorInvocation(ImageProcessorInvocation, PILInvoca
381381 # fmt: off
382382 type : Literal ["content_shuffle_image_processor" ] = "content_shuffle_image_processor"
383383 # Inputs
384- detect_resolution : int = Field (default = 512 , ge = 0 , description = "pixel resolution for edge detection" )
385- image_resolution : int = Field (default = 512 , ge = 0 , description = "pixel resolution for output image" )
386- h : Union [int | None ] = Field (default = 512 , ge = 0 , description = "content shuffle h parameter" )
387- w : Union [int | None ] = Field (default = 512 , ge = 0 , description = "content shuffle w parameter" )
388- f : Union [int | None ] = Field (default = 256 , ge = 0 , description = "cont " )
384+ detect_resolution : int = Field (default = 512 , ge = 0 , description = "The pixel resolution for detection" )
385+ image_resolution : int = Field (default = 512 , ge = 0 , description = "The pixel resolution for the output image" )
386+ h : Union [int , None ] = Field (default = 512 , ge = 0 , description = "Content shuffle `h` parameter" )
387+ w : Union [int , None ] = Field (default = 512 , ge = 0 , description = "Content shuffle `w` parameter" )
388+ f : Union [int , None ] = Field (default = 256 , ge = 0 , description = "Content shuffle `f` parameter " )
389389 # fmt: on
390390
391391 def run_processor (self , image ):
@@ -418,8 +418,8 @@ class MediapipeFaceProcessorInvocation(ImageProcessorInvocation, PILInvocationCo
418418 # fmt: off
419419 type : Literal ["mediapipe_face_processor" ] = "mediapipe_face_processor"
420420 # Inputs
421- max_faces : int = Field (default = 1 , ge = 1 , description = "maximum number of faces to detect" )
422- min_confidence : float = Field (default = 0.5 , ge = 0 , le = 1 , description = "minimum confidence for face detection" )
421+ max_faces : int = Field (default = 1 , ge = 1 , description = "Maximum number of faces to detect" )
422+ min_confidence : float = Field (default = 0.5 , ge = 0 , le = 1 , description = "Minimum confidence for face detection" )
423423 # fmt: on
424424
425425 def run_processor (self , image ):
0 commit comments