Add a --force-fp32 argument to force fp32 for debugging.

This commit is contained in:
comfyanonymous
2023-04-07 00:27:54 -04:00
parent bceccca0e5
commit 64557d6781
2 changed files with 9 additions and 0 deletions

View File

@@ -69,6 +69,11 @@ elif args.novram:
elif args.highvram:
vram_state = VRAMState.HIGH_VRAM
FORCE_FP32 = False
if args.force_fp32:
print("Forcing FP32, if this improves things please report it.")
FORCE_FP32 = True
if set_vram_to in (VRAMState.LOW_VRAM, VRAMState.NO_VRAM):
try:
@@ -273,6 +278,9 @@ def mps_mode():
def should_use_fp16():
global xpu_available
if FORCE_FP32:
return False
if cpu_mode() or mps_mode() or xpu_available:
return False #TODO ?