EricDai0 / advdiff

MIT License
24 stars 4 forks source link

How did you implement the untargeted attack? #5

Open huizhg opened 1 month ago

huizhg commented 1 month ago

Hi,

Thank you for sharing the code for your great work. I am curious how you implemented the untargeted attack you mentioned in your paper. There's no explanation in the paper either.

EricDai0 commented 1 month ago

Hello,

Thank you for your interest in our work. We'll give the example code for the untargeted attack soon. Or you can just change the tar_label from line 223 in ldm/models/diffusion/ddim_adv.py to the ground truth label and use negative sampling. However, we do not recommend directly using the untargeted attack version as they can harm the generation quality.

huizhg commented 1 month ago

Thanks for the quick reply. I just want to check the difference between the samples generated by the two different sampling methods.