Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
499641eb
Commit
499641eb
authored
Jun 02, 2023
by
space-nuko
Browse files
More accurate total
parent
b5dd15c6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
comfy/model_management.py
comfy/model_management.py
+1
-1
No files found.
comfy/model_management.py
View file @
499641eb
...
@@ -328,7 +328,7 @@ def get_total_memory(dev=None, torch_total_too=False):
...
@@ -328,7 +328,7 @@ def get_total_memory(dev=None, torch_total_too=False):
mem_reserved
=
stats
[
'reserved_bytes.all.current'
]
mem_reserved
=
stats
[
'reserved_bytes.all.current'
]
_
,
mem_total_cuda
=
torch
.
cuda
.
mem_get_info
(
dev
)
_
,
mem_total_cuda
=
torch
.
cuda
.
mem_get_info
(
dev
)
mem_total_torch
=
mem_reserved
mem_total_torch
=
mem_reserved
mem_total
=
mem_total_cuda
+
mem_total_torch
mem_total
=
mem_total_cuda
if
torch_total_too
:
if
torch_total_too
:
return
(
mem_total
,
mem_total_torch
)
return
(
mem_total
,
mem_total_torch
)
...
...
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