@@ -59,10 +59,10 @@ def VALIDATE_INPUTS(s, input_name, default_value, description=""):
59
59
if image .startswith ("http" ):
60
60
return True
61
61
62
- if not os . path . isfile ( image ) :
62
+ if image == "" :
63
63
return "Invalid image file: please check if the image is empty or invalid"
64
64
65
- if folder_paths .exists_annotated_filepath (image ):
65
+ if not folder_paths .exists_annotated_filepath (image ):
66
66
return "Invalid image file: {}" .format (image )
67
67
68
68
return True
@@ -107,6 +107,7 @@ def convert_image_mask(self, img):
107
107
108
108
return (output_image , output_mask )
109
109
110
+
110
111
def run (self , input_name , default_value = None , display_name = None , description = None ):
111
112
input_dir = folder_paths .get_input_directory ()
112
113
image_path = default_value
@@ -128,7 +129,7 @@ def run(self, input_name, default_value=None, display_name=None, description=Non
128
129
if not os .path .isfile (image_path ): # abs path
129
130
# local path
130
131
image_path = os .path .join (input_dir , image_path )
131
- image = Image .open ( image_path ). convert ( "RGB" )
132
+ image = node_helpers . pillow ( Image .open , image_path )
132
133
133
134
return self .convert_image_mask (image )
134
135
# image = ImageOps.exif_transpose(image)
0 commit comments