mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
reconciled conflicting changes to pngwriter call
This commit is contained in:
parent
ddc68b01f7
commit
67fbaa7c31
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user