Authors: Jaehong Yoon*, Shoubin Yu*, Vaidehi Patil, Huaxiu Yao, Mohit Bansal
- (Optional) Creating conda environment
conda create -n SAFREE python=3.10.13
conda activate SAFREE
- build from source
pip install -r requirements.txt
bash scripts/run_nudity.sh
bash scripts/run_nudity_sdxl.sh
bash scripts/run_coco.sh
bash scripts/run_coco_sdxl.sh
bash scripts/run_artist.sh
The code is built upon Prompting4Debugging, Diffusers, CogVideoX, and ZeroScopeT2V.
Please cite our paper if you use our models in your works:
@article{yoon2024safree,
title={SAFREE: Training-Free and Adaptive Guard for Safe Text-to-Image And Video Generation},
author={Yoon, Jaehong and Yu, Shoubin and Patil, Vaidehi and Yao, Huaxiu and Bansal, Mohit},
journal={arXiv preprint arXiv:2410.12761},
year={2024}
}