pass validation when os.path.isfile

This commit is contained in:
wl-zhao
2024-12-17 19:24:59 +08:00
parent 604d34900a
commit 637bc88fec
+3
View File
@@ -65,6 +65,9 @@ class ShellAgentPluginInputImage:
if image == "":
return "Invalid image file: please check if the image is empty or invalid"
if os.path.isfile(image):
return True
if not folder_paths.exists_annotated_filepath(image):
return "Invalid image file: {}".format(image)