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
b8be33da
Commit
b8be33da
authored
Sep 17, 2022
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hide VRAM text if polling is disabled
parent
ed6787ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
modules/ui.py
modules/ui.py
+4
-3
No files found.
modules/ui.py
View file @
b8be33da
...
...
@@ -136,7 +136,7 @@ def wrap_gradio_call(func):
elapsed
=
time
.
perf_counter
()
-
t
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
()}
active_peak
=
mem_stats
[
'active_peak'
]
reserved_peak
=
mem_stats
[
'reserved_peak'
]
sys_peak
=
'?'
if
opts
.
memmon_poll_rate
<=
0
else
mem_stats
[
'system_peak'
]
...
...
@@ -146,9 +146,10 @@ def wrap_gradio_call(func):
"Torch reserved: Peak amount of VRAM allocated by Torch, including all active and cached data.
"
\
"Sys VRAM: Peak amount of VRAM allocation across all applications / total GPU VRAM (peak utilization
%
)."
vram_html
=
''
if
opts
.
memmon_poll_rate
==
0
else
f
"<p class='vram' title='{vram_tooltip}'>Torch active/reserved: {active_peak}/{reserved_peak} MiB, <wbr>Sys VRAM: {sys_peak}/{sys_total} MiB ({sys_pct}
%
)</p>"
# last item is always HTML
res
[
-
1
]
+=
f
"<div class='performance'><p class='time'>Time taken: <wbr>{elapsed:.2f}s</p>"
\
f
"<p class='vram' title='{vram_tooltip}'>Torch active/reserved: {active_peak}/{reserved_peak} MiB, <wbr>Sys VRAM: {sys_peak}/{sys_total} MiB ({sys_pct}
%
)</p></div>"
res
[
-
1
]
+=
f
"<div class='performance'><p class='time'>Time taken: <wbr>{elapsed:.2f}s</p>{vram_html}</div>"
shared
.
state
.
interrupted
=
False
...
...
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