--- base_model: - CompVis/stable-diffusion-v1-4 license: apache-2.0 pipeline_tag: text-to-image library_name: diffusers --- # SPEED Here are the released model checkpoints of our paper: > [SPEED: Scalable, Precise, and Efficient Concept Erasure for Diffusion Models](https://arxiv.org/abs/2503.07392) ![teaser](assets/teaser.JPEG) **Three characteristics of our proposed method, SPEED.** **(a) Scalable:** SPEED seamlessly scales from single-concept to large-scale multi-concept erasure (e.g., 100 celebrities) without additional design. **(b) Precise:** SPEED precisely removes the target concept (e.g., *Snoopy*) while preserving the semantic integrity for non-target concepts (e.g., *Hello Kitty* and *SpongeBob*). **(c) Efficient:** SPEED can immediately erase 100 concepts within 5 seconds, achieving a ×350 speedup over the state-of-the-art (SOTA) method. More implementation details can be found in our [GitHub repository](https://github.com/Ouxiang-Li/SPEED). ## Usage Here's an example of how to use the model for image sampling from the [official GitHub repository](https://github.com/Ouxiang-Li/SPEED) (for instance erasure): ```bash # Instance Erasure CUDA_VISIBLE_DEVICES=0 python sample.py \ --erase_type 'instance' \ --target_concept 'Snoopy, Mickey, Spongebob' \ --contents 'Snoopy, Mickey, Spongebob, Pikachu, Hello Kitty' \ --mode 'original, edit' \ --edit_ckpt '{checkpoint_path}' \ --num_samples 10 --batch_size 10 \ --save_root 'logs/few-concept/instance' ``` In the command above, you can configure the `--mode` to determine the sampling mode: - `original`: Generate images using the original Stable Diffusion model. - `edit`: Generate images with the erased checkpoint. ## Model Card We provide several edited models with SPEED on Stable Diffusion v1.4. | Concept Erasure Task | Edited Model | |---|---| | Few-Concept Erasure | huggingface | | Multi-Concept Erasure | huggingface | | Implicit Concept Erasure | huggingface | ## Citation If you find the repo useful, please consider citing. ```bibtex @misc{li2025speedscalablepreciseefficient, title={SPEED: Scalable, Precise, and Efficient Concept Erasure for Diffusion Models}, author={Ouxiang Li and Yuan Wang and Xinting Hu and Houcheng Jiang and Tao Liang and Yanbin Hao and Guojun Ma and Fuli Feng}, year={2025}, eprint={2503.07392}, archivePrefix={arXiv}, primaryClass={cs.CV}, url={https://arxiv.org/abs/2503.07392}, }