WindVChen / DiffAttack

An unrestricted attack based on diffusion models that can achieve both good transferability and imperceptibility.
Apache License 2.0
130 stars 12 forks source link

Add support for newer versions of diffusers #15

Open AndPuQing opened 8 months ago

AndPuQing commented 8 months ago

According to the commit https://github.com/huggingface/diffusers/commit/e828232780554d54bdb527d3390fab0be042b72a#diff-852d5806e41c100ee99c68c9e1059bfad9c0177e6f4416f0faf5a2f2a6a64067 CrossAttention has renamed to Attention

And some forward parameters have changed.

Related: https://github.com/WindVChen/DiffAttack/issues/2

Note: This PR is provided as a code snippet for reference and is not intended to be merged

WindVChen commented 8 months ago

Hi @AndPuQing,

Thank you for submitting this excellent PR! I've thoroughly tested the code, and it seamlessly integrates with the latest diffusers (0.25.0).

However, during my testing, I observed a significant disparity between the generated adversarial examples before and after, as illustrated below (left represents the original, while the right depicts the adapted version). Could you provide any insight into this observed difference?

Your cooperation is greatly appreciated.