EricDai0 / advdiff

MIT License
20 stars 3 forks source link

How did you implement the untargeted attack? #5

Open huizhg opened 1 week ago

huizhg commented 1 week 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 week 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 week ago

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