mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Zero-pad intermediate image file names (#616)
This commit is contained in:
parent
6cb6c4a911
commit
ba4892e03f
@ -228,7 +228,8 @@ class DreamServer(BaseHTTPRequestHandler):
|
|||||||
nonlocal step_index
|
nonlocal step_index
|
||||||
if opt.progress_images and step % 5 == 0 and step < opt.steps - 1:
|
if opt.progress_images and step % 5 == 0 and step < opt.steps - 1:
|
||||||
image = self.model.sample_to_image(sample)
|
image = self.model.sample_to_image(sample)
|
||||||
name = f'{prefix}.{opt.seed}.{step_index}.png'
|
step_index_padded = str(step_index).rjust(len(str(opt.steps)), '0')
|
||||||
|
name = f'{prefix}.{opt.seed}.{step_index_padded}.png'
|
||||||
metadata = f'{opt.prompt} -S{opt.seed} [intermediate]'
|
metadata = f'{opt.prompt} -S{opt.seed} [intermediate]'
|
||||||
path = step_writer.save_image_and_prompt_to_png(image, dream_prompt=metadata, name=name)
|
path = step_writer.save_image_and_prompt_to_png(image, dream_prompt=metadata, name=name)
|
||||||
step_index += 1
|
step_index += 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user