Update nodes.py

This commit is contained in:
Extraltodeus
2024-05-15 10:27:27 +02:00
committed by GitHub
parent 960908cfb9
commit 7f491f75c3
+1 -2
View File
@@ -221,7 +221,6 @@ def multi_tensor_check_mix(tensors):
tensors[0][mask] = tensors[i][mask]
return tensors[0]
# I asked GPT-4 for a function to deal with the attention and it made this. It kinda sorta works.
def normal_attention(q, k, v, mask=None):
attention_scores = torch.matmul(q, k.transpose(-2, -1))
d_k = k.size(-1)
@@ -1041,4 +1040,4 @@ class simpleDynamicCFGCustomAttentionPatch:
advcfg = advancedDynamicCFG()
m = advcfg.patch(model, **patch_parameters)[0]
return (m, )
return (m, )