Skip to content

Commit

Permalink
fix for negpip
Browse files Browse the repository at this point in the history
  • Loading branch information
hako-mikan authored Feb 7, 2024
1 parent b6e987f commit 59d68e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def main_forward(module,x,context,mask,divide,isvanilla = False,userpp = False,t
if negpip:
conds, contokens = negpip
context = torch.cat((context,conds),1)
context = context.to(x.dtype)

h = module.heads
if isvanilla: # SBM Ddim / plms have the context split ahead along with x.
Expand Down Expand Up @@ -596,4 +597,4 @@ def negpipdealer(i,pn):
else:
return None
else:
return None
return None

0 comments on commit 59d68e6

Please sign in to comment.