-
Notifications
You must be signed in to change notification settings - Fork 17
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
KeyError: 'up_cross' #2
Comments
Hi @tanlingp , Based on the above information, I am currently unable to conclude what is causing this error. Can you take a look at your |
Thank you very much for your help, it is indeed the reason for the wrong version |
Sorry to interrupt, I'm having this problem too, can I ask which version are you using? |
The version given by the author |
I have the same question, and I'm unsure which specific version we need. Could you please assist me in clarifying this? |
Hi @nil0330 , You can take a look at requirements.txt for the versions of some packages. Hope this helps. |
Sorry to interrupt, code error Traceback (most recent call last).
File "main.py", line 153, in
adv_image, clean_acc, adv_acc = run_diffusion_attack(tmp_image, label[ind:ind + 1].
File "main.py", line 72, in run_diffusion_attack
adv_image, clean_acc, adv_acc = diff_latent_attack.diffattack(diffusion_model, label, controller.
File "/usr/local/lib/python3.8/dist-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/202221623173/DiffAttack-main/diff_latent_attack.py", line 369, in diffattack
before_attention_map = aggregate_attention(prompt, controller, 7, ("up", "down"), True, 0, is_cpu=False)
File "/202221623173/DiffAttack-main/utils.py", line 13, in aggregate_attention
for item in attention_maps[f"{location}_{'cross' if is_cross else 'self'}"].
KeyError: 'up_cross'
The text was updated successfully, but these errors were encountered: