Add --fp16-intermediates to use fp16 for intermediate values between nodes (#12953)

This is an experimental WIP option that might not work in your workflow but
should lower memory usage if it does.

Currently only the VAE and the load image node will output in fp16 when
this option is turned on.
This commit is contained in:
comfyanonymous
2026-03-14 16:18:19 -07:00
committed by GitHub
parent 1c5db7397d
commit c711b8f437
4 changed files with 27 additions and 14 deletions
+6
View File
@@ -1050,6 +1050,12 @@ def intermediate_device():
else:
return torch.device("cpu")
def intermediate_dtype():
if args.fp16_intermediates:
return torch.float16
else:
return torch.float32
def vae_device():
if args.cpu_vae:
return torch.device("cpu")