diff options
Diffstat (limited to 'modules/shared.py')
-rw-r--r-- | modules/shared.py | 4 |
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()
|