mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(backend): fix workflow not saving to image
This commit is contained in:
parent
e22c797fa3
commit
7caccb11fa
@ -119,12 +119,10 @@ class DiskImageFileStorage(ImageFileStorageBase):
|
|||||||
|
|
||||||
pnginfo = PngImagePlugin.PngInfo()
|
pnginfo = PngImagePlugin.PngInfo()
|
||||||
|
|
||||||
if metadata is not None and workflow is not None:
|
|
||||||
if metadata is not None:
|
if metadata is not None:
|
||||||
pnginfo.add_text("invokeai_metadata", json.dumps(metadata))
|
pnginfo.add_text("invokeai_metadata", json.dumps(metadata))
|
||||||
if workflow is not None:
|
if workflow is not None:
|
||||||
pnginfo.add_text("invokeai_workflow", workflow)
|
pnginfo.add_text("invokeai_workflow", workflow)
|
||||||
else:
|
|
||||||
# For uploaded images, we want to retain metadata. PIL strips it on save; manually add it back
|
# For uploaded images, we want to retain metadata. PIL strips it on save; manually add it back
|
||||||
for item_name, item in image.info.items():
|
for item_name, item in image.info.items():
|
||||||
pnginfo.add_text(item_name, item)
|
pnginfo.add_text(item_name, item)
|
||||||
|
Loading…
Reference in New Issue
Block a user