-
Notifications
You must be signed in to change notification settings - Fork 28
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 Attention #13
Comments
Hi @cuishuhao, these codes perform the attention process. Specifically, as shown in https://github.com/TencentARC/MasaCtrl/blob/f4476b0adeb6d111a532aca5111457fc5b6e9f88/masactrl/masactrl.py#LL58C1-L59C138, the target image features serve as Q, and the K, V are obtained from the source image features to query contents from the source image. |
Should K and V be |
Hi @LWprogramming, Hope this can help you. 😃 |
Oh, you're right, I misread that :) I hadn't properly understood the connection between |
Hi @LWprogramming, |
Ah, I see now-- in the originally linked code I'd overlooked that q, k, v for u and c all have 2 * num_heads instead of num_heads in a dimension. Thanks! |
In this link, I do not understand why passing the entire |
Hi @kingnobro, I am sorry for the confusion. Note that |
Maybe it works fine too, without chunking for u and c? I checked it and it turns out to be the same value with the current algorithm. |
Hi @FerryHuang, I'd like to further validate the results without chunking the unconditional and conditional parts during the denoising process, and the results will be updated here. In our previous experiments, performing the mutual self-attention on two parts independently achieved better results than jointly. |
Sorry, I don't really understand why the two denoising processes are performed simultaneously. In implementation MasaCtrl/masactrl/diffuser_utils.py Line 184 in ae6e1fb
|
Hi @TimelessXZY, the |
Thank you for sharing the job!
I wonder how the codes achieve the process from source attention to the target, is it achieved by https://github.com/TencentARC/MasaCtrl/blob/main/masactrl/masactrl.py#L35C25-L43?
The text was updated successfully, but these errors were encountered: