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
ee46bef0
Commit
ee46bef0
authored
Mar 13, 2023
by
comfyanonymous
Browse files
Make --cpu have priority over everything else.
parent
0e836d52
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
comfy/model_management.py
comfy/model_management.py
+2
-2
No files found.
comfy/model_management.py
View file @
ee46bef0
...
...
@@ -50,8 +50,6 @@ if "--use-pytorch-cross-attention" in sys.argv:
XFORMERS_IS_AVAILBLE
=
False
if
"--cpu"
in
sys
.
argv
:
vram_state
=
CPU
if
"--lowvram"
in
sys
.
argv
:
set_vram_to
=
LOW_VRAM
if
"--novram"
in
sys
.
argv
:
...
...
@@ -73,6 +71,8 @@ if set_vram_to == LOW_VRAM or set_vram_to == NO_VRAM:
total_vram_available_mb
=
(
total_vram
-
1024
)
//
2
total_vram_available_mb
=
int
(
max
(
256
,
total_vram_available_mb
))
if
"--cpu"
in
sys
.
argv
:
vram_state
=
CPU
print
(
"Set vram state to:"
,
[
"CPU"
,
"NO VRAM"
,
"LOW VRAM"
,
"NORMAL VRAM"
,
"HIGH VRAM"
][
vram_state
])
...
...
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