Skip to content

Commit

Permalink
Always use fp16 for the text encoders.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Feb 2, 2024
1 parent d0e2354 commit 4b02390
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions comfy/model_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,10 +546,8 @@ def text_encoder_dtype(device=None):
if is_device_cpu(device):
return torch.float16

if should_use_fp16(device, prioritize_performance=False):
return torch.float16
else:
return torch.float32
return torch.float16


def intermediate_device():
if args.gpu_only:
Expand Down

0 comments on commit 4b02390

Please sign in to comment.