This repository is the official repository for our paper "Cheating Suffix: Targeted Attack to Text-To-Image Diffusion Models with Multi-Modal Priors"
Install PyTorch, diffusers==0.17.0, and transformers==4.29.1.
Download the Stable Diffusion model and CLIP model.
You can execute the following command to perform a targeted attack, transforming the category "car" into "bird":
python attack.py --ori_sentence "a photo of car" --target_word bird