mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-11 10:25:16 +00:00
Fix issue with OSX.
This commit is contained in:
parent
c02f3baeaf
commit
8d694cc450
@ -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):
|
|||||||
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:
|
||||||
|
Loading…
Reference in New Issue
Block a user