Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
stable-diffusion-webui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
stable-diffusion-webui
Commits
03cb43c3
Unverified
Commit
03cb43c3
authored
Dec 31, 2022
by
AUTOMATIC1111
Committed by
GitHub
Dec 31, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6133 from vladmandic/memmon-stats
add additional memory states
parents
38f5787e
5958bbd2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
memmon.py
modules/memmon.py
+3
-0
No files found.
modules/memmon.py
View file @
03cb43c3
...
@@ -71,10 +71,13 @@ class MemUsageMonitor(threading.Thread):
...
@@ -71,10 +71,13 @@ class MemUsageMonitor(threading.Thread):
def
read
(
self
):
def
read
(
self
):
if
not
self
.
disabled
:
if
not
self
.
disabled
:
free
,
total
=
torch
.
cuda
.
mem_get_info
()
free
,
total
=
torch
.
cuda
.
mem_get_info
()
self
.
data
[
"free"
]
=
free
self
.
data
[
"total"
]
=
total
self
.
data
[
"total"
]
=
total
torch_stats
=
torch
.
cuda
.
memory_stats
(
self
.
device
)
torch_stats
=
torch
.
cuda
.
memory_stats
(
self
.
device
)
self
.
data
[
"active"
]
=
torch_stats
[
"active.all.current"
]
self
.
data
[
"active_peak"
]
=
torch_stats
[
"active_bytes.all.peak"
]
self
.
data
[
"active_peak"
]
=
torch_stats
[
"active_bytes.all.peak"
]
self
.
data
[
"reserved"
]
=
torch_stats
[
"reserved_bytes.all.current"
]
self
.
data
[
"reserved_peak"
]
=
torch_stats
[
"reserved_bytes.all.peak"
]
self
.
data
[
"reserved_peak"
]
=
torch_stats
[
"reserved_bytes.all.peak"
]
self
.
data
[
"system_peak"
]
=
total
-
self
.
data
[
"min_free"
]
self
.
data
[
"system_peak"
]
=
total
-
self
.
data
[
"min_free"
]
...
...
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