feat(app): embed PNG info in invokeai_metadata and invokeai_graph

Using just `metadata` and `graph` feel a bit too generic.
This commit is contained in:
psychedelicious 2023-07-13 12:49:10 +10:00
parent 6bea7bac36
commit 5f5c93abb4

View File

@ -122,9 +122,9 @@ class DiskImageFileStorage(ImageFileStorageBase):
pnginfo = PngImagePlugin.PngInfo()
if metadata is not None:
pnginfo.add_text("metadata", json.dumps(metadata))
pnginfo.add_text("invokeai_metadata", json.dumps(metadata))
if graph is not None:
pnginfo.add_text("graph", json.dumps(graph))
pnginfo.add_text("invokeai_graph", json.dumps(graph))
image.save(image_path, "PNG", pnginfo=pnginfo)
thumbnail_name = get_thumbnail_name(image_name)