telcom commited on
Commit
04b5c8e
·
verified ·
1 Parent(s): ad2a95d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +20 -3
README.md CHANGED
@@ -1,3 +1,20 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ ---
4
+
5
+ # NSFW.pt used in HUB (https://github.com/ml-postech/HUB)
6
+
7
+ It is generated using repo
8
+ ```
9
+ git clone https://github.com/rohitgandikota/unified-concept-editing.git
10
+ cd unified-concept-editing
11
+ mkdir models
12
+ python3 -m venv .venv
13
+ source .venv/bin/activate
14
+ pip install -r requirements.txt
15
+ ```
16
+ Then
17
+ ```
18
+ python trainscripts/uce_sd_erase.py --model_id 'CompVis/stable-diffusion-v1-4' --edit_concepts 'nudity; porn; sex' --concept_type object --save_dir uce --exp_name NSFW --device cuda
19
+ python -c "import torch; from safetensors.torch import load_file; torch.save(load_file('uce/NSFW.safetensors'), 'uce/NSFW.pt')"
20
+ ```