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
cf0098d5
Unverified
Commit
cf0098d5
authored
Mar 27, 2023
by
Francesco Yoshi Gobbo
Browse files
no lowvram state if cpu only
parent
48efadec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
comfy/model_management.py
comfy/model_management.py
+2
-1
No files found.
comfy/model_management.py
View file @
cf0098d5
...
@@ -22,7 +22,8 @@ try:
...
@@ -22,7 +22,8 @@ try:
total_vram
=
torch
.
cuda
.
mem_get_info
(
torch
.
cuda
.
current_device
())[
1
]
/
(
1024
*
1024
)
total_vram
=
torch
.
cuda
.
mem_get_info
(
torch
.
cuda
.
current_device
())[
1
]
/
(
1024
*
1024
)
total_ram
=
psutil
.
virtual_memory
().
total
/
(
1024
*
1024
)
total_ram
=
psutil
.
virtual_memory
().
total
/
(
1024
*
1024
)
forced_normal_vram
=
"--normalvram"
in
sys
.
argv
forced_normal_vram
=
"--normalvram"
in
sys
.
argv
if
not
forced_normal_vram
:
forced_cpu
=
"--cpu"
in
sys
.
argv
if
not
forced_normal_vram
and
not
forced_cpu
:
if
total_vram
<=
4096
:
if
total_vram
<=
4096
:
print
(
"Trying to enable lowvram mode because your GPU seems to have 4GB or less. If you don't want this use: --normalvram"
)
print
(
"Trying to enable lowvram mode because your GPU seems to have 4GB or less. If you don't want this use: --normalvram"
)
set_vram_to
=
LOW_VRAM
set_vram_to
=
LOW_VRAM
...
...
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