Add support for pasted images to the Prompt Reader node #64

This commit is contained in:
Rhys Yang
2024-03-07 22:32:40 +08:00
parent bc62d2be03
commit c2ac789c44
+6
View File
@@ -141,6 +141,8 @@ class SDPromptReader:
def load_image(self, image, parameter_index):
if image in SDPromptReader.files:
image_path = folder_paths.get_annotated_filepath(image)
elif image.startswith("pasted/"):
image_path = folder_paths.get_annotated_filepath(image)
else:
image_path = image
i = Image.open(image_path)
@@ -290,6 +292,10 @@ class SDPromptReader:
image_data = ImageDataReader(f)
return image_data.props
@classmethod
def VALIDATE_INPUTS(s, image):
return True
class SDPromptSaver:
model_hash_dict = {}