Skip to content

Commit be27fd4

Browse files
committed
fix broken progress api by previous rework
1 parent 17a2076 commit be27fd4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/shared.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import os
55
import sys
66
from collections import OrderedDict
7+
import time
78

89
import gradio as gr
910
import tqdm
@@ -132,6 +133,7 @@ class State:
132133
current_image = None
133134
current_image_sampling_step = 0
134135
textinfo = None
136+
time_start = None
135137

136138
def skip(self):
137139
self.skipped = True
@@ -168,6 +170,7 @@ def begin(self):
168170
self.skipped = False
169171
self.interrupted = False
170172
self.textinfo = None
173+
self.time_start = time.time()
171174

172175
devices.torch_gc()
173176

0 commit comments

Comments
 (0)