Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Make --force-fp16 actually force the diffusion model to be fp16.

comfyanonymousaf4b7c91be34
diff --git a/comfy/cli_args.py b/comfy/cli_args.py
index ec8f92e8a..a906ff1c0 100644
--- a/comfy/cli_args.py
+++ b/comfy/cli_args.py
@@ -191,3 +191,6 @@ if args.windows_standalone_build:
if args.disable_auto_launch:
args.auto_launch = False
+
+if args.force_fp16:
+ args.fp16_unet = True
diff --git a/comfy/model_management.py b/comfy/model_management.py
index ca84f2064..28083fbf9 100644
--- a/comfy/model_management.py
+++ b/comfy/model_management.py
@@ -262,15 +262,10 @@ elif args.highvram or args.gpu_only:
vram_state = VRAMState.HIGH_VRAM
FORCE_FP32 = False
-FORCE_FP16 = False
if args.force_fp32:
logging.info("Forcing FP32, if this improves things please report it.")
FORCE_FP32 = True
-if args.force_fp16:
- logging.info("Forcing FP16.")
- FORCE_FP16 = True
-
if lowvram_available:
if set_vram_to in (VRAMState.LOW_VRAM, VRAMState.NO_VRAM):
vram_state = set_vram_to
@@ -1003,7 +998,7 @@ def should_use_fp16(device=None, model_params=0, prioritize_performance=True, ma
if is_device_cpu(device):
return False
- if FORCE_FP16:
+ if args.force_fp16:
return True
if FORCE_FP32: