Official PyTorch implementation of "Universal Adversarial Purification with DDIM Metric Loss for Stable Diffusion" (AAAI'26)
- Release core code of UDAP
- Release a simple demo with strongly adversarial images by PID (https://github.com/PKU-ML/Diffusion-PID-Protection/tree/main) and Anti-DB (https://github.com/VinAIResearch/Anti-DreamBooth)
- Please contact me or post issues if you have any problems
Install dependencies:
cd UDAP
conda create -n UDAP python=3.9
conda activate UDAP
pip install -r requirements.txtTo purify adversarial images from demo, you can run
python Main.pyIf you have any problems, please open an issue in this repository or send an email to [email protected].