From 8f60d093ba066eee953d5997136962ff605e801a Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Thu, 22 Aug 2024 10:38:24 -0400 Subject: [PATCH] Fix issue. --- comfy/supported_models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/comfy/supported_models.py b/comfy/supported_models.py index 98aa8056..3603313f 100644 --- a/comfy/supported_models.py +++ b/comfy/supported_models.py @@ -654,6 +654,7 @@ class Flux(supported_models_base.BASE): def clip_target(self, state_dict={}): pref = self.text_encoder_key_prefix[0] t5_key = "{}t5xxl.transformer.encoder.final_layer_norm.weight".format(pref) + dtype_t5 = None if t5_key in state_dict: dtype_t5 = state_dict[t5_key].dtype return supported_models_base.ClipTarget(comfy.text_encoders.flux.FluxTokenizer, comfy.text_encoders.flux.flux_clip(dtype_t5=dtype_t5))