From c6527a45f1dcd1b1c5027063f45374e20773f0f1 Mon Sep 17 00:00:00 2001 From: City <125218114+city96@users.noreply.github.com> Date: Thu, 24 Oct 2024 21:00:57 +0200 Subject: [PATCH] Set t5_attention_mask for new comfy versions #79 --- PixArt/nodes.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PixArt/nodes.py b/PixArt/nodes.py index 414e117..f027d89 100644 --- a/PixArt/nodes.py +++ b/PixArt/nodes.py @@ -252,6 +252,10 @@ def split(self, sd3_clip, padding): # override special tokens tmp.t5xxl.special_tokens = copy.deepcopy(clip.cond_stage_model.t5xxl.special_tokens) tmp.t5xxl.special_tokens.pop("end") # make sure empty tokens match + + # add attn mask opt if present in original + if hasattr(sd3_clip.cond_stage_model, "t5_attention_mask"): + tmp.t5_attention_mask = False # tokenizer tok = SD3Tokenizer()