fix incorrect seed in metadata

- When generating multiple images, the first seed was being used for second
  and subsequent files. This should only happen when variations are being
  generated. Now fixed.
This commit is contained in:
Lincoln Stein 2022-10-03 00:28:14 -04:00
parent ea67040ef1
commit ffcb31faef

View File

@ -299,13 +299,12 @@ def main_loop(gen, opt, infile):
postprocessed,
first_seed
)
path = file_writer.save_image_and_prompt_to_png(
image = image,
dream_prompt = formatted_dream_prompt,
metadata = metadata_dumps(
opt,
seeds = [seed],
seeds = [seed if opt.variation_amount==0 and len(prior_variations)==0 else first_seed],
model_hash = gen.model_hash,
),
name = filename,
@ -324,7 +323,6 @@ def main_loop(gen, opt, infile):
opt.last_operation='generate'
gen.prompt2image(
image_callback=image_writer,
# step_callback=gen.write_intermediate_images(5,'./outputs/img-samples/intermediates'), #DEBUGGING ONLY - DELETE
catch_interrupts=catch_ctrl_c,
**vars(opt)
)