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
8d694cc4
Commit
8d694cc4
authored
Jul 04, 2023
by
comfyanonymous
Browse files
Fix issue with OSX.
parent
c02f3bae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
comfy/model_management.py
comfy/model_management.py
+8
-2
No files found.
comfy/model_management.py
View file @
8d694cc4
...
@@ -456,7 +456,13 @@ def mps_mode():
...
@@ -456,7 +456,13 @@ def mps_mode():
def
is_device_cpu
(
device
):
def
is_device_cpu
(
device
):
if
hasattr
(
device
,
'type'
):
if
hasattr
(
device
,
'type'
):
if
(
device
.
type
==
'cpu'
or
device
.
type
==
'mps'
):
if
(
device
.
type
==
'cpu'
):
return
True
return
False
def
is_device_mps
(
device
):
if
hasattr
(
device
,
'type'
):
if
(
device
.
type
==
'mps'
):
return
True
return
True
return
False
return
False
...
@@ -468,7 +474,7 @@ def should_use_fp16(device=None, model_params=0):
...
@@ -468,7 +474,7 @@ def should_use_fp16(device=None, model_params=0):
return
True
return
True
if
device
is
not
None
:
#TODO
if
device
is
not
None
:
#TODO
if
is_device_cpu
(
device
):
if
is_device_cpu
(
device
)
or
is_device_mps
(
device
)
:
return
False
return
False
if
FORCE_FP32
:
if
FORCE_FP32
:
...
...
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