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
3e2608e1
"git@developer.sourcefind.cn:wangsen/paddle_dbnet.git" did not exist on "7676e5f277739d5396a3c1dc98aec982c4fb539d"
Commit
3e2608e1
authored
Apr 06, 2023
by
藍+85CD
Browse files
Fix auto lowvram detection on CUDA
parent
7cb924f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
comfy/model_management.py
comfy/model_management.py
+6
-5
No files found.
comfy/model_management.py
View file @
3e2608e1
...
...
@@ -22,11 +22,12 @@ set_vram_to = NORMAL_VRAM
try
:
import
torch
import
intel_extension_for_pytorch
as
ipex
if
torch
.
xpu
.
is_available
():
xpu_available
=
True
total_vram
=
torch
.
xpu
.
get_device_properties
(
torch
.
xpu
.
current_device
()).
total_memory
/
(
1024
*
1024
)
else
:
try
:
import
intel_extension_for_pytorch
as
ipex
if
torch
.
xpu
.
is_available
():
xpu_available
=
True
total_vram
=
torch
.
xpu
.
get_device_properties
(
torch
.
xpu
.
current_device
()).
total_memory
/
(
1024
*
1024
)
except
:
total_vram
=
torch
.
cuda
.
mem_get_info
(
torch
.
cuda
.
current_device
())[
1
]
/
(
1024
*
1024
)
total_ram
=
psutil
.
virtual_memory
().
total
/
(
1024
*
1024
)
forced_normal_vram
=
"--normalvram"
in
sys
.
argv
...
...
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