diff options
author | Anastasius <anastasiuspernat@gmail.com> | 2022-10-18 19:42:39 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2022-10-19 06:39:28 +0000 |
commit | 1d4aa376e6111e90888a30ae24d2bcd7f978ec51 (patch) | |
tree | 8531cd037dfebe9c919834b9f604cc75f3d435dc /modules/ui.py | |
parent | 442dbedc159bb7e9cf94f0c3626f8a409e0a50eb (diff) | |
download | stable-diffusion-webui-gfx803-1d4aa376e6111e90888a30ae24d2bcd7f978ec51.tar.gz stable-diffusion-webui-gfx803-1d4aa376e6111e90888a30ae24d2bcd7f978ec51.tar.bz2 stable-diffusion-webui-gfx803-1d4aa376e6111e90888a30ae24d2bcd7f978ec51.zip |
Predictable long operation check for time estimation
Diffstat (limited to 'modules/ui.py')
-rw-r--r-- | modules/ui.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/ui.py b/modules/ui.py index fa54110b..38ba1138 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -268,7 +268,7 @@ def calc_time_left(progress, threshold, label, force_display): time_since_start = time.time() - shared.state.time_start
eta = (time_since_start/progress)
eta_relative = eta-time_since_start
- if eta_relative > threshold or force_display:
+ if (eta_relative > threshold and progress > 0.02) or force_display:
return label + time.strftime('%H:%M:%S', time.gmtime(eta_relative))
else:
return ""
|