mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-01-30 04:11:15 -08:00
ruff auto fixes
This commit is contained in:
parent
e42de4b8a2
commit
028d3f6425
22 changed files with 47 additions and 47 deletions
|
|
@ -403,7 +403,7 @@ def attention_CrossAttention_forward(self, x, context=None, mask=None):
|
|||
k = self.to_k(context_k)
|
||||
v = self.to_v(context_v)
|
||||
|
||||
q, k, v = map(lambda t: rearrange(t, 'b n (h d) -> (b h) n d', h=h), (q, k, v))
|
||||
q, k, v = (rearrange(t, 'b n (h d) -> (b h) n d', h=h) for t in (q, k, v))
|
||||
|
||||
sim = einsum('b i d, b j d -> b i j', q, k) * self.scale
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue