Commit 1d4aa376 authored by Anastasius's avatar Anastasius Committed by AUTOMATIC1111

Predictable long operation check for time estimation

parent 442dbedc
......@@ -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 ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment