reconciled conflicting changes to pngwriter call

This commit is contained in:
Lincoln Stein 2022-09-16 16:57:54 -04:00
parent ddc68b01f7
commit 67fbaa7c31
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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)