mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-03-15 14:09:36 +00:00
Apparently directml supports fp16.
This commit is contained in:
parent
29d4384a75
commit
12da6ef581
@ -1021,8 +1021,6 @@ def is_directml_enabled():
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def should_use_fp16(device=None, model_params=0, prioritize_performance=True, manual_cast=False):
|
def should_use_fp16(device=None, model_params=0, prioritize_performance=True, manual_cast=False):
|
||||||
global directml_enabled
|
|
||||||
|
|
||||||
if device is not None:
|
if device is not None:
|
||||||
if is_device_cpu(device):
|
if is_device_cpu(device):
|
||||||
return False
|
return False
|
||||||
@ -1033,8 +1031,8 @@ def should_use_fp16(device=None, model_params=0, prioritize_performance=True, ma
|
|||||||
if FORCE_FP32:
|
if FORCE_FP32:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if directml_enabled:
|
if is_directml_enabled():
|
||||||
return False
|
return True
|
||||||
|
|
||||||
if (device is not None and is_device_mps(device)) or mps_mode():
|
if (device is not None and is_device_mps(device)) or mps_mode():
|
||||||
return True
|
return True
|
||||||
|
Loading…
Reference in New Issue
Block a user