proxima yekta commited on
Commit
9fad48e
1 Parent(s): 1a095db

Add safety checker (#2)

Browse files

- Add safety checker (47dc1931ddbd7702dbb075990df67156af362df5)


Co-authored-by: Yekta <yekta@users.noreply.huggingface.co>

safety_checker/config.json ADDED
@@ -0,0 +1,179 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_commit_hash": "cb41f3a270d63d454d385fc2e4f571c487c253c5",
3
+ "_name_or_path": "CompVis/stable-diffusion-safety-checker",
4
+ "architectures": ["StableDiffusionSafetyChecker"],
5
+ "initializer_factor": 1.0,
6
+ "logit_scale_init_value": 2.6592,
7
+ "model_type": "clip",
8
+ "projection_dim": 768,
9
+ "text_config": {
10
+ "_name_or_path": "",
11
+ "add_cross_attention": false,
12
+ "architectures": null,
13
+ "attention_dropout": 0.0,
14
+ "bad_words_ids": null,
15
+ "begin_suppress_tokens": null,
16
+ "bos_token_id": 0,
17
+ "chunk_size_feed_forward": 0,
18
+ "cross_attention_hidden_size": null,
19
+ "decoder_start_token_id": null,
20
+ "diversity_penalty": 0.0,
21
+ "do_sample": false,
22
+ "dropout": 0.0,
23
+ "early_stopping": false,
24
+ "encoder_no_repeat_ngram_size": 0,
25
+ "eos_token_id": 2,
26
+ "exponential_decay_length_penalty": null,
27
+ "finetuning_task": null,
28
+ "forced_bos_token_id": null,
29
+ "forced_eos_token_id": null,
30
+ "hidden_act": "quick_gelu",
31
+ "hidden_size": 768,
32
+ "id2label": {
33
+ "0": "LABEL_0",
34
+ "1": "LABEL_1"
35
+ },
36
+ "initializer_factor": 1.0,
37
+ "initializer_range": 0.02,
38
+ "intermediate_size": 3072,
39
+ "is_decoder": false,
40
+ "is_encoder_decoder": false,
41
+ "label2id": {
42
+ "LABEL_0": 0,
43
+ "LABEL_1": 1
44
+ },
45
+ "layer_norm_eps": 1e-5,
46
+ "length_penalty": 1.0,
47
+ "max_length": 20,
48
+ "max_position_embeddings": 77,
49
+ "min_length": 0,
50
+ "model_type": "clip_text_model",
51
+ "no_repeat_ngram_size": 0,
52
+ "num_attention_heads": 12,
53
+ "num_beam_groups": 1,
54
+ "num_beams": 1,
55
+ "num_hidden_layers": 12,
56
+ "num_return_sequences": 1,
57
+ "output_attentions": false,
58
+ "output_hidden_states": false,
59
+ "output_scores": false,
60
+ "pad_token_id": 1,
61
+ "prefix": null,
62
+ "problem_type": null,
63
+ "projection_dim": 512,
64
+ "pruned_heads": {},
65
+ "remove_invalid_values": false,
66
+ "repetition_penalty": 1.0,
67
+ "return_dict": true,
68
+ "return_dict_in_generate": false,
69
+ "sep_token_id": null,
70
+ "suppress_tokens": null,
71
+ "task_specific_params": null,
72
+ "temperature": 1.0,
73
+ "tf_legacy_loss": false,
74
+ "tie_encoder_decoder": false,
75
+ "tie_word_embeddings": true,
76
+ "tokenizer_class": null,
77
+ "top_k": 50,
78
+ "top_p": 1.0,
79
+ "torch_dtype": null,
80
+ "torchscript": false,
81
+ "transformers_version": "4.25.1",
82
+ "typical_p": 1.0,
83
+ "use_bfloat16": false,
84
+ "vocab_size": 49408
85
+ },
86
+ "text_config_dict": {
87
+ "hidden_size": 768,
88
+ "intermediate_size": 3072,
89
+ "num_attention_heads": 12,
90
+ "num_hidden_layers": 12
91
+ },
92
+ "torch_dtype": "float32",
93
+ "transformers_version": null,
94
+ "vision_config": {
95
+ "_name_or_path": "",
96
+ "add_cross_attention": false,
97
+ "architectures": null,
98
+ "attention_dropout": 0.0,
99
+ "bad_words_ids": null,
100
+ "begin_suppress_tokens": null,
101
+ "bos_token_id": null,
102
+ "chunk_size_feed_forward": 0,
103
+ "cross_attention_hidden_size": null,
104
+ "decoder_start_token_id": null,
105
+ "diversity_penalty": 0.0,
106
+ "do_sample": false,
107
+ "dropout": 0.0,
108
+ "early_stopping": false,
109
+ "encoder_no_repeat_ngram_size": 0,
110
+ "eos_token_id": null,
111
+ "exponential_decay_length_penalty": null,
112
+ "finetuning_task": null,
113
+ "forced_bos_token_id": null,
114
+ "forced_eos_token_id": null,
115
+ "hidden_act": "quick_gelu",
116
+ "hidden_size": 1024,
117
+ "id2label": {
118
+ "0": "LABEL_0",
119
+ "1": "LABEL_1"
120
+ },
121
+ "image_size": 224,
122
+ "initializer_factor": 1.0,
123
+ "initializer_range": 0.02,
124
+ "intermediate_size": 4096,
125
+ "is_decoder": false,
126
+ "is_encoder_decoder": false,
127
+ "label2id": {
128
+ "LABEL_0": 0,
129
+ "LABEL_1": 1
130
+ },
131
+ "layer_norm_eps": 1e-5,
132
+ "length_penalty": 1.0,
133
+ "max_length": 20,
134
+ "min_length": 0,
135
+ "model_type": "clip_vision_model",
136
+ "no_repeat_ngram_size": 0,
137
+ "num_attention_heads": 16,
138
+ "num_beam_groups": 1,
139
+ "num_beams": 1,
140
+ "num_channels": 3,
141
+ "num_hidden_layers": 24,
142
+ "num_return_sequences": 1,
143
+ "output_attentions": false,
144
+ "output_hidden_states": false,
145
+ "output_scores": false,
146
+ "pad_token_id": null,
147
+ "patch_size": 14,
148
+ "prefix": null,
149
+ "problem_type": null,
150
+ "projection_dim": 512,
151
+ "pruned_heads": {},
152
+ "remove_invalid_values": false,
153
+ "repetition_penalty": 1.0,
154
+ "return_dict": true,
155
+ "return_dict_in_generate": false,
156
+ "sep_token_id": null,
157
+ "suppress_tokens": null,
158
+ "task_specific_params": null,
159
+ "temperature": 1.0,
160
+ "tf_legacy_loss": false,
161
+ "tie_encoder_decoder": false,
162
+ "tie_word_embeddings": true,
163
+ "tokenizer_class": null,
164
+ "top_k": 50,
165
+ "top_p": 1.0,
166
+ "torch_dtype": null,
167
+ "torchscript": false,
168
+ "transformers_version": "4.25.1",
169
+ "typical_p": 1.0,
170
+ "use_bfloat16": false
171
+ },
172
+ "vision_config_dict": {
173
+ "hidden_size": 1024,
174
+ "intermediate_size": 4096,
175
+ "num_attention_heads": 16,
176
+ "num_hidden_layers": 24,
177
+ "patch_size": 14
178
+ }
179
+ }
safety_checker/pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:16d28f2b37109f222cdc33620fdd262102ac32112be0352a7f77e9614b35a394
3
+ size 1216064769