mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-04-19 10:53:29 +00:00
Make --cpu have priority over everything else.
This commit is contained in:
parent
0e836d525e
commit
ee46bef03a
@ -50,8 +50,6 @@ if "--use-pytorch-cross-attention" in sys.argv:
|
|||||||
XFORMERS_IS_AVAILBLE = False
|
XFORMERS_IS_AVAILBLE = False
|
||||||
|
|
||||||
|
|
||||||
if "--cpu" in sys.argv:
|
|
||||||
vram_state = CPU
|
|
||||||
if "--lowvram" in sys.argv:
|
if "--lowvram" in sys.argv:
|
||||||
set_vram_to = LOW_VRAM
|
set_vram_to = LOW_VRAM
|
||||||
if "--novram" in sys.argv:
|
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 = (total_vram - 1024) // 2
|
||||||
total_vram_available_mb = int(max(256, total_vram_available_mb))
|
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])
|
print("Set vram state to:", ["CPU", "NO VRAM", "LOW VRAM", "NORMAL VRAM", "HIGH VRAM"][vram_state])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user