fix broken progress api by previous rework

This commit is contained in:
evshiron 2022-10-30 17:01:01 +08:00
parent 17a2076f72
commit be27fd4690
1 changed files with 3 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import json
import os import os
import sys import sys
from collections import OrderedDict from collections import OrderedDict
import time
import gradio as gr import gradio as gr
import tqdm import tqdm
@ -132,6 +133,7 @@ class State:
current_image = None current_image = None
current_image_sampling_step = 0 current_image_sampling_step = 0
textinfo = None textinfo = None
time_start = None
def skip(self): def skip(self):
self.skipped = True self.skipped = True
@ -168,6 +170,7 @@ class State:
self.skipped = False self.skipped = False
self.interrupted = False self.interrupted = False
self.textinfo = None self.textinfo = None
self.time_start = time.time()
devices.torch_gc() devices.torch_gc()