aboutsummaryrefslogtreecommitdiffstats
path: root/modules/shared.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2022-10-30 06:02:01 +0000
committerGitHub <noreply@github.com>2022-10-30 06:02:01 +0000
commit060ee5d3a7ba258f944d0c891f90ac4a65411446 (patch)
tree983af95c18b90ea53c4eef3f9b9211594656c186 /modules/shared.py
parent61836bd544fc8f4ef62f311c9d5964fbdaeb3f4c (diff)
parent9f4f894d74b57c3d02ebccaa59f9c22fca2b6c90 (diff)
downloadstable-diffusion-webui-gfx803-060ee5d3a7ba258f944d0c891f90ac4a65411446.tar.gz
stable-diffusion-webui-gfx803-060ee5d3a7ba258f944d0c891f90ac4a65411446.tar.bz2
stable-diffusion-webui-gfx803-060ee5d3a7ba258f944d0c891f90ac4a65411446.zip
Merge pull request #3722 from evshiron/feat/progress-api
prototype progress api
Diffstat (limited to 'modules/shared.py')
-rw-r--r--modules/shared.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/shared.py b/modules/shared.py
index fb84afd8..f7b0990c 100644
--- a/modules/shared.py
+++ b/modules/shared.py
@@ -147,6 +147,19 @@ class State:
def get_job_timestamp(self):
return datetime.datetime.now().strftime("%Y%m%d%H%M%S") # shouldn't this return job_timestamp?
+ def dict(self):
+ obj = {
+ "skipped": self.skipped,
+ "interrupted": self.skipped,
+ "job": self.job,
+ "job_count": self.job_count,
+ "job_no": self.job_no,
+ "sampling_step": self.sampling_step,
+ "sampling_steps": self.sampling_steps,
+ }
+
+ return obj
+
state = State()