-
Notifications
You must be signed in to change notification settings - Fork 3
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
hello! I get the following problem when I run edit.py, what can I do to fix it: #3
Comments
Traceback (most recent call last): |
Me too |
Thank you for your interest in our work! Could you please provide the script you are running and print out |
hello! I get the following problem when I run edit.py。 Then I printed len (attd_maps) and len (word [1]) with values of 0 and 1, respectively。 |
Hello! I’m experiencing the same issue. Were you able to resolve it? |
Hi @Y-T-cyber @SuanToupoi @bimsarapathiraja @zerojin0603, |
Hello, I’m currently using |
Please modify the following code: Line 212 in 8c4a53b
to if net_.__class__.__name__ == 'Attention': This change is necessary because the CrossAttention class has been renamed to Attention in the newer versions of the diffusers library. We'll address version compatibility in a future update.Additionally, MAG-Edit has only been tested with 512x512 images. I am unsure of its performance with higher resolutions, so if possible, please resize the 1024x1024 images to 512x512 for more reliable results. Please let me know if this is helpful :) Thanks! |
I'm currently using diffusers==0.30.0. I'll try the modification you suggested later. Thank you for your email
…------------------ 原始邮件 ------------------
发件人: "HelenMao/MAG-Edit" ***@***.***>;
发送时间: 2024年10月30日(星期三) 上午10:46
***@***.***>;
***@***.******@***.***>;
主题: Re: [HelenMao/MAG-Edit] hello! I get the following problem when I run edit.py, what can I do to fix it: (Issue #3)
Hi @Y-T-cyber @SuanToupoi @bimsarapathiraja @zerojin0603, Could you please provide the version of the diffusers library you're using? It would also be really helpful if you could share the files you're running for better context. If it's more convenient, feel free to send them to my email at ***@***.***
Hello, Thank you for your response.
I’m currently using diffusers==0.19.3, as I encountered issues loading the models with earlier versions. For running, I’ve used a random 1024x1024 image file from the CelebA-HQ dataset.
Please modify the following code:
https://github.com/HelenMao/MAG-Edit/blob/8c4a53b32fc5630cd55e62ea11f73651f1d55dc4/code_tr/ptp_utils.py#L212
to
if net_.__class__.__name__ == 'Attention':
This change is necessary because the CrossAttention class has been renamed to Attention in the newer versions of the diffusers library. We'll address version compatibility in a future update.
Additionally, MAG-Edit has only been tested with 512x512 images. I am unsure of its performance with higher resolutions, so if possible, please resize the 1024x1024 images to 512x512 for more reliable results.
Please let me know if this is helpful :)
Thanks!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Thank you very much for your answer! Thanks again for your effort! |
Sorry, I would like to ask why I changed the code to “if net___ Class__. name=='CrossAttention ':” The following issue occurred afterwards
|
Please downgrade the version of the Line 165 in a82bccb
to: def forward(hidden_states, encoder_hidden_states=None, attention_mask=None): and replace the x , context and mask with hidden_states , encoder_hidden_states and attention_mask in the function respectively.
|
I edited the code into the following format:
Simultaneously set the following code “ if net_.class.name == 'Attention':”. At this point, my diffusers version is 0.19.3 and transformers version is 4.37.2 . Problem reoccurs during runtime:
If you could take the time to read the email and help, I would greatly appreciate it. |
This issue may also be related to the version of the Line 175 in a82bccb
to: q = self.head_to_batch_dim(q) And make the same modification for the next two lines. Additionally, please change the following code: Line 195 in a82bccb
to: out = self.batch_to_head_dim(out) There are significant differences between the version of the diffusers library used in MAG-Edit and the latest version. We appreciate you bringing this issue to our attention, and we will update our code for compatibility. If you have any further questions, please feel free to contact us :)
|
Thank you for your suggestion, but even after applying the modifications you mentioned, I still get the same error message:
Perhaps due to my environment not being installed properly or other reasons, I apologize for the inconvenience caused by my repeated inquiries to you regarding related issues. |
The error message appears to be incomplete. Could you please provide the full error message? Additionally, if possible, please share the code you’re running and details of your environment. You can send this information to my email at [email protected] |
No description provided.
The text was updated successfully, but these errors were encountered: