1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-03 07:26:31 +08:00

Fix VALIDATE_INPUTS getting called multiple times.

Allow VALIDATE_INPUTS to only validate specific inputs.
This commit is contained in:
comfyanonymous
2023-12-29 17:33:30 -05:00
parent 12e822c6c8
commit 04b713dda1
2 changed files with 36 additions and 27 deletions

View File

@@ -1491,13 +1491,10 @@ class LoadImageMask:
return m.digest().hex()
@classmethod
def VALIDATE_INPUTS(s, image, channel):
def VALIDATE_INPUTS(s, image):
if not folder_paths.exists_annotated_filepath(image):
return "Invalid image file: {}".format(image)
if channel not in s._color_channels:
return "Invalid color channel: {}".format(channel)
return True
class ImageScale: