mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-01-30 04:11:15 -08:00
delete xformers attnblock
This commit is contained in:
parent
786ed49922
commit
2043c4a231
1 changed files with 0 additions and 12 deletions
|
|
@ -292,15 +292,3 @@ def cross_attention_attnblock_forward(self, x):
|
|||
|
||||
return h3
|
||||
|
||||
def xformers_attnblock_forward(self, x):
|
||||
try:
|
||||
h_ = x
|
||||
h_ = self.norm(h_)
|
||||
q1 = self.q(h_).contiguous()
|
||||
k1 = self.k(h_).contiguous()
|
||||
v = self.v(h_).contiguous()
|
||||
out = xformers.ops.memory_efficient_attention(q1, k1, v)
|
||||
out = self.proj_out(out)
|
||||
return x + out
|
||||
except NotImplementedError:
|
||||
return cross_attention_attnblock_forward(self, x)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue