Spaces:
Running
Running
Update externalmod.py
Browse files- externalmod.py +1 -1
externalmod.py
CHANGED
@@ -596,7 +596,7 @@ def save_image(image, savefile, modelname, prompt, nprompt, height=0, width=0, s
|
|
596 |
if width > 0 and height > 0: metadata["resolution"] = f"{width} x {height}"
|
597 |
metadata_str = json.dumps(metadata)
|
598 |
info = PngImagePlugin.PngInfo()
|
599 |
-
info.add_text("
|
600 |
image.save(savefile, "PNG", pnginfo=info)
|
601 |
return str(Path(savefile).resolve())
|
602 |
except Exception as e:
|
|
|
596 |
if width > 0 and height > 0: metadata["resolution"] = f"{width} x {height}"
|
597 |
metadata_str = json.dumps(metadata)
|
598 |
info = PngImagePlugin.PngInfo()
|
599 |
+
info.add_text("metadata", metadata_str)
|
600 |
image.save(savefile, "PNG", pnginfo=info)
|
601 |
return str(Path(savefile).resolve())
|
602 |
except Exception as e:
|