diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-11-02 09:06:12 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-02 09:06:12 +0000 |
commit | e526f6b378e908d0a4a15661aaa1f67ecbaef1ff (patch) | |
tree | 004b91b5d49c6d9b853def5cb9bdbdb775335965 /modules/shared.py | |
parent | 905304243cf121bfa87aac44a1290607ea2aa50e (diff) | |
parent | 51e0a83969925e6b7b12b9b087d028c16ce04e3c (diff) | |
download | stable-diffusion-webui-gfx803-e526f6b378e908d0a4a15661aaa1f67ecbaef1ff.tar.gz stable-diffusion-webui-gfx803-e526f6b378e908d0a4a15661aaa1f67ecbaef1ff.tar.bz2 stable-diffusion-webui-gfx803-e526f6b378e908d0a4a15661aaa1f67ecbaef1ff.zip |
Merge pull request #3970 from evshiron/fix/progress-api
fix broken progress api and current image compatibility
Diffstat (limited to 'modules/shared.py')
-rw-r--r-- | modules/shared.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/shared.py b/modules/shared.py index 1ccb269a..04aaa648 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -4,6 +4,7 @@ import json import os
import sys
from collections import OrderedDict
+import time
import gradio as gr
import tqdm
@@ -135,6 +136,7 @@ class State: current_image = None
current_image_sampling_step = 0
textinfo = None
+ time_start = None
need_restart = False
def skip(self):
@@ -172,6 +174,7 @@ class State: self.skipped = False
self.interrupted = False
self.textinfo = None
+ self.time_start = time.time()
devices.torch_gc()
|