Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
ef40e4cd
Commit
ef40e4cd
authored
Oct 04, 2022
by
xpscyho
Committed by
AUTOMATIC1111
Oct 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display time taken in mins, secs when relevant
Fixes #1656
parent
b32852ef
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
modules/ui.py
modules/ui.py
+6
-1
No files found.
modules/ui.py
View file @
ef40e4cd
...
@@ -196,6 +196,11 @@ def wrap_gradio_call(func, extra_outputs=None):
...
@@ -196,6 +196,11 @@ def wrap_gradio_call(func, extra_outputs=None):
res
=
extra_outputs_array
+
[
f
"<div class='error'>{plaintext_to_html(type(e).__name__+': '+str(e))}</div>"
]
res
=
extra_outputs_array
+
[
f
"<div class='error'>{plaintext_to_html(type(e).__name__+': '+str(e))}</div>"
]
elapsed
=
time
.
perf_counter
()
-
t
elapsed
=
time
.
perf_counter
()
-
t
elapsed_m
=
int
(
elapsed
//
60
)
elapsed_s
=
elapsed
%
60
elapsed_text
=
f
"{elapsed_s:.2f}s"
if
(
elapsed_m
>
0
):
elapsed_text
=
f
"{elapsed_m}m "
+
elapsed_text
if
run_memmon
:
if
run_memmon
:
mem_stats
=
{
k
:
-
(
v
//-
(
1024
*
1024
))
for
k
,
v
in
shared
.
mem_mon
.
stop
()
.
items
()}
mem_stats
=
{
k
:
-
(
v
//-
(
1024
*
1024
))
for
k
,
v
in
shared
.
mem_mon
.
stop
()
.
items
()}
...
@@ -210,7 +215,7 @@ def wrap_gradio_call(func, extra_outputs=None):
...
@@ -210,7 +215,7 @@ def wrap_gradio_call(func, extra_outputs=None):
vram_html
=
''
vram_html
=
''
# last item is always HTML
# last item is always HTML
res
[
-
1
]
+=
f
"<div class='performance'><p class='time'>Time taken: <wbr>{elapsed
:.2f}s
</p>{vram_html}</div>"
res
[
-
1
]
+=
f
"<div class='performance'><p class='time'>Time taken: <wbr>{elapsed
_text}
</p>{vram_html}</div>"
shared
.
state
.
interrupted
=
False
shared
.
state
.
interrupted
=
False
shared
.
state
.
job_count
=
0
shared
.
state
.
job_count
=
0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment