-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about the cross attention #82
Comments
Hi, Since the first start of the sentence token is always fixed, I noticed a small improvement when detaching it during the training. I guess this helps in better association between the "V* category" and the target image and thus improved generation on inference time prompt. Thanks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
if crossattn:
detach = torch.ones_like(key)
detach[:, :1, :] = detach[:, :1, :]0.
key = detachkey (1-detach)key.detach()
value = detachvalue (1-detach)*value.detach()
Why stop the gradient of the first key-value pair here?
The text was updated successfully, but these errors were encountered: