The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Fix clip attention mask issues on some hardware.
comfyanonymous6c875d846b54
diff --git a/comfy/clip_model.py b/comfy/clip_model.pyindex 09e7bbca1..9ba4e0390 100644--- a/comfy/clip_model.py+++ b/comfy/clip_model.py@@ -97,7 +97,7 @@ class CLIPTextModel_(torch.nn.Module):x = self.embeddings(input_tokens)mask = Noneif attention_mask is not None:- mask = 1.0 - attention_mask.to(x.dtype).unsqueeze(1).unsqueeze(1).expand(attention_mask.shape[0], 1, attention_mask.shape[-1], attention_mask.shape[-1])+ mask = 1.0 - attention_mask.to(x.dtype).reshape((attention_mask.shape[0], -1, attention_mask.shape[-1])).expand(attention_mask.shape[0], attention_mask.shape[-1], attention_mask.shape[-1])mask = mask.masked_fill(mask.to(torch.bool), float("-inf"))causal_mask = torch.empty(x.shape[1], x.shape[1], dtype=x.dtype, device=x.device).fill_(float("-inf")).triu_(1)