aboutsummaryrefslogtreecommitdiffstats
path: root/modules/shared.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2022-09-25 16:45:22 +0000
committerAUTOMATIC <16777216c@gmail.com>2022-09-25 16:45:22 +0000
commitca3e5519e8b6dc020c5e7ae508738afb5dc6f3ec (patch)
treeaa02e79e2cae338ae795db36ef7d3972d26264f1 /modules/shared.py
parentff107845b4814402a4722941d669e72055384771 (diff)
parent1877a3767ed7502c25245c3de3449b22067db74c (diff)
downloadstable-diffusion-webui-gfx803-ca3e5519e8b6dc020c5e7ae508738afb5dc6f3ec.tar.gz
stable-diffusion-webui-gfx803-ca3e5519e8b6dc020c5e7ae508738afb5dc6f3ec.tar.bz2
stable-diffusion-webui-gfx803-ca3e5519e8b6dc020c5e7ae508738afb5dc6f3ec.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'modules/shared.py')
-rw-r--r--modules/shared.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/shared.py b/modules/shared.py
index 1ce6eefc..c32da110 100644
--- a/modules/shared.py
+++ b/modules/shared.py
@@ -4,6 +4,7 @@ import json
import os
import gradio as gr
import tqdm
+import datetime
import modules.artists
from modules.paths import script_path, sd_path
@@ -65,6 +66,7 @@ class State:
job = ""
job_no = 0
job_count = 0
+ job_timestamp = 0
sampling_step = 0
sampling_steps = 0
current_latent = None
@@ -78,6 +80,8 @@ class State:
self.job_no += 1
self.sampling_step = 0
self.current_image_sampling_step = 0
+ def get_job_timestamp(self):
+ return datetime.datetime.now().strftime("%Y%m%d%H%M%S")
state = State()