You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In labml_nn/diffusion/stable_diffusion/model/unet_attention.py, def flash_attention(self, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor): has torch.stack((q,k,v), dim=2) where, I believe, q is of different shape from k and v.
How does torch.stack work then?
When I run text_to_image.py, q, k, v are of shape ([8, 1024, 640]), ([8, 77, 640]), ([8, 77, 640]) respectively.
The text was updated successfully, but these errors were encountered:
In
labml_nn/diffusion/stable_diffusion/model/unet_attention.py
,def flash_attention(self, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor):
hastorch.stack((q,k,v), dim=2)
where, I believe, q is of different shape from k and v.How does torch.stack work then?
When I run
text_to_image.py
,q
,k
,v
are of shape([8, 1024, 640])
,([8, 77, 640])
,([8, 77, 640])
respectively.The text was updated successfully, but these errors were encountered: