mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Merge remote-tracking branch 'upstream/development' into development
This commit is contained in:
commit
693bed5514
@ -305,7 +305,7 @@ def save_image(image, parameters, output_dir, step_index=None, postprocessing=Fa
|
|||||||
|
|
||||||
command = parameters_to_command(parameters)
|
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
|
return path
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ class PngWriter:
|
|||||||
# saves image named _image_ to outdir/name, writing metadata from prompt
|
# saves image named _image_ to outdir/name, writing metadata from prompt
|
||||||
# returns full path of output
|
# returns full path of output
|
||||||
def save_image_and_prompt_to_png(self, image, dream_prompt, name, metadata=None):
|
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)
|
path = os.path.join(self.outdir, name)
|
||||||
info = PngImagePlugin.PngInfo()
|
info = PngImagePlugin.PngInfo()
|
||||||
info.add_text('Dream', dream_prompt)
|
info.add_text('Dream', dream_prompt)
|
||||||
|
Loading…
Reference in New Issue
Block a user