From a5991a7aa6f5dae3af820151abe15cb63ac86ac8 Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Wed, 31 Jul 2024 01:34:57 -0400 Subject: [PATCH] Fix hunyuan dit text encoder weights always being in fp32. --- comfy/text_encoders/hydit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/comfy/text_encoders/hydit.py b/comfy/text_encoders/hydit.py index ac0c893b..9dfa288b 100644 --- a/comfy/text_encoders/hydit.py +++ b/comfy/text_encoders/hydit.py @@ -52,8 +52,8 @@ class HyditTokenizer: class HyditModel(torch.nn.Module): def __init__(self, device="cpu", dtype=None): super().__init__() - self.hydit_clip = HyditBertModel() - self.mt5xl = MT5XLModel() + self.hydit_clip = HyditBertModel(dtype=dtype) + self.mt5xl = MT5XLModel(dtype=dtype) self.dtypes = set() if dtype is not None: