check for text attr and save
This commit is contained in:
parent
edcff9ab8a
commit
18379dea36
|
@ -235,8 +235,9 @@ class PromptServer():
|
||||||
if os.path.isfile(file):
|
if os.path.isfile(file):
|
||||||
with Image.open(file) as original_pil:
|
with Image.open(file) as original_pil:
|
||||||
metadata = PngInfo()
|
metadata = PngInfo()
|
||||||
for key in original_pil.text:
|
if hasattr(original_pil,'text'):
|
||||||
metadata.add_text(key, original_pil.text[key])
|
for key in original_pil.text:
|
||||||
|
metadata.add_text(key, original_pil.text[key])
|
||||||
original_pil = original_pil.convert('RGBA')
|
original_pil = original_pil.convert('RGBA')
|
||||||
mask_pil = Image.open(image.file).convert('RGBA')
|
mask_pil = Image.open(image.file).convert('RGBA')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue