Skip to content

Commit

Permalink
Included seed in image name.
Browse files Browse the repository at this point in the history
  • Loading branch information
Beyondo committed Apr 10, 2023
1 parent d66c494 commit 6fef7c9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion legacy/img2img.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def process(ShouldSave, maxNumJobs, ShouldPreview = True, ReplaceResult = True):
callback_steps=20).images[0]
colab.last_generated_image = image
progress.show(image)
postprocessor.post_process(image, "%d_%d" % (timestamp, i), colab.get_current_image_uid(), ShouldSave, ReplaceResult)
postprocessor.post_process(image, f"{timestamp}_{i}_{colab.current_seed}", colab.get_current_image_uid(), ShouldSave, ReplaceResult)
display(HTML("<label>Iterations: %d/%d</label>" % (i + 1, num_iterations)), display_id="iterations")
postprocessor.join_queue_thread()
torch.cuda.empty_cache()
Expand Down
2 changes: 1 addition & 1 deletion legacy/inpaint.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def process(ShouldSave, maxNumJobs, ShouldPreview = True, ReplaceResult = True):
image.thumbnail((512, 512))
colab.last_generated_image = image
progress.show(image)
postprocessor.post_process(image, "%d_%d" % (timestamp, i), colab.get_current_image_uid(), ShouldSave, ReplaceResult)
postprocessor.post_process(image, f"{timestamp}_{i}_{colab.current_seed}", colab.get_current_image_uid(), ShouldSave, ReplaceResult)
display(HTML("<label>Iterations: %d/%d</label>" % (i + 1, num_iterations)), display_id="iterations")
postprocessor.join_queue_thread()
torch.cuda.empty_cache()
Expand Down
2 changes: 1 addition & 1 deletion legacy/text2img.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def process(ShouldSave, maxNumJobs, ShouldPreview = True, ReplaceResult = True):
callback_steps=20).images[0]
colab.last_generated_image = image
progress.show(image)
postprocessor.post_process(image, "%d_%d" % (timestamp, i), colab.get_current_image_uid(), ShouldSave, ReplaceResult)
postprocessor.post_process(image, f"{timestamp}_{i}_{colab.current_seed}", colab.get_current_image_uid(), ShouldSave, ReplaceResult)
display(HTML("<label>Iterations: %d/%d</label>" % (i + 1, num_iterations)), display_id="iterations")
postprocessor.join_queue_thread()
torch.cuda.empty_cache()
Expand Down

0 comments on commit 6fef7c9

Please sign in to comment.