DiffAttack icon indicating copy to clipboard operation
DiffAttack copied to clipboard

Add support for newer versions of diffusers

Open AndPuQing opened this issue 1 year ago • 1 comments

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

AndPuQing avatar Jan 17 '24 06:01 AndPuQing

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.

WindVChen avatar Jan 17 '24 15:01 WindVChen