From 67fbaa7c3106ee1c6461048cbff9111df5af0abc Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Fri, 16 Sep 2022 16:57:54 -0400 Subject: [PATCH] reconciled conflicting changes to pngwriter call --- backend/server.py | 2 +- ldm/dream/pngwriter.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/server.py b/backend/server.py index 3d24656af0..ef93c5b0d7 100644 --- a/backend/server.py +++ b/backend/server.py @@ -305,7 +305,7 @@ def save_image(image, parameters, output_dir, step_index=None, postprocessing=Fa command = parameters_to_command(parameters) - path = pngwriter.save_image_and_prompt_to_png(image, command, parameters, filename) + path = pngwriter.save_image_and_prompt_to_png(image, command, metadata=parameters, name=filename) return path diff --git a/ldm/dream/pngwriter.py b/ldm/dream/pngwriter.py index 5cda259357..9a2a8bc816 100644 --- a/ldm/dream/pngwriter.py +++ b/ldm/dream/pngwriter.py @@ -34,6 +34,7 @@ class PngWriter: # saves image named _image_ to outdir/name, writing metadata from prompt # returns full path of output def save_image_and_prompt_to_png(self, image, dream_prompt, name, metadata=None): + print(f'self.outdir={self.outdir}, name={name}') path = os.path.join(self.outdir, name) info = PngImagePlugin.PngInfo() info.add_text('Dream', dream_prompt)