JadenFK commited on
Commit
0a5f1a5
2 Parent(s): f71eb42 56a1461

Merge branch 'main' of https://huggingface.co/spaces/JadenFK/Erasing_Diffusion_Concepts into main

Browse files
Files changed (3) hide show
  1. .gitattributes +1 -0
  2. README.md +35 -5
  3. images/applications.png +3 -0
.gitattributes CHANGED
@@ -32,3 +32,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
32
  *.zip filter=lfs diff=lfs merge=lfs -text
33
  *.zst filter=lfs diff=lfs merge=lfs -text
34
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
32
  *.zip filter=lfs diff=lfs merge=lfs -text
33
  *.zst filter=lfs diff=lfs merge=lfs -text
34
  *tfevents* filter=lfs diff=lfs merge=lfs -text
35
+ images/applications.png filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,8 +1,8 @@
1
  ---
2
- title: Erasing Diffusion Concepts
3
- emoji: 💩
4
- colorFrom: purple
5
- colorTo: purple
6
  sdk: gradio
7
  sdk_version: 3.21.0
8
  app_file: app.py
@@ -10,4 +10,34 @@ pinned: false
10
  license: mit
11
  ---
12
 
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: Erasing Concepts from Diffusion Models
3
+ emoji: 💡
4
+ colorFrom: indigo
5
+ colorTo: gray
6
  sdk: gradio
7
  sdk_version: 3.21.0
8
  app_file: app.py
 
10
  license: mit
11
  ---
12
 
13
+
14
+
15
+ # Erasing Concepts from Diffusion Models
16
+
17
+ Project Website [https://erasing.baulab.info](https://erasing.baulab.info) <br>
18
+ Arxiv Preprint [https://arxiv.org/pdf/2303.07345.pdf](https://arxiv.org/pdf/2303.07345.pdf) <br>
19
+ Fine-tuned Weights [https://erasing.baulab.info/weights/esd_models/](https://erasing.baulab.info/weights/esd_models/) <br>
20
+ <div align='center'>
21
+ <img src = 'images/applications.png'>
22
+ </div>
23
+
24
+ Motivated by recent advancements in text-to-image diffusion, we study erasure of specific concepts from the model's weights. While Stable Diffusion has shown promise in producing explicit or realistic artwork, it has raised concerns regarding its potential for misuse. We propose a fine-tuning method that can erase a visual concept from a pre-trained diffusion model, given only the name of the style and using negative guidance as a teacher. We benchmark our method against previous approaches that remove sexually explicit content and demonstrate its effectiveness, performing on par with Safe Latent Diffusion and censored training.
25
+
26
+ To evaluate artistic style removal, we conduct experiments erasing five modern artists from the network and conduct a user study to assess the human perception of the removed styles. Unlike previous methods, our approach can remove concepts from a diffusion model permanently rather than modifying the output at the inference time, so it cannot be circumvented even if a user has access to model weights
27
+
28
+ Given only a short text description of an undesired visual concept and no additional data, our method fine-tunes model weights to erase the targeted concept. Our method can avoid NSFW content, stop imitation of a specific artist's style, or even erase a whole object class from model output, while preserving the model's behavior and capabilities on other topics.
29
+
30
+ ## Fine-tuned Weights
31
+
32
+ The finetuned weights for both NSFW and art style erasures are available on our [project page](https://erasing.baulab.info).
33
+
34
+ ## Citing our work
35
+ The preprint can be cited as follows
36
+ ```
37
+ @article{gandikota2023erasing,
38
+ title={Erasing Concepts from Diffusion Models},
39
+ author={Rohit Gandikota and Joanna Materzy\'nska and Jaden Fiotto-Kaufman and David Bau},
40
+ journal={arXiv preprint arXiv:2303.07345},
41
+ year={2023}
42
+ }
43
+ ```
images/applications.png ADDED

Git LFS Details

  • SHA256: deec6225d4533fb66380321c76a918ff0b9932502192a25f2f32e6f11f2c5db2
  • Pointer size: 132 Bytes
  • Size of remote file: 2.01 MB